[linux] Where do you put your websites(web apps) in linux server? /var/www, or /home/website, or else
source: http://serverfault.com/questions/102569/should-websites-live-in-var-or-usr-according-to-recommended-usage
Question:
Should websites live in /var/ or /usr/ according to recommended usage?
Answer:
Question:
Should websites live in /var/ or /usr/ according to recommended usage?
Answer:
According to the FHS,
/usr
is for shareable, read-only data
- not where you want to put the website. This is where you should put your code (for example Fedora does this for Wordpress). See also theweb assets packaging guide for Fedora./var
is "variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files." -- better, but still not quite right -- but a lot of systems will use /var/www
, so even if you're wrong to put it there you're in good company./srv
is for "site-specific data which is served by this system." -- which seems like a good match, but is much less common than /var/www
.
The other common place to put the site files is under
/home
-- but creating a special user called website
or such, then placing the files inside that user's homedir.
댓글
댓글 쓰기