Created
October 4, 2018 20:49
-
-
Save aleshkashell/ffdf058c3c2555e4232a6fcd3bd8a008 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
server { | |
ssl_session_timeout 10m; | |
ssl_certificate {{ path_to_crt }}; | |
ssl_session_cache shared:SSL:10m; | |
server_name {{ hostname }}; | |
ssl_certificate_key {{ path_to_key }}; | |
client_max_body_size 1024m; | |
ssl on; | |
listen 443; | |
location / { | |
proxy_pass https://127.0.0.1:8443/; | |
proxy_http_version 1.1; | |
proxy_set_header Host $server_name:$server_port; | |
proxy_set_header X-Forwarded-Host $http_host; # necessary for proper absolute redirects and TeamCity CSRF check | |
proxy_set_header X-Forwarded-Scheme $scheme; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
#proxy_set_header Upgrade $http_upgrade; | |
#proxy_set_header Connection "upgrade"; | |
#proxy_set_header Host $http_host; # required for Docker client sake | |
#proxy_set_header X-Forwarded-Host $http_host; | |
#proxy_set_header X-Real-IP $remote_addr; | |
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
#proxy_set_header X-Scheme $scheme; | |
} | |
location /scripts/execution/io { | |
proxy_pass https://127.0.0.1:8443; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
#proxy_set_header Upgrade websocket; | |
proxy_set_header Connection "upgrade"; | |
proxy_read_timeout 86400; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $server_name; | |
} | |
} | |
server { | |
return 301 https://$host$request_uri; | |
server_name {{ hostname }}; | |
listen 80; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment