Will adding Apache Virtual host on var/www/ not affect the site already exisiting in var/www/?

Posted July 16, 2014 2.7k views

I already have a wordpress site running and working in var/www in Ubuntu 12.04. If I add a server block at /var/www/… will it affect the currently existing site in /var/www/?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
4 answers

what about putting /var/www site into /var/www/ and then have /var/www/ for the new one?

The existing site is actually live and very important. I am just weighing the risk of adding a new virtual host. :)

or you can put the new site in /var/www2/ or something like that
dont forget to add the directory to the www-data group

I never thought of that… I always assumed all site files should be in /var/www/ . I’ll try that.

Btw, this is the guide I’m using. I was able to do this on a different droplet before. But that one was setup like /var/www/ , /var/www/ etc.

by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one domain off of a single IP address and allows you to run multiple sites off of a single DigitalOcean droplet. This tutorial describes how to set up virtual hosts with Apache.