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.

Possible Duplicate:
Should websites live in /var/ or /usr/ according to recommended usage?

On a Linux server, sites are typically stored in /var/www. But recently I got to know that creating a user for each site and storing each site in the respective /home/... directory might provide some benefits in terms of security. So my question is what those benefits could be and what are the pros and cons of the two approaches in short?

share|improve this question

marked as duplicate by Michael Hampton, Zoredache, kubanczyk, Iain Oct 28 '12 at 8:47

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.

    
This question needs a book to answer properly... –  Michael Hampton Oct 27 '12 at 18:59
    
What distribution ? some have policies about what is done with /var/www, for example. –  BatchyX Oct 27 '12 at 19:08
    
@BatchyX Ubuntu 12.04.1 –  Desmond Hume Oct 27 '12 at 19:09
    
It was NOT an exact duplicate. –  Desmond Hume Oct 28 '12 at 10:39
add comment

1 Answer

The short answer is that if you are providing shared hosting, then using /home and using a virtual host for each site makes account provisioning, quotas, and separation of sites easier.

If you don't have shared hosting, it doesn't matter much. Some people even prefer to use /srv/www instead of /var/www.

The long answer is really really long and really depends™.

share|improve this answer
add comment

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