Guest User

Nginx TLS

a guest
Feb 28th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. #After your listen, server name and ssl certificate
  2. #Site with following configuration: https://www.ssllabs.com/ssltest/analyze.html?d=cellarium.org https://securityheaders.io/?q=cellarium.org&followRedirects=on
  3. ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305';
  4. #for compatibility
  5. # ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305: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';
  6. ssl_ecdh_curve secp521r1:secp384r1;
  7. ssl_prefer_server_ciphers on;
  8. ssl_session_cache shared:SSL:32m;
  9. ssl_buffer_size 8k;
  10. ssl_session_timeout 60m;
  11. ssl_session_tickets off;
  12. ssl_stapling on;
  13. ssl_stapling_verify on;
  14. resolver 9.9.9.9 valid=300s;
  15. resolver_timeout 5s;
  16. add_header X-Frame-Options "SAMEORIGIN";
  17. add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; ";
  18. add_header Content-Security-Policy "default-src https: data: 'unsafe-inline' 'unsafe-eval'" always;
  19. add_header X-Xss-Protection "1; mode=block" always;
  20. add_header X-Content-Type-Options "nosniff" always;
  21. add_header 'Referrer-Policy' 'no-referrer';
  22. add_header Expect-CT 'enforce; max-age=3600';
Add Comment
Please, Sign In to add comment