Have you done an upgrade/update of apache lately?
Whenever apache gets updated here, two files are recreated each time.
If you look in /etc/apache2, it should look like this:
-rw-r--r-- 1 root root 6311 Sep 2 03:23 httpd.conf
-rw-r--r-- 1 root root 12958 Sep 8 16:52 magic
drwxr-xr-x 2 root root 4096 Sep 8 22:50 modules.d
drwxr-xr-x 2 root root 4096 Sep 8 16:53 ssl
drwxr-xr-x 2 root root 4096 Sep 16 07:59 vhosts.d
Reading through httpd.conf, you should find the lines:
----
# Virtual-host support
#
# Gentoo has made using virtual-hosts easy. In /etc/apache2/vhosts.d/ we
# include a default vhost (enabled by adding -D DEFAULT_VHOST to
# APACHE2_OPTS in /etc/conf.d/apache2).
Include /etc/apache2/vhosts.d/*.conf
----
And looking through /etc/apache2/vhosts.d/, you should find all your own virtual
servers, I name mine as per the port they use:
-rwxr-xr-x 1 root root 565 Sep 1 07:55 80.conf
-rwxr-xr-x 1 root root 368 Sep 16 07:57 8080.conf
-rw-r--r-- 1 root root 2.8K Sep 8 16:52 default_vhost.include
I don't have the two files that are recreated each time here, but they contain a
configuration similar to the one in my 80.conf. Thus, it load my 80.conf, and
then tries to load its own default_80.conf (or something like that) and
conflicts since the port 80 is already in use (by another vhost).
2 ways to solve this: either use those default file names for your own vhost
configuration so portage will ask you to update /etc files interactively, or
delete those 2 files each and every time you update apache. I have never looked
into that but maybe by removing the option -D DEFAULT_VHOST in you
/etc/conf.d/apache2 might do the trick also.
HTH,
Simon
Adam Carter wrote:
rix adam # /etc/init.d/apache2 start
* Starting apache2 ...
(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 [ ok ]
rix adam #
The socket is not in use and log dir perms are ok, and;
rix adam # apache2 -f /etc/apache2/httpd.conf
rix adam # pgrep -lf apach
17740 apache2 -f /etc/apache2/httpd.conf
17741 apache2 -f /etc/apache2/httpd.conf
17744 apache2 -f /etc/apache2/httpd.conf
17772 apache2 -f /etc/apache2/httpd.conf
rix adam #
So, how do I troubleshoot this?