> I have installed Debian 2.2r2 and now trying to put
> more IP based virtual hosts. I have used
> the VirtualHost directives, and gave the IP number
> to each site. But when I tried to look on the Virtual host
> site, it brings the primary site.
> 
> I will appreciate, if I get information about how to setup 
> VirtualHost on 2.2r2.
> 
> Abu Umair.
> 

Be sure that you have a NameVirtualHost directive before your
<VirtualHost> and be sure you have your Listen directive set to the
IP(s)/ports you are listening on

basically use something like:

Listen 192.168.1.1:80
Listen 192.168.1.2:80
Listen 192.168.1.1:443

NameVirtualHost 192.168.1.1:80

<VirtualHost foo.bar.com:80>
    ServerName foo.bar.com
    ServerAdmin [EMAIL PROTECTED]
    DocumentRoot /www/bar
</VirtualHost>

NameVirtualHost 192.168.1.2:80

<VirtualHost www.abc.com:80>
    ServerName www.abc.com
    ServerAdmin [EMAIL PROTECTED]
    DocumentRoot /www/abc
</VirtualHost>

You can have multiple VirtualHost directives under each NameVirtualHost
directive if you want to share IPs between domains. You can substitute
names that DNS can translate to IPs in the NameVirtualHost directives if
you prefer.

This is a very short example and there are a lot more options I would
add to my virtual domains if I were you.

Pete


Reply via email to