Re: [modcfgldap-users] Ldap Vhost DocumentRoot problem ...
Status: Beta
Brought to you by:
abrenk
From: Allie M. <al...@pa...> - 2004-09-03 14:49:28
|
> It seems that DocumentRoot variable is not updated. > I've tried to read this variable inside a php script. I abandoned using modcfgldap for this very reason :( This appears to be a limitation set by apache itself and that variable is not change-able. This behavior also shows up using the mass VirtualHosting module. I modified apache's source to change this behavior, and Bad Things Happened. Because my installation only has apache dealing with a few hundred VirtualHosts at a time, using this external module turned out to be a pretty expensive operation compared to using conf files. Even with caching set to a high value, the dependency on LDAP and and the frequent queries made it all rather cumbersome. I suspect that if I were running thousands of vhosts then a module like this would "pay for itself" by using less memory. So I ended up deciding to do this in my httpd.conf: Include vhosts.conf And I run a script out of cron to generate the vhosts.conf file using the LDAP data and reload apache if necessary. Works pretty well and is much more flexible. DocumentRoot is set properly and I can also set other Apache and PHP variables in the generated file (logfile directives, open_basedir, temp_dir, include_dir, user and group, etc.) Allie Micka pajunas interactive, inc. http://www.pajunas.com open source web applications and hosting |