Skip to content

Instantly share code, notes, and snippets.

@guiman
Created April 28, 2015 14:20
Show Gist options
  • Save guiman/de01faae4a563d6b6ebc to your computer and use it in GitHub Desktop.
Save guiman/de01faae4a563d6b6ebc to your computer and use it in GitHub Desktop.
A description of a nginx configuration for two Docker containers
upstream demo.localhost {
server 127.0.0.1:3001;
}
server {
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
server_name demo1.localhost;
location / {
proxy_pass http://demo.localhost;
include /etc/nginx/proxy_params;
}
}
upstream demo2.localhost {
server 127.0.0.1:3002;
}
server {
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
server_name demo2.localhost;
location / {
proxy_pass http://demo2.localhost;
include /etc/nginx/proxy_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment