Apache won't start

Questions related to the Apache server
Post Reply
Peter_w
Posts: 28
Joined: Tue Aug 19, 2008 9:28 am

Apache won't start

Post by Peter_w »

Hi,

I just installed apache on Gentoo Linux
and it won't start I get the following error messages:

Code: Select all

tail /var/log/apache2/startuperror.log
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
no listening sockets available, shutting down
Unable to open logs
I checked /etc/apache2/httpd.conf
But it is totally different then with the old version,
Now it has split up in many include files
/etc/apache2/modules.d/*.conf
/etc/apache2/vhost.d/*.conf

Code: Select all

www # /etc/init.d/apache2 -V
Gentoo Base System release 1.12.11.1
www # uname -a
Linux ---- 2.6.30-gentoo-r4 #6 SMP Thu Aug 27 22:01:51 CEST 2009 x86_64 AMD Athlon(tm) Dual Core Processor 5050e AuthenticAMD GNU/Linux
Peter_w
Posts: 28
Joined: Tue Aug 19, 2008 9:28 am

Re: Apache won't start

Post by Peter_w »

Found the problem

Apparently Listen in the vhost-configuration is not enough.
you need to add it also in /etc/apache2/httpd.conf

Code: Select all

Listen 80
Listen 81
Listen 85
(I have several virtual host for testing purpose)
Peter_w
Posts: 28
Joined: Tue Aug 19, 2008 9:28 am

Re: Apache won't start

Post by Peter_w »

Ignore my comment above, It isn't the real solution.

The virtual host files weren't read.

You need to adapt some setting:

Code: Select all

<IfDefine SITE1_VHOST>
# see bug #178966 why this is in here
in your vhost conf file. (/etc/apache2/vhosts.d/00_site1_vhost.conf)

And you also need to adapt the file:
/etc/conf.d/apache2
And change the following line

Code: Select all

APACHE2_OPTS="-D SITE1_VHOST -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D PHP5"
Or if you have several virtual hosts

Code: Select all

APACHE2_OPTS="-D SITE1_VHOST -D SITE2_VHOST -D SITE3_VHOST -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D PHP5"
Post Reply