Guest User

Untitled

a guest
Apr 12th, 2018
113
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. upstream rancher {
  2. server rancher-server:8080;
  3. }
  4.  
  5. map $http_upgrade $connection_upgrade {
  6. default Upgrade;
  7. '' close;
  8. }
  9.  
  10. server {
  11. listen 443 ssl spdy;
  12. server_name XXX.XXX.com;
  13. ssl_certificate /etc/certificates/XXX.com.crt;
  14. ssl_certificate_key /etc/certificates/XXX.com.key;
  15.  
  16. location / {
  17. proxy_set_header Host $host;
  18. proxy_set_header X-Forwarded-Proto $scheme;
  19. proxy_set_header X-Forwarded-Port $server_port;
  20. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  21. proxy_pass http://rancher;
  22. proxy_http_version 1.1;
  23. proxy_set_header Upgrade $http_upgrade;
  24. proxy_set_header Connection $connection_upgrade;
  25. # This allows the ability for the execute shell window to remain open for up to 15 minutes. Without this parameter, the default is 1 minute and will automatically close.
  26. proxy_read_timeout 900s;
  27. }
  28. }
  29.  
  30. server {
  31. listen 80;
  32. server_name XXX.XXX.com;
  33. return 301 https://$server_name$request_uri;
  34. }
RAW Paste Data