Apache Server configuration support - beginner's question: variable definition in apache config files?

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > September 2004 > beginner's question: variable definition in apache config files?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author beginner's question: variable definition in apache config files?
ivo welch

2004-09-28, 3:46 am

is it possible to define a variable in an apache config file? that
is, I would like to write

myapp = /home/httpd/server/html/applicationrootdir

and then say

<Directory ${myapp}/subdir>
various
</Directory>
....and many other ones like it.

I have searched for a while, but not stumbled upon this functionality.
This would make it a lot easier for me to move trees to different
servers and/or locations. Even finding out that this is not possible
would be useful. help appreciated.

/iaw
Davide Bianchi

2004-09-28, 3:46 am

On 2004-09-26, ivo welch <ivo.welch@anderson.ucla.edu> wrote:
> is it possible to define a variable in an apache config file?


AFAIK No. Unless you hack the code of Apache that read the file.
But what's the advantage in doing so?

> This would make it a lot easier for me to move trees to different
> servers and/or locations.


Then use a pre-processor to parse *your* 'config' file and produce
an ad-hoc configuration file. Sed is the first thing that pop in
my mind that could do it.

Davide

--
Virus error:
A virus has been activated in a DOS session. The virus, however, requires
Windows. All tasks will automatically be closed and the virus will be activated
again.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com