Ticket #1758: nginx-extension.conf

File nginx-extension.conf, 2.1 KB (added by ronaronica@…, 7 years ago)
Line 
1##
2# These are site-specific entries for nginx html context.
3# There are other conf files in /etc/nginx/sites-available for specific server contexts.
4##
5
6 add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
7 add_header X-Content-Type-Options nosniff;
8 add_header X-Frame-Options SAMEORIGIN;
9 add_header X-XSS-Protection "1; mode=block";
10
11 index index.php index.htm index.html;
12
13 ##
14 # SSL Settings
15 ##
16
17 ssl_certificate /etc/letsencrypt/live/ronaronica.com/fullchain.pem;
18 ssl_certificate_key /etc/letsencrypt/live/ronaronica.com/privkey.pem;
19 ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256;
20 ssl_dhparam /etc/ssl/certs/dhparam.pem;
21 ssl_prefer_server_ciphers on;
22 # A future version of Nginx will support TLSv1.3
23 ssl_protocols TLSv1.2;
24 ssl_session_cache shared:SSL:20m;
25 ssl_session_timeout 20m;
26 ssl_stapling on;
27 ssl_stapling_verify on;
28 ssl_trusted_certificate /etc/letsencrypt/live/ronaronica.com/chain.pem;
29
30 ##
31 # Proxy Settings
32 ##
33
34 proxy_cache_path /var/www/ronaronica.com/cache/ keys_zone=one:10m inactive=60m use_temp_path=off;
35 proxy_set_header X-Real-IP $remote_addr;
36 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
37 proxy_set_header Host $http_host;
38 proxy_set_header X-Forwarded-Proto $scheme;
39 proxy_buffering off;
40
41 ##
42 # Logging
43 ##
44
45 error_log /var/log/nginx/error.log debug;