[Catalyst] Too greedy name-based Virtual Host

Xavier Robin robin0 at etu.unige.ch
Wed May 16 10:54:34 GMT 2007


Hello,

I'm still in trouble with virtual hosts...

We have a domain domain.tld with several machines. On one of them, 
apache can be called using http://site1.domain.tld. It is configured to 
listen to port 80 with Listen *:80.

Now we would like to bind our Catalyst app on http://site2.domain.tld on 
this machine site1. Our DNS are correctly installed and apache is 
reachable by both addresses.

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>

This works, and http://site2.domain.tld calls our Catalyst application, 
and it seems to work properly.

But strangely enough, our application is now bound also on 
site1.domain.tld ! (so all the usual pages are not reachable anymore).

How does this come ? Apache 2 documentation on Name-based Virtual 
Host[1] seems to say that it should only bind on site2...
How can I make catalyst available only on site2 ?

Best regards,
Xavier Robin

[1] http://httpd.apache.org/docs/2.0/vhosts/name-based.html

PS : Apache 2.0.52
      CentOS 4 (based on RedHat)
      mod_perl 2.0.3
      Perl 5.8.5
      Catalyst 5.008001



More information about the Catalyst mailing list