Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

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.