Cofigure VirtualHost in VPS !
i'm trying to host 2 sites in my VPS using VirtualHost. but i can't configure it correctly. can any one explain how to do this. i add A records with www point to my VPS IP in both domains. and then i create 2 folders in www folder like this.
after that i place different index.html files in both locations. and i set permission using this command.
chown -R root:root /var/www/site1/public_html
chown -R root:root /var/www/site2/public_html
and after of that i edit the httpd.conf file and add this lines to the VirtualHost section.
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/site1/public_html ServerName www.site1.com </VirtualHost> <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/site2/public_html ServerName www.site2.com </VirtualHost>
but the problem is both domains are get the apache 2 test page. please anyone can help me to resolve this problem. thanks ...