Good afternoon!
I've searched through the LQ.org archives and though I have found threads detailing similar problems, I haven't found a satisfactory answer to my current quandry.
I have two domains hosted off of one IP address (1.2.3.4), and
httpd -S reports that the configuration file is successful. One domain is working just fine, as it always has, but the second virtual host isn't ever displayed -- just the first (or "default") one.
Code:
NameVirtualHost 1.2.3.4:80
<VirtualHost 1.2.3.4:80>
ServerAdmin poetics@firstdomain.com
DocumentRoot /var/www/sites/firstdomain.com
ServerName firstdomain.com
ErrorLog logs/firstdomain.com-error_log
CustomLog logs/firstdomain.com-access_log common
</VirtualHost>
<VirtualHost 1.2.3.4:80>
ServerAdmin poetics@seconddomain.com
DocumentRoot /var/www/sites/seconddomain.com
ServerName seconddomain.com
ErrorLog logs/seconddomain.com-error_log
CustomLog logs/seconddomain.com-access_log common
</VirtualHost>
I have the DNS setup correctly, with A records for both firstdomain.com and seconddomain.com both pointing to 1.2.3.4 -- however, when one browses to seconddomain.com they reach firstdomain.com
Results of httpd -S:
Code:
VirtualHost configuration:
1.2.3.4:80 is a NameVirtualHost
default server firstdomain.com (/etc/httpd/conf/httpd.conf:1019)
port 80 namevhost firstdomain.com (/etc/httpd/conf/httpd.conf:1019)
port 80 namevhost seconddomain.com (/etc/httpd/conf/httpd.conf:1027)
Syntax OK
Any suggestions?
-- Poetics