Bug 92028 - DirectoryIndex index.php in php.conf overwritten by httpd.conf
DirectoryIndex index.php in php.conf overwritten by httpd.conf
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: php (Show other bugs)
9
All Linux
medium Severity low
: ---
: ---
Assigned To: Joe Orton
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-31 17:25 EDT by Tomasz Ostrowski
Modified: 2007-04-18 12:54 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-02 05:28:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomasz Ostrowski 2003-05-31 17:25:11 EDT
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:
Comment 1 Joe Orton 2003-06-02 05:28:48 EDT
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?
Comment 2 Tomasz Ostrowski 2003-06-02 07:38:40 EDT
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...
Comment 3 Joe Orton 2003-06-02 07:55:14 EDT
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
Comment 4 Tomasz Ostrowski 2003-06-02 08:40:10 EDT
OK: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20414

Thanks.

Note You need to log in before you can comment on or make changes to this bug.