nanoninja / docker-nginx-php-mysql

Docker running Nginx, PHP-FPM, MySQL & PHPMyAdmin
1.76k stars 867 forks source link

Multiple instances serving wrong content #29

Open Harti opened 6 years ago

Harti commented 6 years ago

I have multiple instances of the containers in docker-compose.yml running in the same docker network (because I'm serving multiple applications by reverse proxying).

I noticed that, from the 2nd web container instance onward, it will always reference the 1st php FPM container and thus serve webpage 1. I tried setting the port in ./etc/php/php.ini and ./etc/nginx/default.template.conf from 9000 to 9001, respectively, and exposed port 9001 on the php container - to no avail.

How can I run multiple of these container networks without them interfering with each other? What's the best practice for running a reverse proxy like https://github.com/SteveLTN/https-portal with this repo?

Thanks in advance!