You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by David Reid <dr...@jetnet.co.uk> on 2000/01/04 22:41:10 UTC

Config

This is a crazy off the wall idea that struck me yesterday.

At present we have a huge httpd.conf file that has sections for any
eventuality that may be needed.  Now that's fine but when a new user comes
along and tries to configure the server it's not very helpful and may even
have directives from modules that haven't been included.  the result is
often confusion and that leads to a bad taste which leads to, well we all
know what happens!

This idea (and as I've said it might be crazy) is that we actually build the
httpd.conf file as part of the config process.  Basically we strip out
everything that isn't core to Apache from the existing file and store it as
part of the distribution as the base from which we build.

When we add a module via the config process, if that module has any
configuration directives/switches etc then it also supplies a mod_foo.conf
file that is appended to our basic conf file to make that servers
configuration file specific to the build.

This could be extended to the MPM's so that the only info in the conf file
are the lines that are required for the MPM actually being used.  Even
further and any OS specific variables could be done in the same way.
Examples would be the user/group that for a few platforms don't need to be
set and in fact need to be commented out.

With all the work being done on the config system then maybe this is worth a
moment or two's thought as it could be built in at this early stage.

Hey ho, just an idea.

david


Re: Config

Posted by David Reid <ab...@dial.pipex.com>.
There's nothing to prevent us having a series of sample configuration files
as we presently do.

d.
----- Original Message -----
From: "Manoj Kasichainula" <ma...@io.com>
To: <ne...@apache.org>
Sent: Tuesday, January 04, 2000 9:53 PM
Subject: Re: Config


> On Tue, Jan 04, 2000 at 09:41:10PM -0000, David Reid wrote:
> > This idea (and as I've said it might be crazy) is that we actually build
the
> > httpd.conf file as part of the config process.  Basically we strip out
> > everything that isn't core to Apache from the existing file and store it
as
> > part of the distribution as the base from which we build.
>
> Sounds interesting. It's nice to have example configs for all modules
> in the default file, though.
>
> I'm +0.9 on doing this for existing modules. And it would be very
> useful to do for external modules.
>


Re: Config

Posted by Manoj Kasichainula <ma...@io.com>.
On Tue, Jan 04, 2000 at 09:41:10PM -0000, David Reid wrote:
> This idea (and as I've said it might be crazy) is that we actually build the
> httpd.conf file as part of the config process.  Basically we strip out
> everything that isn't core to Apache from the existing file and store it as
> part of the distribution as the base from which we build.

Sounds interesting. It's nice to have example configs for all modules
in the default file, though.

I'm +0.9 on doing this for existing modules. And it would be very
useful to do for external modules. 


Re: Config

Posted by David Reid <ab...@dial.pipex.com>.
How many of these exist?  Surely the configuration directives are defined by
one module or another?  I'd say that in some ways this is more of a
documentation/education issue.

Good point though.

d.
----- Original Message -----
From: "Martin Kraemer" <Ma...@Mch.SNI.De>
To: <ne...@apache.org>
Sent: Friday, January 07, 2000 1:01 PM
Subject: Re: Config


> On Tue, Jan 04, 2000 at 09:41:10PM -0000, David Reid wrote:
> > When we add a module via the config process, if that module has any
> > configuration directives/switches etc then it also supplies a
mod_foo.conf
> > file that is appended to our basic conf file to make that servers
> > configuration file specific to the build.
>
> The problem I see with this is the fact that often configurations depend
> on more than one module. And then, where would you put things which are
> configured only if, say, mod_mime AND mod_negotiation AND mod_rewrite
> are present?
>
>     Martin
> --
>   <Ma...@MchP.Siemens.De>      |       Fujitsu Siemens
>        <ma...@apache.org>              |   81730  Munich,  Germany


Re: Config

Posted by Eli Marmor <ma...@elmar.co.il>.
Manoj Kasichainula wrote:
> 
> On Sat, Jan 08, 2000 at 06:45:12PM +0200, Eli Marmor wrote:
> > By the way: If we are, in any case, into the issue of improving the
> > organization of httpd.conf, what about joining the httpd.conf-dist-win
> > version into the httpd.conf-dist version, using IfDefine WIN32 ?
> 
> > If there is nobody to prepare this patch, I volunteer.
> >
> > What is your opinion?
> 
> Well, I'd like to see what the patch looks like. :) -0 for 1.3 (more
> reshuffling of the 1.3 tree), +0 (until I see the patch) for 2.0.

By volunteering, I meant for 1.3.?, because I'm not experienced with
2.0 yet, and I'm afraid to break things because of my "ignorance"
with 2.0. I feel much more comfortable with 1.3, and can do it
easily.

Alternatively, we can do it for both trees. If this is the case, I
can prepare something against 1.3.10, and one of you will replicate
the ideas into 2.0.

P.S.  I must admit that I even didn't take a look at the httpd.conf
of 2.0; Maybe it's simple like the one of 1.3, and I can patch it
exactly as 1.3.
-- 
Eli Marmor

Re: Config

Posted by Manoj Kasichainula <ma...@io.com>.
On Sat, Jan 08, 2000 at 06:45:12PM +0200, Eli Marmor wrote:
> By the way: If we are, in any case, into the issue of improving the
> organization of httpd.conf, what about joining the httpd.conf-dist-win
> version into the httpd.conf-dist version, using IfDefine WIN32 ?

> If there is nobody to prepare this patch, I volunteer.
> 
> What is your opinion?

Well, I'd like to see what the patch looks like. :) -0 for 1.3 (more
reshuffling of the 1.3 tree), +0 (until I see the patch) for 2.0.

Re: Config

Posted by Eli Marmor <ma...@elmar.co.il>.
By the way: If we are, in any case, into the issue of improving the
organization of httpd.conf, what about joining the httpd.conf-dist-win
version into the httpd.conf-dist version, using IfDefine WIN32 ?

Currently, there is a severe anomaly, which leads to maintainance
problems, to fixes in the httpd.conf-dist which are not done in the
WIN version, and to other annoying problems.

I'm aware of the fact that the size of httpd.conf-dist will become a
little bigger than currently, but it will be much smaller than the
total size of both files together. In addition, most of the default
definitions are similar, and in any case, some of the WIN32 unique
things (such as the usage of backslash instead of slash) were already
modified to fit to the standard conventions.

About a month ago, I discussed this issue with some WIN32 users of
Apache, as well as one module developer, and all of them expressed a
strong "+1".

Since it doesn't involve any change in the sources (or, at most,
addition of "-D WIN32"), I believe that it can be prepared even for
1.3.10 (of course, assuming that there is nobody against it).

