Friday, January 15, 2016

Apache Address already in use: make_sock: could not bind to port 80 error and solution



Apache Address already in use: make_sock: could not bind to port 80 error and solution

I was getting following error while starting apache
============================


CT-5080444-bash-4.1# /etc/init.d/httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
 
==============================

To fix this issue:



First make sure port 80/443 is not used by any other service or application with netstat command:
========
root@srv2 [~]# netstat -tulpn| grep :80


If port 80 is bind to httpd, kill all process:
  
root@srv2 [~]# killall -9 httpd

Now start the httpd:

root@srv2 [~]# /etc/init.d/httpd start

Also make sure you are root while starting the httpd.

=======

No comments:

Post a Comment