Question

im running on CentOS 6.5 and actually trying to follow this tutorial (http://socketo.me/docs/deploy) on Websocket which says that I need to install Haproxy and run the following linux command :

sudo haproxy -f /etc/haproxy.cfg -p /var/run/haproxy.pid -D

The problem is that I get this message :

[ALERT] 015/013939 (22640) : Starting frontend public: cannot bind socket [0.0.0.0:80]

My "netstat -nat | grep 80 | grep LISTEN" returns :

tcp        0      0 212.227.96.81:80            0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:8880                0.0.0.0:*                   LISTEN
tcp        0      0 2001:8d8:86c:6e00::14:3b:80 :::*                        LISTEN
tcp        0      0 :::8880                     :::*                        LISTEN
tcp        0      0 :::7080                     :::*                        LISTEN

PS : 212.227.96.81 is the IP adress that pings on my domain name. What should I do exactly to resolve this ? Is it apache ? Because I restarted it and nothing. Thank you.

Was it helpful?

Solution

your web server is listing on port 80

tcp        0      0 212.227.96.81:80            0.0.0.0:*                   LISTEN

you need to change the Apache/webserver port to a different one. you can't bind haproxy and Apache on the same port on the same server

client send request to port 80 ---> HA-PROXY--->send request to apache (port 8080).

asssuming both running on the same server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top