Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

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

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

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