[X-Unix] Apache & ifconfig - success!

Eugene list-themacintoshguy at fsck.net
Fri Oct 22 01:58:34 PDT 2004


On Fri, Oct 22, 2004 at 01:31:52PM +1000, Pedro fp wrote:
: 
: On 21/10/2004, at 8:24 PM, Eugene wrote:
: 
: >Do you have another DirectoryIndex directive in your httpd.conf that
: >does NOT include index.php?
: 
: As it turns out I do, part of the default OS X configuration I guess ...
: 
: <IfModule mod_dir.c>
:     DirectoryIndex index.html
: </IfModule>
: 
: That entire block is repeated within the <IfModule mod_php4.c> block ...
: 
: <IfModule mod_php4.c>
:     # If php is turned on, we repsect .php and .phps files.
:     AddType application/x-httpd-php .php
:     AddType application/x-httpd-php-source .phps
: 
:     # Since most users will want index.php to work we
:     # also automatically enable index.php
:     <IfModule mod_dir.c>
:         DirectoryIndex index.html index.php
:     </IfModule>
: </IfModule>
: 
: With, as you can see, the difference being the addition of index.php

If Apache is processing the directives in order of appearance,
then the directives should be re-ordered.  Move the mod_dir.c
block *before* the mod_php4.c block.  While this still guarantees
a default setting of index.html for DirectoryIndex, it also adds
index.php if it detects PHP support.  If this works, comment out
the DirectoryIndex lines in your <VirtualHost> blocks and see if
it still works as expected.


-- 
Eugene Lee
http://www.coxar.pwp.blueyonder.co.uk/


More information about the X-Unix mailing list