u/-Yaldabaoth-

▲ 3 r/docker

How to make multiple web servers accessible on host?

In my case it's a Wordpress- and Joomla-server (both automatically running apache) connected to the same MYSQL-database, all 3 containers belonging to the same bridge network. Wordpress is set to "-p 8081:80" and Joomla on "-p 8080:80". But only Wordpress can be reached on my web browser, through localhost:8081. Localhost:8080 doesn't work, and just snaps to localhost:8081.

Is this because both containers internally listen to port 80? Shouldn't their isolation from each other prevent such collision? Either way, when I define a container port to something other than 80, such as "-p 8080:15000", the web servers can't be reached at all... Any input would be appreciated!

reddit.com
u/-Yaldabaoth- — 6 days ago