works/examples/nginx/svoboda.conf

54 lines
965 B
Plaintext
Raw Permalink Normal View History

2024-12-16 16:46:49 +07:00
server {
listen 80;
listen [::]:80;
server_name svoboda.works;
2024-12-16 16:46:49 +07:00
# 301 302
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
listen 443 quic;
listen [::]:443 ssl;
listen [::]:443 quic;
server_name svoboda.works;
2024-12-16 16:46:49 +07:00
http2 on;
http3 on;
quic_gso on;
quic_retry on;
add_header Alt-Svc 'h3=":$server_port"; ma=86400';
add_header x-quic 'h3';
root /var/www/svoboda.works/svoboda/works/system/public;
index index.php;
keepalive_timeout 60;
include snippets/ssl-params.conf;
include snippets/ssl-svoboda.conf;
2024-12-16 16:46:49 +07:00
include snippets/php8_4.conf;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff)$ {
expires 1M;
access_log off;
add_header Cache-Control "max-age=2629746, public";
}
location ~* \.(?:css|js|mjs|min)$ {
2024-12-16 16:46:49 +07:00
expires 1y;
access_log off;
add_header Cache-Control "max-age=31556952, public";
}
}