Will adding Apache Virtual host on var/www/new-domain.com/public_html not affect the site already exisiting in var/www/?

July 16, 2014 2.3k 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/new-domain.com/public_html… will it affect the currently existing site in /var/www/?

4 Answers

what about putting /var/www site into /var/www/domain.com and then have /var/www/new-domain.com 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/site1.com/ , /var/www/site2.com/ 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.
Have another answer? Share your knowledge.