Last active
August 29, 2015 14:26
-
-
Save gtwalford/fb5942b7f4b0da6321da 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
#Get IP for docker container from hosts file | |
upstream {{upstreamName}} { | |
#container name / corresponding to hosts file | |
server {{containerName}}; | |
} | |
server { | |
listen 80; | |
server_name example.com; | |
location / { | |
proxy_pass http://{{upstreamName}}; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
#Add Auth if needed | |
#auth_basic "Restricted"; | |
#auth_basic_user_file /etc/nginx/.htpasswd; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment