in reply to Re: VHosting large number of domains(50+), mod-perl
in thread VHosting large number of domains(50+), mod-perl

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

Replies are listed 'Best First'.
Re: Re: Re: VHosting large number of domains(50+), mod-perl
by BUU (Prior) on Oct 06, 2003 at 19:17 UTC
    Hrm.. virtualhost wild cards? Can you elaborate please?