You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Joseph Bridgewater <Jo...@austintx.net> on 1998/12/22 22:30:24 UTC

Re: FW: general/3563: I want to allow the definition and use of macros within runtime configuration files.

If some people want pre-processing to be performed to come up with a
resultant config file before Apache loads it's config file, why not just
run some external command - whatever suits your fancy - to do whatever
pleases you to generate standard Apache config files just before executing
Apache?

It isn't always possible to invoke an external program prior to running
Apache such as in the case of starting Apache as an NT service.  Perhaps
Apache could simply be modified to optionally run (an) external command(s)
just prior to loading the config file(s)?  

It might be tricky to tell Apache what (the) command(s) is/are since at
that time, by definition, there is no configuration. A potential solution
that should be convenient to all platforms might be a simple text file
could contain (the) command(s) that is/are to be passed up to the command
processor.  The file could be required to have a particular name such as
GenConf.txt or a like name that is designed to be convenient for all
platforms (it is extremely inconvenient to win32 platforms when a file has
no extension, and .txt is very easy to use).  The file could be required to
be located in the same directory where the Apache executable was.  If a
person doesn't want any pre-processing, that file could be either
non-existent or just empty.  For new installations, perhaps there should be
an empty file there by default to help them be fully clued-in.  It might be
nice if such a file support comments.

This doesn't explicitly help somebody who wants to do _no_ programming
outside of (non-existent) Apache config macros, but it does provide
everybody a simple and powerful option.

Perhaps there are security concerns about having a file with external
commands that will be run when Apache starts?


At 07:48 PM 12/22/98 +0100, Fabien COELHO wrote:
>
>> The problem I'd see w/ integrated macros is that they'd mean that existing
>> Apache configurations became more complicated (add another set of ways of
>> doing things).  Going forward with a new system, there'd be some presure
>> to maintain compatibility with the old systems -- and adding macros means
>> much more might be needed to support them. 
>
>I don't think that macro processing is that a big deal.
>
>When you'll have a new system that solve my little maintenance copy-paste
>problems I'll sure be really happy to use it. But I'm looking for a
>good "solution" *now*, not for a perfect "abstraction" to come *some* day.
>
>> I believe there's at least one group working on a GUI for Apache
>> administration...
>
>What Graphical-UI has to do with it? 
>
>I'm happy with text configuration files, I'm even happy with the html-like
>syntax. I just want to reduce their size and improve their readability,
>not at the price of perl or python programming. My GUI is emacs and its
>okay, provided that I avoid copy-pasting all the time.
>
>Fabien.

Re: FW: general/3563: I want to allow the definition and use of macros within runtime configuration files.

Posted by Ben Laurie <be...@algroup.co.uk>.
Joseph Bridgewater wrote:
> 
> At 10:37 PM 12/22/98 +0000, Ben Laurie wrote:
> >Joseph Bridgewater wrote:
> >> It isn't always possible to invoke an external program prior to running
> >> Apache such as in the case of starting Apache as an NT service.  Perhaps
> >> Apache could simply be modified to optionally run (an) external command(s)
> >> just prior to loading the config file(s)?
> >
> >Sure - why fix one operating system when you can fix 1000 apps instead?
> >
> >Cheers,
> >
> >Ben.
> 
> So you're saying that you plan to fix the OS?   Which 1000 apps are you
> referring to?  Are you saying anything constructive here at all, or are you
> simply trying to be argumentative?

What I'm saying (crypticly) is that this strikes me as something generic
which would be better implemented outside Apache. It seems to me that
the natural place is in the OS.

What was in my mind was that under Unix the equivalent is the rc*.d
stuff, which can trivially run "external commands" before reading the
config file.

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686| Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org/
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author     http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache/

Re: FW: general/3563: I want to allow the definition and use of macros within runtime configuration files.

Posted by Joseph Bridgewater <Jo...@austintx.net>.
At 10:37 PM 12/22/98 +0000, Ben Laurie wrote:
>Joseph Bridgewater wrote:
>> It isn't always possible to invoke an external program prior to running
>> Apache such as in the case of starting Apache as an NT service.  Perhaps
>> Apache could simply be modified to optionally run (an) external command(s)
>> just prior to loading the config file(s)?
>
>Sure - why fix one operating system when you can fix 1000 apps instead?
>
>Cheers,
>
>Ben.

So you're saying that you plan to fix the OS?   Which 1000 apps are you
referring to?  Are you saying anything constructive here at all, or are you
simply trying to be argumentative?

Re: FW: general/3563: I want to allow the definition and use of macros within runtime configuration files.

Posted by Ben Laurie <be...@algroup.co.uk>.
Joseph Bridgewater wrote:
> It isn't always possible to invoke an external program prior to running
> Apache such as in the case of starting Apache as an NT service.  Perhaps
> Apache could simply be modified to optionally run (an) external command(s)
> just prior to loading the config file(s)?

Sure - why fix one operating system when you can fix 1000 apps instead?

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686| Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org/
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author     http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache/