James T. Studebaker wrote:
> I have been trying to set up the apache 2 web server on a Linux machine to
> respond to a number of virtual hosts. The problem is that when I enter the
> domain of the virtual host I want to connect the internet explorer to the
> apache server responds to the default site instead of the desired virtual
> host site.
>
> System
> Linux 8 with network card set for ip address 192.168.0.2
> Apache 2 came with Linux distribution
> A single ip address on a belkin router
> Router directs port 80 to LAN ip 192.168.0.2
>
> Apache virtual host configuration
>
> <VirtualHost 192.168.0.2:80>
> ServerAdmin jtsbaker.DeleteThis@comcast.net
> DocumentRoot /var/www/html
> </VirtualHost>
>
> <VirtualHost 192.168.0.2:80>
> ServerName jtsbaker.homedns.org
> ServerAdmin jtsbaker.DeleteThis@comcast.net
> DocumentRoot /home/jtsbaker/html_public
> </VirtualHost>
>
> Does anyone have any suggestions.
>
>
You need to add NameVirtualHost 192.168.0.2
if you don't it'll just use the first reference you make to 192.168.0.2
for all your domains.
Regards
Jeroen<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: virtual host configuration difficulties