Q. How do I fix an error, while restarting Apache ~ Address already in use: make_sock: could not bind to port 80?

Advertisement

A. If you are running SELinux disable temporary for port 80.

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

First make sure port 80/443 is not used by any other service or application with netstat command:

# netstat -tulpn| grep :80

If port 80 is bind to httpd, kill all process:
# killall -9 httpd

Now start the httpd:
# /etc/init.d/httpd start

Also make sure you are root while starting the httpd.

🥺 Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🤠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

35 comments… add one
  • Yakup Öztürk Dec 18, 2015 @ 7:35

    Thank you my friend. You solved my problem

    • Vikram Jan 28, 2016 @ 10:16

      This error is possible due to many reasons. one of the is as below.

      If you have configured your apache with a listen address that is hitting 80 or 443 and if there is a duplicate entry in the same file, you would see this issue.
      Ex: Listen marsp1uat01-indianrails.com:80 (You see if this is configured more than once in the same .conf file)
      So, just remove the duplicate entry, save the .conf file and try to start it.

  • Savaş karahan May 9, 2016 @ 11:41

    Thank you Frend

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.