# Multiple webservers with docker / docker-compose

**URL:** <https://forums.docker.com/t/multiple-webservers-with-docker-docker-compose/45567>\
**Category:** General\
**Tags:** docker\
**Created:** [February 1, 2018, 11:07am UTC](https://forums.docker.com/t/multiple-webservers-with-docker-docker-compose/45567 "2018-02-01T11:07:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raphaelcasimir](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/raphaelcasimir/32/18731_2.png) [@raphaelcasimir](https://forums.docker.com/u/raphaelcasimir)\
**Post date:** [February 1, 2018, 11:07am UTC](https://forums.docker.com/t/multiple-webservers-with-docker-docker-compose/45567/1 "2018-02-01T11:07:19Z")

</div>

Hello,  
I have a problem to get multiple webservers running on my self-hosted server.  
I have first a working architecture using docker-compose to run nextcloud, and I want to run a second webserver, on a different subdomain.

If I run a second reverse proxy of course it doesn’t allow me to bind the port 80 as it is already in use by the first one. If I try to put the webserver on the proxy-tier network (where the first reverse proxy is) in a docker-compose, it puts automatically a prefix in front of the network name (compose\_folder\_name\_proxy-tier) so this doesn’t work either.

Do you have any idea on how I can achieve the multiple webservers **without breaking my current working nextcloud architecture**?

Here is an overview of the architecture, the red container is the one that I want to add. I know that the reverse proxy should be in front of everything, but in this case how can it work with containers in docker-compose ?

![network_pb](https://global.discourse-cdn.com/docker/original/3X/b/7/b784d39b3f10ccad4878b141789b7142db087791.png)

Thanks in advance for your help.

---

<div class="post-metadata">

**Author:** ![wdijkerman](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/wdijkerman/32/17091_2.png) [@wdijkerman](https://forums.docker.com/u/wdijkerman)\
**Post date:** [February 4, 2018, 7:44am UTC](https://forums.docker.com/t/multiple-webservers-with-docker-docker-compose/45567/2 "2018-02-04T07:44:15Z")

</div>

Are you familiar with tools like Traefic ([https://traefik.io/](https://traefik.io/)) and Kong ([https://getkong.org/](https://getkong.org/))? What you can do - I haven’t tested them lately so just giving an idea - is to add one of these tools and run them on port 80. Based on the vhost/url you can then either forward it to the new “nginx webserver” or to the “reverse-proxy”.

As you already said that you can’t run a 2nd container on port 80, then you have to add a sharing container, a container that is used by both servers.

Or, add a 2nd IP to the host and bind one container on ip 1, the 2nd container on the 2nd ip and both are able to run on port 80.

Good luck!
