Reputation: 11
I am trying to configure the apache load balancer on the docker container with enabled exposing port 80:80. Even load balancer configuration has been updated in load balancer config file with proper ips. Since the whole setup is working in same subnet they all are connected to each other. I am using wordpress image for web server , MySQL image for db and centos image for load balancer,even the firewall rule to masquerade has been done and port to enabled...Pls help
Error ...Why is it going to port 8080 even though I have configured 80 in loadbalancer file
Upvotes: 1
Views: 607
Reputation: 1176
As I can see here, you are trying to access 172.17.0.4:8080
on the browser. And IP 172.17.0.4
corresponds to the container wpos2
. Now since you had not exposed the port 8080
of this container so the request is not being served from the browser.
Instead, you should try accessing the load balancer container lb1
using the public IP of your host machine.
Try this: <HOST_IP>:80
This will hit your load balancer and from there the request will be redirected to one of the two servers: wpos
or wpos2
and you should probably get your request served.
Upvotes: 1