httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: [users@httpd] Setting/echoing a variable within a VirtualHost directive?
Date Mon, 19 Jan 2004 21:03:17 GMT

On Tue, 13 Jan 2004, James Robertson, Learning Media wrote:

> Hello
>
> Within an Apache (1.3) config file, is there any way to set and echo a
> variable within a VirtualHost directive?
>
> Eg. [The following doesn't work but hopefully shows what I am trying to
> achieve with SITE_PATH.]
>
> <VirtualHost *>
>     SetEnv SITE_PATH /Library/WebServer/test_site
>     ServerName test_site.my_server
>     DocumentRoot %{ENV:SITE_PATH}/www
>     php_value auto_prepend_file %{ENV:SITE_PATH}/php/site.php
> </VirtualHost>

No.  httpd.conf is a config file, not a programming language.  There are
plenty of programming languages designed for exactly this task; I suggest
you use one of them to preprocess the config file.  (Examples: m4, cpp,
etc).

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message