Advertisement
Guest User

Untitled

a guest
Jan 19th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. server {
  2. ssl_certificate /etc/nginx/ssl/domain.pem;
  3. ssl_certificate_key /etc/nginx/ssl/domain.key;
  4.  
  5. ssl_dhparam /etc/nginx/ssl/dhparam.pem;
  6.  
  7. ssl_session_cache shared:SSL:10m;
  8. ssl_session_timeout 5m;
  9.  
  10. keepalive_timeout 70;
  11.  
  12. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  13.  
  14. ssl_prefer_server_ciphers on;
  15. ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DES";
  16.  
  17. resolver 8.8.8.8 [2001:4860:4860::8888];
  18. ssl_stapling on;
  19. ssl_trusted_certificate /etc/nginx/ssl/ca.pem;
  20.  
  21. listen 443 deferred spdy ssl;
  22. listen [::]:443 deferred spdy ssl ipv6only=on;
  23.  
  24. server_name domain.net;
  25. root /www/public;
  26.  
  27. index index.html;
  28.  
  29. add_header Strict-Transport-Security max-age=31536000 always;
  30. add_header X-Frame-Options DENY;
  31. add_header Public-Key-Pins 'pin-sha256="base64+info1="; max-age=31536000' always;
  32. add_header X-Content-Type-Options nosniff;
  33. add_header X-XSS-Protection "1; mode=block";
  34.  
  35. location ~ /{favicon.ico|favicon.png|robots.txt}$ {
  36. access_log off;
  37. log_not_found off;
  38. expires 1y;
  39. add_header Cache-Control public,max-age=259200;
  40. }
  41.  
  42. location ~* \.(jpg|jpeg|png|gif|ico|css|js|mp3)$ {
  43. expires 30d;
  44. add_header Cache-Control public,max-age=259200;
  45. }
  46. }
  47.  
  48. server {
  49. listen 80 deferred;
  50. listen [::]:80 ipv6only=on;
  51.  
  52. server_name domain.net;
  53.  
  54. if ($scheme = http) {
  55. return 301 https://$server_name$request_uri;
  56. }
  57.  
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement