Last active
March 28, 2017 16:39
-
-
Save mreis1/1a6f2bf4e02682f8bc6856e3995e47e2 to your computer and use it in GitHub Desktop.
nginx-configuration-samples
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
docker-gen is able to generate a nginx configuration | |
https://github.com/jwilder/docker-gen/blob/master/templates/nginx.tmpl |
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
events { | |
worker_connections 1024; | |
} | |
http{ | |
server { | |
server_name localhost; | |
listen 80; | |
location / { | |
proxy_pass http://127.0.0.1:8081; | |
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; | |
} | |
location ~ /app2 { | |
rewrite /app2(.*) /$1 break; | |
proxy_redirect off; | |
proxy_pass http://192.168.0.112; | |
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; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment