From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3.1) Gecko/20030425 Description of problem: I create two name-based virtual servers (no default server), WWW.A.COM and WWW.B.COM. I specify a basic working configuration, including specifying DirectoryIndex for both virtual servers as "index.php index.html index.htm, index.shtml". On save, the DirectoryIndex tag is not generated for the second virtual server, and as such the generated httpd.conf is invalid. A visit to http://www.a.com/ will work, http://www.b.com/ will generate the apache test page, whilst http://www.a.com/index.html and http://www.b.com/index.html both will work. Version-Release number of selected component (if applicable): redhat-config-httpd-1.0.1-18 How reproducible: Always Steps to Reproduce: 1.Set up a default web server using the tool 2.Create two name-based virtual servers (no default server) 3.Specify any working configuration 4.Save and exit the tool 5.View httpd.conf to compare output transcript below 6.Run apache to confirm results. Actual Results: The first vserver works fine, the second does not. It appears as though the config tool is not adding the DirectoryIndex tag for the second virtual server as it should. An example broken output is: ======================================== # Virtual host www.a.com <VirtualHost 203.<snip>> DocumentRoot /var/www/html/a/ ErrorLog logs/error_log-a ServerName www.a.com ServerSignature off TransferLog logs/access_log-a DirectoryIndex index.php index.html index.htm index.shtml TransferLog logs/access_log-a ErrorLog logs/error_log-a LogLevel debug HostNameLookups off </VirtualHost> # Virtual host www.b.com <VirtualHost 203.<snip>> DocumentRoot /var/www/html/b ErrorLog logs/error_log-b ServerName www.b.com ServerSignature off TransferLog logs/access_log-b TransferLog logs/access_log-b ErrorLog logs/error_log-b LogLevel debug HostNameLookups off </VirtualHost> ============================================= The end result is that a visit to http://www.a.com/ works, http://www.b.com/ returns the apache test page (reporting error access forbidden by rule), and http://www.b.com/index.html works. Expected Results: You will note that the DirectoryIndex tag for the second vserver is missing! This is despite my directly specifying a DirectoryIndex for the second vserver using the tool. Additional info: To fix this error I simply needed to add the following line to the second vserver config in httpd.conf: "DirectoryIndex index.html index.php, index.htm, index.shtml" or something to that effect. It is also interesting that ErrorLog and TransferLog are written in twice, but I have not experimented with it enough to confirm it is a separate bug.
I've noticed that redhat-config-httpd adds the following to httpd.conf: # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # # The index.html.var file (a type-map) is used to deliver content- # negotiated documents. The MultiViews Option can be used for the # same purpose, but it is much slower. # DirectoryIndex The problem is that since there are no default DirectoryIndex files defined, the only files used to index are the ones explitly added in each <VirtualHosts> entry. This wouldn't be so bad except that no DirectoryIndex entries are added to the VirtualHost unless the list differs from the default list. So every time one wants to add a VirtualHost they have edit the "Directory Page Search List" to differ from the default just to get them added.
*** This bug has been marked as a duplicate of 89947 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.