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

Posted by nbolton on Server Fault See other posts from Server Fault or by nbolton
Published on 2010-01-14T08:04:28Z Indexed on 2012/10/30 5:06 UTC
Read the original article Hit count: 446

Filed under:
|
|

According to a guide on the Linux directory structure, /usr/ is for application files, and /var/ is for files that change (I assume this means "files that belong to the applications"). Is this correct?

If this is the case then I'm a little torn between using either. A website is an application (if it's dynamic, so to speak), but in other cases it is just a collection of files used by Apache.

The default www dir lives in /var/www/, so should we follow suit by using /var/websites/ (or something similar), or choose /usr/websites/ since they could be applications?

This is a very trivial question, but it's bugging me nonetheless. For our case, I'm leaning toward /usr/web or something like that, since our websites are all applications.

Update:

This is for our company websites; it's not a shared hosting server, so we don't need to worry about separating them in /home/ or anything like that.

© Server Fault or respective owner

Related posts about linux

Related posts about website