0

Is there a standard location for subdomain folders? I used to make folders for each subdomain in /var/web. I'm redoing my server and I want to make everything as clean as possible.

The Django tutorials I read usually have Django websites in the user's home folder.

Cory Walker
  • 236
  • 2
  • 4
  • 11
  • 1
    See also http://serverfault.com/questions/102569/should-websites-live-in-var-or-usr-according-to-recommended-usage/ and http://serverfault.com/questions/124127/linux-fhs-srv-vs-var-where-do-i-put-stuff. – earl Jul 28 '10 at 02:21

1 Answers1

2

There really is no standard. I've seen all of these possible locations used:

/var/www/<site>
/srv/www/<site>
/home/<user>/public_html/<site>
...

It really doesn't matter - just do whatever makes sense for how you want things laid out. Keep permissions in mind if you'll be granting access to multiple user accounts.

EEAA
  • 109,363
  • 18
  • 175
  • 245
  • Each distribution tends to make their own choice, usually between `/srv/www` or `/var/www` or occasionally something in `/usr`. There's no _technical_ reason you couldn't put a document root in `/home//...`, but people who care about such things wouldn't really consider that the "right" location, since website files are not really personal user data. Tutorial writers seem to think (whether correctly or incorrectly, I don't know) that putting the document root in `/home//...` makes the tutorial easier to follow. – David Z Jul 28 '10 at 05:58
  • @David Unless you're running a shared hosting environment, in which case ~/public_html/ (or some other location inside of ~) is really the *only* appropriate place to store files. – EEAA Jul 28 '10 at 18:35
  • more than appropriate, it's the only _possible_ location to store files (the way most shared hosts are set up). Good point, I forgot about that case. – David Z Jul 28 '10 at 21:56