You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by David R Boldt <db...@usgs.gov> on 2002/02/07 00:20:24 UTC

an Include for
I am packaging the Apache Web server software for distribution
within the USGS Water Resources Division, which has over 100
Web servers.

Our Intranet, for various reasons, takes several dozen allow and 
deny statements to define.  This information has to be repeated 
several times for each Web server to wall off appropriate directories 
as being internal.

Given this environment is very difficult to make modifications to 
our intranet definition.  I was excited and then disappointed with
the Include statement  ... as it promised to let me place this 
information in a separate file, which I might then have some hope 
of being able to update.  Alas it can't be used in the exact context 
that I need it..  inside of <Directory statements.

.htaccess files have the drawback that each local site also needs
to include additional special "allows" for clients that they deal with,
and there is no way I know of to use multiple access files.   ... and
if I allow local updates, then I can't update the file.

                                          -- David Boldt
                                             <db...@usgs.gov>

Re: an Include for Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 6 Feb 2002, David R Boldt wrote:

> Given this environment is very difficult to make modifications to
> our intranet definition.  I was excited and then disappointed with
> the Include statement  ... as it promised to let me place this
> information in a separate file, which I might then have some hope
> of being able to update.  Alas it can't be used in the exact context
> that I need it..  inside of <Directory statements.
>

There has long been a strong resistance to "creaping featurism" in the
config language.  The developers see no reason to make the config language
turing-complete when a simple preprocessor will do the job.

The standard advice (and I consider it good advice) is to use a
preprocessor like m4.  This is designed to do exactly the job you want,
without adding extra complexity to Apache.  If you don't like m4, there
are plenty of other alternatives, ranging from cpp to creative use of
sed/awk/cat.

If you really need something built-in to apache, several people have
written extensions.  I don't think mod_define does what you want, but
"acpp" might:
http://www.apache.org/dist/httpd/contrib/misc/

I have no idea if it will compile with the current code base.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org