I am newbie in docker, I was trying to understand & implement apache reverse proxy on one container and pass the request to application containers respectively
I have one AWS EC2 machine, on which I have installed docker. Now I have 3 containers running.i,e Apache reverse proxy container, and two app containers. I have bound apache container port with my EC2 machine’s port 80 and App1 and App2 are bounded in 8080 and 8081 respectively on the Host machine. Also, I have register one domain and it is attached to my EC2 machine.
Currently domain-name:8080/info.php this is working, it is redirecting to my App1 container
domain-name:8081/info.php this is redirecting to App2 container.
All the Proxy configuration is done correctly. From my reverse proxy container, I am able to ping other two app containers and access the application.But I am not able to route the external request from apache (reverse proxy )container to my respective app containers
Right Now I access application domain-name:8080/info.php (i.e port based redirection :8080/info.php)
Depending upon port it is redirecting to apps container. It is not passing through the reverse proxy container.Hence I want to implement Path-based redirection
http://domain-name/abc This should reach client1 container’s app
http://domain-name/pqr This should reach client2 container’s app
Stuck with the path based routing.I have tried using Apache rewrite module but don’t know whether it is a correct way to implement also read about HAproxy container