1

When I want to start my apache server, it shows me this error:

Starting httpd:

(98) Address already in use: make_sock: could not bind to address [::]:80

(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

[FAILED]

My httpd.conf file:

Listen 8181

As you can see, I have deleted everything else. Still, Apache wants to bind to port 80 which is used by varnish. Any idea how to solve it?

1 Answers1

1

First thing to rule out:

  • Apache is using another config file than the one you expect.

Do the following:

  1. Kill whichever httpd process you have running
  2. Start Apache in foreground with explicit conf file /sbin/httpd -f /etc/httpd/conf/httpd.conf -DFOREGROUND

Second thing:

  • Check which other config files are loaded by your httpd.conf

    grep Include /etc/httpd/conf/httpd.conf

  • Find out which of the loaded config files that have Listen directives defined.

    grep -r Listen /etc/httpd/

Some Listen directive somewhere must be hiding from you.