httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject RE: httpd.conf changes?
Date Mon, 20 Nov 2000 01:43:18 GMT
> From: Rich Bowen
> Sent: Sunday, November 19, 2000 3:40 PM
> I've heard complaints, and had a few difficulties myself, 
> with regard to httpd.conf. These complaints are on two fronts:
> 1) Although it is great to have such copious comments that any moron can
> pick up the file and figure out what they need to change, if you've been
> running Apache for a few years, those comments just become a nuisance.
> Wouldn't it be nice to have a trimmed-down httpd.conf file that was more
> signal, less noise?

This is pretty simple to fix, in an unambigious way.  Consider the following
section of code:

## HostnameLookups: Log the names of clients or just their IP addresses
#  e.g., (on) or (off).
#  The default is off because it'd be overall better for the net if people
#  had to knowingly turn this feature on, since enabling it means that
#  each client request will result in AT LEAST one lookup request to the
#  nameserver.
HostnameLookups Off

Consider a perl parser that simply strips out every line containing a single
pound (#), but leaves every line prefixed with two pound symbols (##).  This
strips the .conf file down to a reasonable size without any headache.

This leaves the 'expert' with this:

## HostnameLookups: Log the names of clients or just their IP addresses
HostnameLookups Off

Much terser, and more attractive for some users.

> 2) The organization of the file is somewhat confusing. Directives that
> are related do not necessarily appear together, and the directives that
> you are most likely to change in a basic installation (ServerName,
> ServerAdmin, Port, etc) are buried deep in the file. Perhaps either a
> reorganization, or at least a table of contents, would be helpful.

Not a bad idea... taking it one step further, now that we support config
directories, consider the idea of splitting the server functions into a
number of files by topic.  Here, a line #>section could direct the following
lines into their own file within the conf/httpd.d directory

> I raised these points on the docs list, and Ken was quick to point out
> that the organization of the file was done after much deliberation by a
> number of people who know Apache very well. (I think I used the word
> "random", which was a great exaggeration.)

Agreed that we aught to look at one bit at a time, and then we could make
progress rather quickly.  I have no problem if that discussion occurs on
the apache-docs list, and those of us who care can subscribe (I just did.)
Some will view it as useless noise on new-httpd.

> Suggestions that have been made are: To provide a
> file, which contains the bare minimum of comments. To provide a
> /samples/ subdirectory of conf, containing examples of how one might
> accomplish various things. To slightly rearrange the file to move
> commonly-changed directives to the top where they are easily 
> accessible.

---1.  The vote is a veto, and the concept is a nightmare.  As the one
who last brought 1.3.x httpd.conf-dist into sync with httpd.conf-dist-win,
we have too many conf files already to maintain.

> I've attached a httpd.conf file which is essentially what I use on my
> installations, because it removes a lot of the comments that are no
> longer helpful to me, and moves some of the directives around so that
> the placement makes more sense to me.

This would be a good template to decide which .conf lines should retain a
single #, and which should be promoted to ##.  Rewording is fine.

> Comments?


For 2.0 I'm seriously contemplating the <IfDef Win32> ... <IfDef Unix>
mechanism to simplify the conf files (Unix, by definition, being any
module which is built on the os/unix tree, as opposed to a custom tree.)

Let's bring things back together, and use either simple scripts or the
apache .conf parser to break them apart for specific users' preferences.


View raw message