Add snippets and config

This commit is contained in:
root
2018-06-28 15:57:14 +02:00
parent 62861295b0
commit 6d76f57a54
6 changed files with 41 additions and 1 deletions

View File

@@ -50,7 +50,6 @@ http {
ssl_certificate /etc/letsencrypt/live/triton.fet.at/fullchain.pem; ssl_certificate /etc/letsencrypt/live/triton.fet.at/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/triton.fet.at/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/triton.fet.at/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/triton.fet.at/chain.pem; ssl_trusted_certificate /etc/letsencrypt/live/triton.fet.at/chain.pem;
include snippets/ssl.conf; include snippets/ssl.conf;
# return 503;# http://$host$request_uri; #444 # return 503;# http://$host$request_uri; #444

6
snippets/header.conf Normal file
View File

@@ -0,0 +1,6 @@
# -*-nginx-*-
add_header X-Content-Type-Options nosniff;
add_header Content-Security-Policy "default-src 'self'";
add_header X-XSS-Protection "1; mode=block";
add_header Referrer-Policy "strict-origin";
add_header Strict-Transport-Security "max-age=31536000" always;

3
snippets/ldap.conf Normal file
View File

@@ -0,0 +1,3 @@
# -*-nginx-*-
auth_ldap "FET Login";
auth_ldap_servers fet;

11
snippets/letsencrypt.conf Normal file
View File

@@ -0,0 +1,11 @@
# -*-nginx-*-
location /.well-known/ {
default_type "text/plain";
root /var/www/html;
}
location = /.well-known/acme-challenge/ {
return 404;
}
location / {
return 301 https://$host$request_uri;
}

View File

@@ -0,0 +1,6 @@
# -*-nginx-*-
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X_FORWARDED_SSL on;
proxy_set_header HTTP_X_FORWARDED_SSL on;
proxy_set_header X-Forwarded-For $remote_addr;

15
snippets/ssl.conf Normal file
View File

@@ -0,0 +1,15 @@
# -*-nginx-*-
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_dhparam dhparam.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
ssl_prefer_server_ciphers on;
#add_header Strict-Transport-Security max-age=15768000;
ssl_stapling on;
ssl_stapling_verify on;