Created
December 16, 2016 11:58
-
-
Save robhammond/e7edf8dfb1e68914ea23cb478296f254 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 myapp { | |
server 127.0.0.1:8082; | |
} | |
server { | |
listen 80; | |
server_name example.com; | |
location / { | |
proxy_set_header X-Request-Base https://$host/myapp; | |
rewrite ^/myapp/?(.*)$ /$1 break; | |
proxy_pass http://myapp; | |
proxy_read_timeout 300; | |
proxy_buffering off; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-HTTPS 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment