1 |
Have you done an upgrade/update of apache lately? |
2 |
|
3 |
Whenever apache gets updated here, two files are recreated each time. |
4 |
If you look in /etc/apache2, it should look like this: |
5 |
|
6 |
-rw-r--r-- 1 root root 6311 Sep 2 03:23 httpd.conf |
7 |
-rw-r--r-- 1 root root 12958 Sep 8 16:52 magic |
8 |
drwxr-xr-x 2 root root 4096 Sep 8 22:50 modules.d |
9 |
drwxr-xr-x 2 root root 4096 Sep 8 16:53 ssl |
10 |
drwxr-xr-x 2 root root 4096 Sep 16 07:59 vhosts.d |
11 |
|
12 |
Reading through httpd.conf, you should find the lines: |
13 |
---- |
14 |
# Virtual-host support |
15 |
# |
16 |
# Gentoo has made using virtual-hosts easy. In /etc/apache2/vhosts.d/ we |
17 |
# include a default vhost (enabled by adding -D DEFAULT_VHOST to |
18 |
# APACHE2_OPTS in /etc/conf.d/apache2). |
19 |
Include /etc/apache2/vhosts.d/*.conf |
20 |
---- |
21 |
|
22 |
And looking through /etc/apache2/vhosts.d/, you should find all your own virtual |
23 |
servers, I name mine as per the port they use: |
24 |
|
25 |
-rwxr-xr-x 1 root root 565 Sep 1 07:55 80.conf |
26 |
-rwxr-xr-x 1 root root 368 Sep 16 07:57 8080.conf |
27 |
-rw-r--r-- 1 root root 2.8K Sep 8 16:52 default_vhost.include |
28 |
|
29 |
I don't have the two files that are recreated each time here, but they contain a |
30 |
configuration similar to the one in my 80.conf. Thus, it load my 80.conf, and |
31 |
then tries to load its own default_80.conf (or something like that) and |
32 |
conflicts since the port 80 is already in use (by another vhost). |
33 |
|
34 |
2 ways to solve this: either use those default file names for your own vhost |
35 |
configuration so portage will ask you to update /etc files interactively, or |
36 |
delete those 2 files each and every time you update apache. I have never looked |
37 |
into that but maybe by removing the option -D DEFAULT_VHOST in you |
38 |
/etc/conf.d/apache2 might do the trick also. |
39 |
|
40 |
HTH, |
41 |
Simon |
42 |
|
43 |
|
44 |
Adam Carter wrote: |
45 |
> rix adam # /etc/init.d/apache2 start |
46 |
> * Starting apache2 ... |
47 |
> (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 |
48 |
> no listening sockets available, shutting down |
49 |
> Unable to open logs [ ok ] |
50 |
> rix adam # |
51 |
> |
52 |
> The socket is not in use and log dir perms are ok, and; |
53 |
> |
54 |
> rix adam # apache2 -f /etc/apache2/httpd.conf |
55 |
> rix adam # pgrep -lf apach |
56 |
> 17740 apache2 -f /etc/apache2/httpd.conf |
57 |
> 17741 apache2 -f /etc/apache2/httpd.conf |
58 |
> 17744 apache2 -f /etc/apache2/httpd.conf |
59 |
> 17772 apache2 -f /etc/apache2/httpd.conf |
60 |
> rix adam # |
61 |
> |
62 |
> So, how do I troubleshoot this? |
63 |
> |
64 |
> |
65 |
> |
66 |
> |