February 09, 2012, 10:34:29 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Work on Kolab2/Gentoo-2.2 has stopped. The project has been deprecated (see board Kolab2/Gentoo).
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Problem starting Apache  (Read 5647 times)
jayk
Jr. Member
**

Karma: 0
Posts: 76



View Profile WWW Email
« on: June 18, 2007, 09:18:15 PM »

After just updating, I am having some trouble starting apache. I have looked through my configs and have searched the forum, but can't find what my problem is. It's probably something small I have overlooked. Here is what the output shows when I try to start apache:

Code:
* Service apache2 starting
[Mon Jun 18 14:14:40 2007] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Mon Jun 18 14:14:40 2007] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Mon Jun 18 14:14:40 2007] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
no listening sockets available, shutting down
Unable to open logs                                                                                                                                                                                    [ !! ]
 * ERROR:  apache2 failed to start

Thanks,
Jason
Logged
deephack
Newbie
*

Karma: 0
Posts: 8


View Profile
« Reply #1 on: June 22, 2007, 02:43:24 PM »

I can verify that behaviour here on my machine too.  AMD64, Gentoo 2007.0 installed on the 19th of June.

Apache/2.2.4

If anyone needs any more information I'd be happy to help.
Logged
jayk
Jr. Member
**

Karma: 0
Posts: 76



View Profile WWW Email
« Reply #2 on: June 22, 2007, 04:01:29 PM »

I did a little bit of initial checking. The Listen 80 directive used to be in the httpd.conf file and has now been moved to the default vhost file. I think this has something to do with it. I need to get in and dig around some more though.

Jason
Logged
deephack
Newbie
*

Karma: 0
Posts: 8


View Profile
« Reply #3 on: June 22, 2007, 04:40:12 PM »

Okay got a little bit further with this one.  Not sure if this is a good thing to do or not but I made the following changes.

/etc/apache2/httpd.conf
Add this line
NameVirtualHost (your ip):80

/etc/apache2/vhosts.d/11_kolab_domain.conf

Change <VirtualHost *:80> to <VirtualHost (your ip):80>

/etc/apache2/vhosts.d/12_kolab_vhosts.conf

Do the same to all the VirtualHost entries in here.

Now I have gotten rid of the "[warn] _default_ VirtualHost overlap on port 80, the first has precedence" messages but now I get this:-

Code:
* Starting apache2 ...
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                           

So not much better Smiley
Logged
deephack
Newbie
*

Karma: 0
Posts: 8


View Profile
« Reply #4 on: June 22, 2007, 09:52:26 PM »

Okay so adding the following seemed to get it up and running Smiley

/etc/apache2/httpd.conf
Listen 80
Logged
jayk
Jr. Member
**

Karma: 0
Posts: 76



View Profile WWW Email
« Reply #5 on: June 22, 2007, 11:53:55 PM »

I've been doing some messing around as well and here's how I got it to work on apache-2.2.4-r7:

I added:

Code:
Listen 80

to /etc/apache2/httpd.conf. I started apache at this point, but got the 3

Code:
[warn] _default_ VirtualHost overlap on port 80, the first has precedence

errors. I then added:

Code:
-D DEFAULT_VHOST

to the apache startup line in /etc/conf.d/apache2. This cleared the overlap errors, but apache would not start again.

I then removed:

Code:
Listen 80

from the /etc/apache2/httpd.conf file and apache starts normally. Don't ask me why the Listen 80 line had to be added and then removed. I had tried adding the default vhost to the startup line before without the Listen 80 directive in the httpd.conf and it still wouldn't start. It took adding the Listen 80 directive to httpd.conf and then removing it to get it to work. Hopefully it will  continue working. It seems kind of strange to me.

Hope this helps someone.

Jason
Logged
jayk
Jr. Member
**

Karma: 0
Posts: 76



View Profile WWW Email
« Reply #6 on: June 23, 2007, 12:22:23 AM »

I duplicated this fix on another kolab server. I tried doing things in a slightly different order and it didn't work. When I did it in the same order as my last post it worked.

Jason
Logged
deephack
Newbie
*

Karma: 0
Posts: 8


View Profile
« Reply #7 on: June 25, 2007, 02:51:41 PM »

That worked for me too.  Found a simpler way to do it though.  The reason you have to add the Listen 80 and then remove it is because Kolab overwrites your config files with the template.  If you edit

/etc/kolab/templates/conf.d-apache2.template

APACHE2_OPTS="-D DEFAULT_VHOST -D SSL -D PHP5 -D LDAP -D AUTH_LDAP -D KOLAB -D KOLAB-HORDE -D KOLAB-DAV -D DAV -D DAV_FS"

Then run kolabconf everything should work without the Listen directive.

Phew, this is really an education for me, hope that helps someone.

Logged
jayk
Jr. Member
**

Karma: 0
Posts: 76



View Profile WWW Email
« Reply #8 on: June 25, 2007, 04:42:13 PM »

That does make it easier. It should also give Gunnar what he needs to update the ebuild.

Thanks,
Jason
Logged
Gunnar Wrobel
Administrator
Sr. Member
*****

Karma: 2
Posts: 331


275141552 gunnarwrobel@yahoo.de gunnarwrobel
View Profile WWW Email
« Reply #9 on: June 27, 2007, 12:48:48 PM »

Updates are always welcome Smiley

The reason why your apache initially failed was the error "Unable to open logs". This should only happen if there are vhosts defined that use an error log path in the old syntax like

Code:
ErrorLog logs/....

The new syntax requires the full path:

Code:
ErrorLog /var/log/apache2/....
Logged
Gunnar Wrobel
Administrator
Sr. Member
*****

Karma: 2
Posts: 331


275141552 gunnarwrobel@yahoo.de gunnarwrobel
View Profile WWW Email
« Reply #10 on: July 03, 2007, 11:37:32 AM »

Hm, concerning the Listen directive I probably forgot to add the -D MULTIPLE_DOMAINS to the template for /etc/conf.d/apache2. Thanks for the report. I'll fix that today.
Logged
Gunnar Wrobel
Administrator
Sr. Member
*****

Karma: 2
Posts: 331


275141552 gunnarwrobel@yahoo.de gunnarwrobel
View Profile WWW Email
« Reply #11 on: July 03, 2007, 02:35:21 PM »

Actually I had to remove the IfDefined MULTIPLE_DOMAINS at one point. I hope this has been fixed now.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!