httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] mod_vhost_alias dynamic configuration of other variables
Date Thu, 06 Jul 2006 11:42:28 GMT
On 7/6/06, Roel van Meer <> wrote:
> Hi list,
> I'm using mod_vhost_alias for dynamic virtual hosting. I would like to add
> some configuration statements whose value should be based on the virtual
> host that is actually being accessed. More precisely: I would like to use
> the value of VirtualDocumentRoot as value for another configuration
> variable. Is this possible?
> <VirtualHost a.b.c.d:80>
>     VirtualDocumentRoot /var/www/html/%0
>     ServerAdmin
>     ServerName
>     config-statement <VirtualDocumentRoot>  <-- can something like
>                                               this be accomplished?
> </VirtualHost>
> What I am actually trying to do is setting the value of php's
> open_basedir config variable to the documentroot of the virtual host.

This can't be done with mod_vhost_alias, as far as I know.  You can,
on the other hand, add a bunch of <Directory> sections (one for each
vhost) that set the appropriate open_basedir.  But obviously that
removes much of the simplicity of mod_vhost_alias zero-configuration
addition of vhosts.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message