Centos Virtual host loading default page

Posted by ntechi on Server Fault See other posts from Server Fault or by ntechi
Published on 2011-02-11T05:01:13Z Indexed on 2011/02/11 7:27 UTC
Read the original article Hit count: 605

Filed under:
|

I have asked a question which was related to this but not same,

I have a centos VPS, which has two wordpress websites, one is mbas.co.in and another is onlinemba123.com, now for virtual hosting using just ONE IP ADDRESS, first I started mbas.co.in, which is working fine, when I added onlinemba123.com then, it is loading default Centos page instead of my website, and I am just testing my onlinemba123 website, I haven't configured DNS for it, I am testing it through editing my PC's hosts file,

My website folder names are also same as in the conf file below

Now my question is how can I load my website instead of Default page, is my virtual host config fine?

My virtual host config:

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/www.mbas.co.in
    ServerName mbas.co.in
    ErrorLog logs/mbas.co.in-error_log
    CustomLog logs/mbas.co.in-access_log common
</VirtualHost>
<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/www.onlinemba123.com
    ServerName www.onlinemba123.com
    ErrorLog logs/onlinemba123-error_log
    CustomLog logs/onlinemba123-access_log common
</VirtualHost>

My computers host file is:

xx.xxx.xxx.xxx  www.onlinemba123.com

© Server Fault or respective owner

Related posts about centos

Related posts about virtualhosts