nginx-ssl.conf 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name editoria.figli.io;
  5. return 301 https://$server_name$request_uri;
  6. }
  7. server {
  8. listen 443 ssl;
  9. listen [::]:443 ssl;
  10. server_name editoria.figli.io;
  11. charset utf-8;
  12. location = /favicon.ico { access_log off; log_not_found off; }
  13. location = /robots.txt { access_log off; log_not_found off; }
  14. access_log on;
  15. # error_log /var/logs/nginx/editoria.figli.io/error.log;
  16. sendfile off;
  17. client_max_body_size 100m;
  18. #SSL Certificates
  19. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  20. ssl_certificate "/etc/letsencrypt/live/editoria.figli.io/fullchain.pem";
  21. ssl_certificate_key "/etc/letsencrypt/live/editoria.figli.io/privkey.pem";
  22. ssl_dhparam /etc/nginx/ssl/certs/editoria.figli.io/dhparam.pem;
  23. ssl_session_cache shared:SSL:1m;
  24. ssl_session_timeout 10m;
  25. ssl_ciphers HIGH:!aNULL:!MD5;
  26. #ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
  27. ssl_prefer_server_ciphers on;
  28. add_header Strict-Transport-Security "max-age=31536000;
  29. #includeSubDomains" always;
  30. location ~ /\.ht {
  31. deny all;
  32. }
  33. location / {
  34. proxy_pass http://127.0.0.1:9005;
  35. proxy_set_header Host $host;
  36. proxy_connect_timeout 30;
  37. proxy_send_timeout 30;
  38. }
  39. # website should not be displayed inside a <frame>, an <iframe> or an <object>
  40. add_header X-Frame-Options SAMEORIGIN;
  41. }