httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Devraj Mukherjee" <dev...@gmail.com>
Subject Re: [users@httpd] Use of environment variables in configuration files?
Date Sun, 27 Aug 2006 08:18:46 GMT
Thanks for that Joshua.


On 8/25/06, Joshua Slive <joshua@slive.ca> wrote:
> On 8/25/06, Devraj Mukherjee <devraj@gmail.com> wrote:
> > Hello World,
> >
> > Is it possible to environment variables such as the domain name being
> > access to adaptable Apache configuration.
> >
> > Such as
> >
> > Alias /documents /home/www/domain.com.au/documents
> >
> > Where domain.com.au could be replaced depending on what domain name
> > was accessed.
>
> Not in general, since most apache directives are resolved at
> start-time, not at request time.  But in that particular case, you can
> use mod_rewrite:
> RewriteEngine On
> RewriteRule ^/documents /home/www/%{SERVER_NAME}/documents
> (You probably want to assure that UseCanonicalName is set On in this
> case to avoid bad things happening when people supply arbitrary Host
> headers.)
>
> Joshua.
>
> ---------------------------------------------------------------------
> 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
>
>

---------------------------------------------------------------------
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