Files
nginx-vhosts/009-webmail.conf

73 lines
2.5 KiB
Plaintext

##
# webmail site
##
server {
listen 80;
server_name webmail.solusar.de www.webmail.solusar.de;
location / {
return 301 https://$server_name$request_uri;
}
}
server {
listen 443 ssl http2;
server_name webmail.solusar.de;
access_log /var/log/nginx/009-webmail-access.log;
error_log /var/log/nginx/009-webmail-error.log;
ssl_certificate /etc/letsencrypt/live/webmail.solusar.de/fullchain.pem;
ssl_trusted_certificate /etc/letsencrypt/live/webmail.solusar.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/webmail.solusar.de/privkey.pem;
#ssl_dhparam /etc/myssl/dh4096.pem;
#ssl_protocols TLSv1.2 TLSv1.3;
#ssl_ciphers "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:AES-256-GCM-SHA384:EECDH+AESGCM:EDH+AESGCM";
#ssl_session_timeout 10m;
#ssl_prefer_server_ciphers on;
#ssl_session_cache shared:SSL:10m;
#ssl_session_tickets off;
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Robots-Tag "none" always;
add_header X-Download-Options "noopen" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header Referrer-Policy "no-referrer" always;
add_header X-Frame-Options "SAMEORIGIN" always;
fastcgi_hide_header X-Powered-By;
# GZIP / compression settings
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
root /var/www/vhosts/solusar.de/subdomains/webmail;
index index.php;
###
# Forbid access to dotfiles
location ~ (^|/)\. {
return 403;
}
# The actual root location
location / {
try_files $uri $uri/ /index.php?$args;
}
location ^~ /data {
deny all;
}
include global/restrictions.conf;
include global/php.conf;
}