If there is nobody to prepare this patch, I volunteer.

What is your opinion?
-- 
Eli Marmor

Re: Config

Posted by David Reid <ab...@dial.pipex.com>.
This sounds like it's something we perhaps try to do anyway.  The organic
growth of inter-dependencies isn't helpful in a well structured environment,
and makes the life of people administrating servers harder.

If we decide to try the config idea then it'll probably highlight these
dependencies and so help us decide if there's a problem and then how to fix
it?

d.
----- Original Message -----
From: "Eli Marmor" <ma...@elmar.co.il>
To: <ne...@apache.org>
Sent: Friday, January 07, 2000 1:21 PM
Subject: Re: Config


> Martin Kraemer wrote:
> >
> > On Tue, Jan 04, 2000 at 09:41:10PM -0000, David Reid wrote:
> > > When we add a module via the config process, if that module has any
> > > configuration directives/switches etc then it also supplies a
mod_foo.conf
> > > file that is appended to our basic conf file to make that servers
> > > configuration file specific to the build.
> >
> > The problem I see with this is the fact that often configurations depend
> > on more than one module. And then, where would you put things which are
> > configured only if, say, mod_mime AND mod_negotiation AND mod_rewrite
> > are present?
>
> Well, it's not the best way, but you always can have the general file
> (httpd.conf), a file for mod_mime, a file for mod_negotiation, a file
> for mod_rewrite, and A FIFTH FILE, call it as you want, and include it
> from httpd.conf by nested "IfModule".
>
> The real question is regarding to directives which are meaningful for
> more than one module. We must decide if a directive in a file specific
> to one module, is honored by another module, or if it affects only the
> specific module. If we chose the former way, then module writers must
> prefix their directives by the name of the module, to avoid conflicts
> (of course, asuming that there are no conflicts between the names of
> the modules, which can be avoided by using the modules registry).
>
> I don't say that current names of directives should be changed; Only
> new names, to avoid conflicts.
>
> --
> Eli Marmor


Re: Config

Posted by Eli Marmor <ma...@elmar.co.il>.
Martin Kraemer wrote:
> 
> On Tue, Jan 04, 2000 at 09:41:10PM -0000, David Reid wrote:
> > When we add a module via the config process, if that module has any
> > configuration directives/switches etc then it also supplies a mod_foo.conf
> > file that is appended to our basic conf file to make that servers
> > configuration file specific to the build.
> 
> The problem I see with this is the fact that often configurations depend
> on more than one module. And then, where would you put things which are
> configured only if, say, mod_mime AND mod_negotiation AND mod_rewrite
> are present?

Well, it's not the best way, but you always can have the general file
(httpd.conf), a file for mod_mime, a file for mod_negotiation, a file
for mod_rewrite, and A FIFTH FILE, call it as you want, and include it
from httpd.conf by nested "IfModule".

The real question is regarding to directives which are meaningful for
more than one module. We must decide if a directive in a file specific
to one module, is honored by another module, or if it affects only the
specific module. If we chose the former way, then module writers must
prefix their directives by the name of the module, to avoid conflicts
(of course, asuming that there are no conflicts between the names of
the modules, which can be avoided by using the modules registry).

I don't say that current names of directives should be changed; Only
new names, to avoid conflicts.

-- 
Eli Marmor

Re: Config

Posted by Martin Kraemer <Ma...@Mch.SNI.De>.
On Tue, Jan 04, 2000 at 09:41:10PM -0000, David Reid wrote:
> When we add a module via the config process, if that module has any
> configuration directives/switches etc then it also supplies a mod_foo.conf
> file that is appended to our basic conf file to make that servers
> configuration file specific to the build.

The problem I see with this is the fact that often configurations depend
on more than one module. And then, where would you put things which are
configured only if, say, mod_mime AND mod_negotiation AND mod_rewrite
are present?

    Martin
-- 
  <Ma...@MchP.Siemens.De>      |       Fujitsu Siemens
       <ma...@apache.org>              |   81730  Munich,  Germany