Bug 76274 - GUI apache configuration tool writes bad DirectoryIndex directive
Summary: GUI apache configuration tool writes bad DirectoryIndex directive
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: redhat-config-httpd
Version: 8.0
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-18 23:37 UTC by Raul Acevedo
Modified: 2015-03-05 01:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-10-29 14:14:16 UTC
Embargoed:


Attachments (Terms of Use)

Description Raul Acevedo 2002-10-18 23:37:01 UTC
Description of Problem:
If I modify the apache config with the GUI tool, hitting http://www.foo.com/
won't work, I have to explicity hit http://www.foo.com/index.html.  This is
because the GUI tool writes the following line:

DirectoryIndex 

I.e. it doesn't actually give it a value!  I had to manually change httpd.conf
to say

DirectoryIndex index.html

for it to work.

Version-Release number of selected component (if applicable):


How Reproducible:


Steps to Reproduce:
1. Nautilus Start Here -> Server Settings -> HTTP Server.
2. Save any changes.  In my case I'm using a simple virtual host setup.
3. Use mozilla and go to http://www.yourservername.com/.

Actual Results:
You get /var/www/error/noindex.html.

Expected Results:
I should get /var/www/html/yourservername.com/index.html.  (That's where I put
my doc root.)

Additional Information:
Manually changing DirectoryIndex to say index.html works fine.  However, the GUI
tools is really quite nice, and it'd be great if this simple fix were made.

Also, if anyone cares to say... where does the GUI tool get its httpd.conf
template?  It would be nice to be able to modify that, for the options it can't
modify itself.

Comment 1 Mike Pepe 2002-11-06 21:05:29 UTC
I can verify this as true. Upgraded to 8.0 and my old httpd.conf was no longer
valid. The redhat-config-httpd tool builds a config file where the
DirectoryIndex directive is empty, resulting in all http accesses to the system
returning the default test page. The problem only manifests itself when you
create a virtual host other than the default one. Should be an easy fix. Adding
the entry that raul mentioned cures the problem. (Note: I think the
apache config tool's data lives in /etc/alchemist/namespace/apache but I don't
know if that is true or not)

Comment 2 J. Lucha 2002-12-04 01:35:29 UTC
The files in /etc/alchemist/namespace/apache are binary files, and it would seem
are not editable.  I did find /usr/share/apacheconf/httpd.conf.xsl which appears
to be a httpd.conf file wrapped in what I believe is XML.  Maybe that is the
file used by redhat-config-httpd for its default values.  It would be nice to
know for sure.

Comment 4 Phil Knirsch 2003-10-29 14:14:16 UTC
OK, i've checked with the latest version that'll be out via rawhide real soon
now and there it works nicely.

Concerning the question about the template file, thats "fairly" simple: r-c-h
uses internally a XML representation of the configuration. Parsing a httpd.conf
file was out of the question when we designed the tool quite some time ago as
it's really a mess to parse correctly.

So all configuration things are stored in

  /etc/alchemist/namespace/redhat-config-httpd

where you can find a local.adl and a rpm.adl (btw, the alchemist is our XML
backend software). The rpm.adl contains the 'default' setup which we ship and
which is used as a basis for the configuration. All local changes are stored in
local.adl. Both files are gziped XML files so can be manually edited.

From the final XML configuration the httpd.conf file is generated using the Xslt
Processor of 4Suite. The xslt file for the configuration can be found here:

  /usr/share/redhat-config-httpd/httpd.conf.xsl

It uses only fairly simple Xslt style things as anything else gets fairly messy
in Xslt.

Thats about it. Just in case you wondered how r-c-h creates the config file. :-)

Read ya, Phil


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