[nzlug] apache2 mod_vhost_alias query
Leon Matthews
nzlug at lost.co.nz
Tue Nov 28 15:47:05 NZDT 2006
> take a url like www.example.com I want to set the virtual doc root to:
> /var/www/vhosts/example.com/htdocs
One solution is to use mod_rewrite to drop the www (with a regex) if it's
present, then use mod_vhost_alias to handle the actual folder/logging/CGI
paths after that.
You could always do the whole thing with mod_rewrite of course, but that's
just asking for a self inflicted foot shooting! :-P
Cheers,
Leon
More information about the NZLUG
mailing list