Skip to content
Advertisement

Running virtual hosts in apache docker container

I have two php applications in the same apache container and I’m trying to run one of them on a port since it needs to be accessible via a root domain and not a subfolder.

I want to run the application on port 8060 which I’ve tried doing using apache virtual hosts but it won’t load the page (http://192.168.99.100:8060/) it just says connection refused. However the normal root ip – http://192.168.99.100 works fine. My docker file is as follows

JavaScript

My apache configuration

JavaScript

Any help would be greatly appreciated.

Advertisement

Answer

Thanks to @David Maze I found the problem I added the listen directives to the top of my apache configuration and changed the port numbers.

docker-compose.yml

JavaScript

Apache config

JavaScript

Directory structure

JavaScript

Dockerfile

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement