It is better to put the alternative hosts in their own <VirtualHost> block if you are going to use mod_rewrite with them. Otherwise, you get the performance hit of mod_rewrite with every hit on the "real" site.
<VirtualHost 123.123.123.123> ServerName foo.com ServerAlias www.foo.com ... </VirtualHost> <VirtualHost 123.123.123.123> ServerName other.foo.com ServerAlias bar.com ServerAlias www.bar.com ServerAlias quux.com ServerAlias www.quux.com ... RewriteEngine on # RewriteCond not necessary anymore RewriteRule ... </VirtualHost>
That said, I must say that I hate typing in all those domains and prefer wildcards, when possible :)
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
In reply to Re: Re: VHosting large number of domains(50+), mod-perl
by Juerd
in thread VHosting large number of domains(50+), mod-perl
by BUU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |