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.

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.

share|improve this question

1 Answer 1

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.

share|improve this answer
    
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/<user>/..., 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/<user>/... makes the tutorial easier to follow. –  David Z Jul 28 '10 at 5: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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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