Skip to content

jlaso/docker-nginx-reverseproxy-domain-name

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Nginx reverse proxy demo by domain name

This is a very simple POC trying to demostrate how to integrate several containers in production and solve the right container by domain name.

The containers should have to share the folder, they are all put together here in order to demonstrate the whole thing easily.

The only trick is to share networks and hostnames in order to redirect internally (proxy) the requests to the right container.

To see the demo in action:

Start a docker machine with

docker-machine create --driver=virtualbox TEST

enter into the machine with eval $(docker-machine env TEST)

you can start containers launching ./up.sh

and down them with ./down.sh

before see how it works you need to create hosts in your /etc/hosts file, like that

192.168.99.100	one.web.dev
192.168.99.100	two.web.dev

being 192.168.99.100 the IP that the docker-machine command gave you

finally to see the results just go in the browser to:

http://one.web.dev/

and

http://two.web.dev/

About

POC to demonstrate how a reverse proxy in nginx can be configured to serve different containers in the same machine.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published