|
Home > Archive > Apache Server configuration support > July 2006 > aliasing to a variable?
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 |
aliasing to a variable?
|
|
| todd.prickett@gmail.com 2006-07-13, 7:24 pm |
| Hi,
I have a series of releases that I'd like to be able to alias to in my
httpd.conf file.
For example (simplified example):
c:\projects
+
+-- release1
+-- htmlcontent
+-- styles
+-- downloads
+-- release2
+-- htmlcontent
+-- styles
+-- downloads
As I change back and forth from release to release, I'd like to be able
to set a single variable at the top of my config that could be used in
the httpd.conf to change my virtual directories.
So, I'd have something like:
Alias /someUrl "C:/projects/release1/htmlcontent"
Alias /someOtherUrl "C:/projects/release1/styles"
Alias /yetAnotherUrl "C:/projects/release1/downloads"
Then, when the next release comes along I have to change to
Alias /someUrl "C:/projects/release2/htmlcontent"
Alias /someOtherUrl "C:/projects/release2/styles"
Alias /yetAnotherUrl "C:/projects/release2/downloads"
I'd like to be able to do something like:
SetEnv somevariable = "C:/projects/release2"
Alias /someUrl "${ somevariable }/htmlcontent"
Alias /someOtherUrl "${ somevariable }/styles"
Alias /yetAnotherUrl "${ somevariable }/downloads"
How do I do this (either directly or using a work around)?
TIA
| |
| Davide Bianchi 2006-07-14, 7:28 am |
| On 2006-07-13, todd.prickett@gmail.com <todd.prickett@gmail.com> wrote:
> to set a single variable at the top of my config that could be used in
> the httpd.conf to change my virtual directories.
>
> SetEnv somevariable = "C:/projects/release2"
> Alias /someUrl "${ somevariable }/htmlcontent"
> Alias /someOtherUrl "${ somevariable }/styles"
> Alias /yetAnotherUrl "${ somevariable }/downloads"
>
> How do I do this (either directly or using a work around)?
The only way I know is to use a preprocessors to replace the bits you
want in the configuration file and then start apache. You could
use something like 'make' or another search-and-replace utility.
Davide
--
If someone else can run arbitrary code on your computer without your
permission, it's not YOUR computer any more.
-- unknown
| |
| todd.prickett@gmail.com 2006-07-17, 1:21 pm |
| Thanks Davide!
Davide Bianchi wrote:
> The only way I know is to use a preprocessors to replace the bits you
> want in the configuration file and then start apache. You could
> use something like 'make' or another search-and-replace utility.
>
> Davide
|
|
|
|
|