Last active
November 26, 2017 18:37
-
-
Save chvanikoff/b3874fac74f32bb1019820e69891feac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream rancher { | |
server rancher-server:8080; | |
} | |
map $http_upgrade $connection_upgrade { | |
default Upgrade; | |
'' close; | |
} | |
server { | |
listen 443 ssl http2; | |
server_name <SERVER_NAME>; | |
ssl_certificate /etc/letsencrypt/live/<DOMAIN>/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/<DOMAIN>/privkey.pem; | |
location / { | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Forwarded-Port $server_port; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://rancher; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection “Upgrade”; | |
# 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. | |
proxy_read_timeout 900s; | |
} | |
} | |
server { | |
listen 80; | |
server_name <SERVER_NAME>; | |
return 301 https://$server_name$request_uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment