Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Mar 2009 15:15:16 +1100 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Jos Chrispijn <jos@webrz.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Apache 1.3.41
Message-ID:  <20090307141250.O71460@sola.nimnet.asn.au>
In-Reply-To: <20090306230528.EEB72106574F@hub.freebsd.org>
References:  <20090306230528.EEB72106574F@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 06 Mar 2009 20:01:09 +0100 Jos Chrispijn <jos@webrz.net> wrote:

 > For some reason, Apache isn't starting anymore after having my ports 
 > upgraded today. That was a major php5 upgrade and I think it might have 
 > to do something with it.

Could well be.  Others offered good suggestions re rebuilding and order 
in extensions.ini, but I did spot a couple of things in your config:

 > httpd-error.log is empty on this

Nothing in /var/log/messages either?

 > my httpd.conf:
[..]
 > LoadModule php5_module        libexec/apache/libphp5.so
[..]
 > AddModule mod_php5.c
[..]
 > DocumentRoot     "/usr/local/www"
[..]
 > <Directory "/usr/www">
 >     Options Indexes FollowSymLinks MultiViews ExecCGI Includes
 >     AllowOverride AuthConfig Limit Indexes Options FileInfo
 >     Order allow,deny
 >     Allow from all
 > </Directory>

Shouldn't that be <Directory "/usr/local/www"> ie DocumentRoot?

 > <IfModule mod_userdir.c>
 >     UserDir public_html
 > </IfModule>

As advised by Apache docs re security, it's worth adding here:
   UserDir disabled root

Ok, annotating this section:

 > <IfModule mod_dir.c>			TRUE
 >     <IfModule mod_php3.c>		FALSE
 >         <IfModule mod_php4.c>
 >             DirectoryIndex index.php index.php3 index.html
 >         </IfModule>
 >         <IfModule !mod_php4.c>
 >             DirectoryIndex index.php3 index.html
 >         </IfModule>
 >     </IfModule>

 >     <IfModule !mod_php3.c>		TRUE
 >         <IfModule mod_php4.c>	FALSE
 >             DirectoryIndex index.php index.html index.htm
 >         </IfModule>
 >         <IfModule mod_php5.c>	TRUE
 >             DirectoryIndex index.php index.html index.htm
 >         </IfModule>
 >         <IfModule !mod_php4.c>	TRUE !!! so overriding previous
 >             DirectoryIndex index.html
 >         </IfModule>
 >     </IfModule>
 > </IfModule>

The <IfModule mod_php5.c> section should come last, after !mod_php4.c, 
or index.php isn't treated as a DirectoryIndex.  I don't know if php5 
install sticks it in there or what, but I've had to fix it here before.

[..]
 > <IfModule mod_mime.c>
   [..]
 >     <IfModule mod_php3.c>
 >     AddType application/x-httpd-php3 .php3
 >     AddType application/x-httpd-php3-source .php3s
 >     </IfModule>
 >     <IfModule mod_php4.c>
 >     AddType application/x-httpd-php .php
 >     AddType application/x-httpd-php-source .phps
 >     </IfModule>
 >     <IfModule mod_php5.c>
 >     AddType application/x-httpd-php .php
 >     AddType application/x-httpd-php-source .phps
 >     </IfModule>

Looks right here.

 > NameVirtualHost *
 > 
 > include /usr/local/etc/apache/httpd.sites

Presumably unchanged/ok?

cheers, Ian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090307141250.O71460>