Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  1. server {
  2. listen 80 default_server;
  3. listen [::]:80 default_server;
  4. # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
  5. return 301 https://$host$request_uri;
  6. }
  7. server {
  8. listen 443 ssl http2;
  9. listen [::]:443 ssl http2;
  10. # certs sent to the client in SERVER HELLO are concatenated in ssl_certificate
  11. ssl_certificate /etc/letsencrypt/live/gubcsigergely.info/fullchain.pem;
  12. ssl_certificate_key /etc/letsencrypt/live/gubcsigergely.info/privkey.pem;
  13. ssl_session_timeout 1d;
  14. ssl_session_cache shared:SSL:50m;
  15. ssl_session_tickets off;
  16. # modern configuration. tweak to your needs.
  17. ssl_protocols TLSv1.2;
  18. ssl_ciphers
  19. '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';
  20. ssl_prefer_server_ciphers on;
  21. # OCSP Stapling --- fetch OCSP records from URL in ssl_certificate and cache them
  22. ssl_stapling on;
  23. ssl_stapling_verify on;
  24.  
  25. resolver 8.8.8.8;
  26. server_name gubcsigergely.info;
  27. location / {
  28. proxy_set_header X-Real-IP $remote_addr;
  29. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  30. proxy_set_header Host $http_host;
  31. proxy_set_header X-NginX-Proxy true;
  32. proxy_pass http://127.0.0.1:3000/;
  33. proxy_redirect off;
  34. proxy_http_version 1.1;
  35. proxy_set_header Upgrade $http_upgrade;
  36. proxy_set_header Connection "upgrade";
  37. proxy_redirect off;
  38. proxy_set_header X-Forwarded-Proto $scheme;
  39. }
  40. }
  41. server {
  42. listen 443 ssl http2;
  43. listen [::]:443 ssl http2;
  44. # certs sent to the client in SERVER HELLO are concatenated in ssl_certificate
  45. ssl_certificate /etc/letsencrypt/live/krisztigulyas.com/fullchain.pem;
  46. ssl_certificate_key /etc/letsencrypt/live/krisztigulyas.com/privkey.pem;
  47. ssl_session_timeout 1d;
  48. ssl_session_cache shared:SSL:50m;
  49. ssl_session_tickets off;
  50. # modern configuration. tweak to your needs.
  51. ssl_protocols TLSv1.2;
  52. ssl_ciphers
  53. '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';
  54. ssl_prefer_server_ciphers on;
  55. # OCSP Stapling --- fetch OCSP records from URL in ssl_certificate and cache them
  56. ssl_stapling on;
  57. ssl_stapling_verify on;
  58.  
  59. resolver 8.8.8.8;
  60. server_name krisztigulyas.com;
  61. location / {
  62. proxy_set_header X-Real-IP $remote_addr;
  63. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  64. proxy_set_header Host $http_host;
  65. proxy_set_header X-NginX-Proxy true;
  66. proxy_pass http://127.0.0.1:8000/;
  67. proxy_redirect off;
  68. proxy_http_version 1.1;
  69. proxy_set_header Upgrade $http_upgrade;
  70. proxy_set_header Connection "upgrade";
  71. proxy_redirect off;
  72. proxy_set_header X-Forwarded-Proto $scheme;
  73. }
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement