Advertisement
Guest User

nginx unraid problem

a guest
May 20th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name headphones.DOMAIN.ch;
  4.  
  5. # tell users to go to SSL version this time
  6. if ($ssl_protocol = "") {
  7. rewrite ^ https://$server_name$request_uri? permanent;
  8. }
  9. }
  10.  
  11. server {
  12. listen 443 ssl;
  13. server_name headphones.DOMAIN.ch;
  14.  
  15. # tell users to go to SSL version next time
  16. add_header Strict-Transport-Security "max-age=15768000; includeSubdomains;";
  17.  
  18.  
  19. # tell the browser we can only talk to self and google analytics.
  20. add_header X-Content-Security-Policy "default-src 'self'; \
  21. script-src 'self' https://ssl.google-analytics.com; \
  22. img-src 'self' https://ssl.google-analytics.com";
  23.  
  24. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  25.  
  26.  
  27. # ciphers chosen for forward secrecy an compatibility
  28. 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 !DSS";
  29.  
  30.  
  31. ssl_prefer_server_ciphers on;
  32. ssl_certificate_key /config/keys/privkey.pem;
  33. ssl_certificate /config/keys/fullchain.pem;
  34.  
  35. ssl_session_cache shared:SSL:10m;
  36. ssl_session_timeout 10m;
  37.  
  38.  
  39.  
  40. # redirect to node for the dynamic stuff
  41. location / {
  42. proxy_pass http://192.168.178.200:8181;
  43. proxy_http_version 1.1;
  44. proxy_set_header Upgrade $http_upgrade;
  45. proxy_set_header Connection "upgrade";
  46. proxy_set_header Host $host;
  47. proxy_hide_header X-Powered-By;
  48. }
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement