[users@httpd] VirtualHost confusion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It has been a longtime since I have needed to use <VirtualHost>'s and now my
ignorance has caught up with me.

I have a two domain names (domain1.com and domain2.net) that I am trying to
host on the same machine with VirtualHost, however, I'm not having much
luck.

Background:
Apache2 running on RHEL 3 ES Update 6.

VirtualHost snippet from /etc/httpd/conf/httpd.conf
----------------------------------------------------------

NameVirtualHost <ip-address>:80

<VirtualHost <ip-address>>
        ServerName www.domain2.net
        ServerAdmin webmaster@xxxxxxxxxxx
        DocumentRoot /var/www/html/domain2
        ServerAlias www.domain2.net domain2.net
</VirtualHost>

<VirtualHost <ip-address>>
        ServerName www.domain1.com
        ServerAdmin webmaster@xxxxxxxxxxx
        DocumentRoot /var/www/html
        ServerAlias www.domain1.com domain1.com
</VirtualHost>

----------------------------------------------------------

Of the different variations of this section I have read in books and other
posts, this appears to be the most common setup.

Here's my problem:

When I try to access either domain from my web browser (Firefox 1.0.7), I
can only see the pages for domain1.com.  If I go to domain2.net, I am served
the pages for domain1.com.  Thus far, I am stumped.  I managed to create
configuration files that served no pages, errors, one but not the other, but
never successfully both.  This current configuration is the best I have come
up with so far.

I own both of these domains and the DNS for these domains are pointing to
the correct IP address, as indicated by getting something when I enter
either address.

Any help would be very much appreciated.  

Thanks!!
Adam R.  



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux