Quantcast
Channel: LowEndTalk
Viewing all articles
Browse latest Browse all 39981

Cofigure VirtualHost in VPS !

$
0
0

hi frnds,

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.

/var/www/site1/public_html
/var/www/site2/public.html

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 webmaster@site1.com DocumentRoot /var/www/site1/public_html ServerName www.site1.com </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@site2.com 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 ... :/


Viewing all articles
Browse latest Browse all 39981

Trending Articles