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@example.com 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 firstname.lastname@example.org 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: