Apache 1.3.41
Ian Smith
smithi at nimnet.asn.au
Fri Mar 6 20:15:20 PST 2009
On Fri, 06 Mar 2009 20:01:09 +0100 Jos Chrispijn <jos at 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
More information about the freebsd-questions
mailing list