nginx-config/sites-available/everun

85 lines
2.5 KiB
Plaintext
Raw Normal View History

2023-01-28 10:59:28 +00:00
server {
# allow access from localhost
2023-06-04 11:28:24 +00:00
listen 443 quic;
listen 443 http2 ssl;
2023-01-28 10:59:28 +00:00
server_name www.everun.club;
ssl_certificate /etc/lego/.lego/certificates/_.everun.club.crt;
ssl_certificate_key /etc/lego/.lego/certificates/_.everun.club.key;
ssl_dhparam /etc/lego/dhparams_4096.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:3m;
ssl_buffer_size 4k;
ssl_session_tickets off;
ssl_protocols TLSv1.3 TLSv1.2;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.4.4 8.8.8.8 valid=300s;
resolver_timeout 10s;
# Enable HSTS (HTTP Strict Transport Security)
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload";
root /var/www/everun;
index index.html index.htm;
2023-05-21 06:05:40 +00:00
access_log /var/log/nginx/everun.access.log json;
2023-01-28 10:59:28 +00:00
error_log /var/log/nginx/everun.error.log;
http2_max_field_size 256k;
http2_max_header_size 256k;
# To allow POST on static pages
error_page 405 =200 $uri;
location / {
2023-06-04 11:42:07 +00:00
# used to advertise the availability of HTTP/3
add_header Alt-Svc 'h3=":443"; ma=86400';
2023-01-28 10:59:28 +00:00
try_files $uri $uri/ /index.html;
}
}
server {
# allow access from localhost
listen 443 ssl http2;
server_name everun.club;
ssl_certificate /etc/lego/.lego/certificates/_.everun.club.crt;
ssl_certificate_key /etc/lego/.lego/certificates/_.everun.club.key;
ssl_dhparam /etc/lego/dhparams_4096.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:3m;
ssl_buffer_size 4k;
ssl_session_tickets off;
ssl_protocols TLSv1.3 TLSv1.2;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.4.4 8.8.8.8 valid=300s;
resolver_timeout 10s;
# Enable HSTS (HTTP Strict Transport Security)
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload";
2023-05-21 06:05:40 +00:00
access_log /var/log/nginx/everun.access.log json;
2023-01-28 10:59:28 +00:00
error_log /var/log/nginx/everun.error.log;
http2_max_field_size 256k;
http2_max_header_size 256k;
location / {
rewrite ^/$ https://www.everun.club;
}
}