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

This is a discussion on beginner's question: variable definition in apache config files? within the Apache Web Server forums, part of the Web Server and Related Forums category; is it possible to define a variable in an apache config file? that is, I would like to write myapp = /...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-26-2004
ivo welch
 
Posts: n/a
Default beginner's question: variable definition in apache config files?

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
  #2 (permalink)  
Old 09-26-2004
Davide Bianchi
 
Posts: n/a
Default Re: beginner's question: variable definition in apache config files?

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.
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:33 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0