Why is the root directory on a web server put by default in "/var/www"?
119
votes
9
answers
211963
views
[Tuxfiles](http://www.tuxfiles.org/linuxhelp/linuxdir.html) says the following about the Linux directory structure:
>
/var
:
>
> This directory contains variable data that changes constantly when the system is running.
FHS on /var
says the following:
> /var
contains variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files.
They then go on to say that things like logs, mail and the spooler are put in that folder.
Traditionally A stock installation of Apache or Nginx or Arch on Ubuntu Linux will place the directory at /var/www/
.
It doesn't seem to me like the ideal place to put a directory with files or otherwise content that is supposed to be almost permanent.
Why is it so often put into /var
?
More subjectively, is this where it should ideally go, according to the directory structure?
Asked by jonallard
(1656 rep)
Sep 7, 2012, 05:27 AM
Last activity: Nov 6, 2024, 11:22 AM
Last activity: Nov 6, 2024, 11:22 AM