[Catalyst] Too greedy name-based Virtual Host

Jonathan T. Rockway jon at jrock.us
Wed May 16 17:28:38 GMT 2007


On Wed, May 16, 2007 at 11:54:34AM +0200, Xavier Robin wrote:
>
>  Here comes the Virtual Host :
> 
>  <VirtualHost site2.domain.tld:80>
>  	ServerName    site2.domain.tld:80
>  	DocumentRoot  /home/xrobin/MIAPE/root
>  	LogLevel      debug
>  	ErrorLog      /home/xrobin/catalyst_error_log
>  	<Location />
>  		SetHandler           modperl
>  		PerlResponseHandler  MIAPE
>  	</Location>
>  </VirtualHost>

Where's the rest of the config.  Standing alone, that's probably fine.
But who knows what else you have in your httpd.conf :)

Also, I think the VirtualHost directive is supposed to be an IP (or
*):

  NameVirtualHost *:80
  <VirtualHost *:80>ServerName site1</VirtualHost>
  <VirtualHost *:80>ServerName site2</VirtualHost>

I have a feeling that your config looks like:

  NameVirtualHost site1
  <VirtualHost site1>ServerName site1</VirtualHost>
  <VirtualHost site2>ServerName site2</VirtualHost>

I think that even though site1 and site2 resolve to the same IP,
Apache doesn't realize that site2 is supposed to do vhosting.  But I
don't really know how Apache handles corner cases... try the obvious
suggestions above and if it still doesn't work, please paste your
whole config.

Regards,
Jonathan Rockway



More information about the Catalyst mailing list