Created
June 14, 2013 22:17
-
-
Save metalivedev/5785719 to your computer and use it in GitHub Desktop.
Nginx config to proxy docker on localhost
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
add this to your /etc/nginx/sites-enabled/default | |
location /docker/ { | |
proxy_pass http://localhost:4243/; | |
} | |
In context: | |
server { | |
#listen 80; ## listen for ipv4; this line is default and implied | |
#listen [::]:80 default ipv6only=on; ## listen for ipv6 | |
root /usr/share/nginx/www; | |
index index.html index.htm; | |
# Make site accessible from http://localhost/ | |
server_name localhost; | |
disable_symlinks off; | |
location / { | |
# First attempt to serve request as file, then | |
# as directory, then fall back to index.html | |
try_files $uri $uri/ /index.html; | |
# Uncomment to enable naxsi on this location | |
# include /etc/nginx/naxsi.rules | |
} | |
location /docker/ { | |
proxy_pass http://localhost:4243/; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment