Adam Carter a écrit :
On Sunday 28 September 2008 09:26:06 pm 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?
I just did a google search
<SNIP> something else is bound to port 80.
As stated above - socket 80 is not in use (according to netstat). If there was,
"apache2 -f /etc/apache2/httpd.conf" would also fail, would it not?
Can you please post the output of grep -r Listen /etc/apache2 ... This
might help :) IMHO, i think that wehn you start apache manually, you do
not define DEFAULT_VHOST which add a Listen 80 directive, so try to
start apache manually with the same command line arguments as the init
script did it...
HTH.
Xav'
Do a "ps -A | grep apache" and see if a stray daemon is
running around... I
I did that, there were no apache processes running.
not then go to /etc/apache2/vhosts.d and make sure both config files
are "pointing" to the same host that apache is running on...
Again, if the config was broken then I'd expect # apache2 -f
/etc/apache2/httpd.conf to also fail.
I'd say the problem is related to how the gentoo stuff starts the daemon, or
maybe conf.d/apache2, but nothing below looks unusual to me;
rix apache2 # grep ^[^#] /etc/conf.d/apache2
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D
PHP5"
CONFIGFILE=/etc/apache2/httpd.conf