Portal Home > Knowledgebase > Articles Database > Apache IP based virtual hosts not working


Apache IP based virtual hosts not working




Posted by Cyberkiller, 10-04-2012, 12:15 AM
Server has two IPs, fresh centos min install. Apache is working, both ips load Apache test page. both www.domain.com and domain.com resolve to second IP. I'd like for the first IP (192.168.0.1) to load Apache test page, this is working fine I want the second IP (192.168.0.2) to load a website in /home/site/www Currently when we goto domain.com or www.domain.com or 2nd IP it loads apache test page instead of the site, here's our config. Also I have the IPs listed as 192 instead of the real ips. What am I missing? Why isn't 192.168.0.2 loading /home/site/www instead of the Apache test page?

Posted by Cyberkiller, 10-04-2012, 12:58 AM
The Fix chcon -R --reference=/var/www /home/site/www

Posted by BestServerSupport, 10-05-2012, 01:15 AM
Please make sure that there is a default page like index.php OR index.html file exists in document root path DocumentRoot /home/site/www for your domain name. Also, DocumentRoot /home/site/www should have readable rights to Apache. Restart Apache service and try again.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Cloudflare sucks ! (Views: 615)
question aboud mod_qos (Views: 574)