From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529 Description of problem: DirectoryIndex index.php directive in php.conf file is overwritten by httpd.conf. The comment "Add index.php to the list of files that will be served as directory indexes." is untrue and misleading: DirectoryIndex directive overwrites list of index files - not adds them. It's makes it hard to find the cause of not working index.php. Version-Release number of selected component (if applicable): php-4.2.2-17 How reproducible: Always Steps to Reproduce: 1. Install php package with default httpd.conf. 2. Create directory /var/www/php 3. Create file /var/www/php/index.php with line <?php phpinfo() ?> 4. Check page http://localhost/php/ Actual Results: Directory index forbidden Expected Results: phpinfo() page Additional info:
The DirectoryIndex list does accumulate, this sounds like a configuration or permissions error. Note that /var/www/php is not mapped into the URL space by default; do you mean /var/www/html/php?
Oops - it does accumulate in "server config" context but when set in "virtual host" or "directory" context for the first time it's overwritten (second time accumulate). Try the following: 1. With clear system with httpd and php create /etc/httpd/conf.d/_localhost.conf: <VirtualHost localhost> ServerName localhost DocumentRoot /var/www/localhost DirectoryIndex index.htm </VirtualHost> 2. Create file /var/www/localhost/index.php: <?php phpinfo() ?> 3. apachectl restart 4. Check page http://localhost/ There's not a word about accumulating DirectoryIndex in Apache documentation http://httpd.apache.org/docs-2.0/mod/mod_dir.html#directoryindex I think this is unsupported feature. Maybe it was added by RedHat...
It's an undocumented feature, and it's worked like that in Apache httpd 1.3 for quite a long time, we don't patch it in. The current merging behaviour is arguably correct, so we wouldn't patch it to change the behaviour. Can you file an enhancement request at: http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2.0
OK: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20414 Thanks.