forked from nihilist/blog-contributions
42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name mail.void.yt;
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name mail.void.yt;
|
|
|
|
ssl_certificate /root/.acme.sh/mail.void.yt/fullchain.cer;
|
|
ssl_trusted_certificate /root/.acme.sh/mail.void.yt/mail.void.yt.cer;
|
|
ssl_certificate_key /root/.acme.sh/mail.void.yt/mail.void.yt.key;
|
|
|
|
ssl_protocols TLSv1.3 TLSv1.2;
|
|
ssl_ciphers 'TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
|
|
ssl_prefer_server_ciphers on;
|
|
ssl_session_cache shared:SSL:10m;
|
|
ssl_session_timeout 10m;
|
|
ssl_session_tickets off;
|
|
ssl_ecdh_curve auto;
|
|
ssl_stapling on;
|
|
ssl_stapling_verify on;
|
|
resolver 80.67.188.188 80.67.169.40 valid=300s;
|
|
resolver_timeout 10s;
|
|
|
|
add_header X-XSS-Protection "1; mode=block"; #Cross-site scripting
|
|
add_header X-Frame-Options "SAMEORIGIN" always; #clickjacking
|
|
add_header X-Content-Type-Options nosniff; #MIME-type sniffing
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
|
|
|
|
location / {
|
|
try_files $uri $uri/ = 404;
|
|
}
|
|
|
|
root /var/www/mail;
|
|
index index.html;
|
|
|
|
}
|