Friday, June 13, 2014

Doing this by following official documentation is more confusing. 
I looked up many places and tried many combinations and finally foll. worked for me. 

Task: Keep your current apache localhost server alive and add a new site1.local server that has DocumentRoot at /home/vaibhav/mysite

1. Edit /etc/apache2/httpd.conf and add foll lines: 


   DocumentRoot "/var/www"
   ServerName localhost

   DocumentRoot "/home/vaibhav/mysite"
   ServerName site1.local

2. Next edit /etc/hosts file and add foll line:    site1.local

3. Now restart apache server as : 
sudo /etc/init.d/apache2 restart

4. Check out your virtual site as : 

Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © Point Element -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -