Linux – Haproxy cannot bind (bind) [0.0.0.0 :80] – CentOS 6. 5

Haproxy cannot bind (bind) [0.0.0.0 :80] – CentOS 6. 5… here is a solution to the problem.

Haproxy cannot bind (bind) [0.0.0.0 :80] – CentOS 6. 5

I’m running on CentOS 6.5 and actually tried to follow this tutorial on Websockets (http://socketo.me/docs/deploy) and it says 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 address of ping my domain name.
What should I do to fix this? Is it Apache? Because I restarted it and nothing.
Thank you.

Related Problems and Solutions