Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

This isn't a technical question so much as one of best practice. I believe this suits the Stack Exchange format as best practices should be encouraged.

When I host multiple websites on a server is it best practice to create a new user for each domain and set the Apache virtual host document root to the user's home directory (for example, site1.com is hosted on /home/site1.com/www; site2.com is hosted on /home/site2.com/www; etc) or should I use the /srv folder on Debian?

Thanks in advance :)

N.B I will be the only one logging on to the server via SSH for maintenance purposes. The server is only hosting a couple of WordPress sites and a light weight Yii app

share|improve this question

marked as duplicate by Zoredache, Mark Henderson Jun 12 '13 at 0:09

This question was marked as an exact duplicate of an existing question.

up vote 0 down vote accepted

My preference would be to keep things simple and organised. I would put site1.com in /srv/site1.com, site2.com in /srv/site2.com, etc.. Shorter paths are better than longer paths :)

If you have a separate volume/partition, there are benefits to putting your sites on that.

By the way, if you wanted to put stuff in /home, you don't need to create a user. You can just mkdir /home/site1.com.

share|improve this answer
    
Thanks for the advice :) – Iain Jun 12 '13 at 1:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.