You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Coranth Gryphon <gr...@healer.com> on 1999/01/13 21:53:23 UTC

config/3663: suggestion for restructuring *.conf files

>Number:         3663
>Category:       config
>Synopsis:       suggestion for restructuring *.conf files
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          change-request
>Submitter-Id:   apache
>Arrival-Date:   Wed Jan 13 14:10:01 PST 1999
>Last-Modified:
>Originator:     gryphon@healer.com
>Organization:
apache
>Release:        1.3.3
>Environment:
[Generic configuration suggestion]
>Description:
I read that you are planning to combine access.conf and srm.conf
into just one httpd.conf file. I have an alternate suggestion on
how to break up *.conf files in future releases.
>How-To-Repeat:

>Fix:
1) Put all server config directives in 'httpd.conf'
This would also have the "ResourceConfig" entries for each _virtualhost_.conf
(see below). Or a new directive
             VirtualConfig addr[:port] file
which would be the equivalent of
             {VirtualHost addr[:port]} Include file {/VirtualHost}
 
2) Put all common directives (for base and all virtual sites) in 'common.conf'
These would be things that rarely are virtual site specific
(eg. AddIcon, AddLanguage, Expires*, RLimit*), but may still be overridden
by individual VirtualHosts.

3) Put all virtual server directives for the base machine in 'default.conf'
4) Put all other virtual host directives in their own '_virtualdom_.conf' files.
These latter two would usually only have things like ServerAdmin, ServerName,
DocumentRoot, Log paths, ScriptAlias, etc. The _virtualhost_ files would be
named whatever the sysadmin wants, and rely on the "VirtualConfig" directive.

This allows for easy configuration of basic requirements and a clear separation
between what is Virtually-overridable and what is daemon-specific. It also
allows for each '_virtualdom_.conf' file to be owned by the appropriate uid for
the webmaster for that virtual site, thus not requiring access to httpd.conf.

As a final advantage, a command-line wizard can now be written to simplify
setup of Apache by both the machine's sysadmin and each virtual webmaster.
I wrote one of these for FreeBSD a year ago, but the config file format
was changing too rapidly to keep it ported. I would be happy to write a
generic one (with API) for the Apache project, mapped to the above split.

-coranth [gryphon@healer.com]
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]