-1

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?

Desmond Hume
  • 129
  • 7

1 Answers1

3

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™.

MDMarra
  • 100,734
  • 32
  • 197
  • 329