Untitled


SUBMITTED BY: matrixglitch

DATE: May 15, 2022, 9:38 p.m.

FORMAT: Text only

SIZE: 1.1 kB

HITS: 5420

  1. sage of /var/www is confusing only at first sight.
  2. According to the FHS, web server data should go to /srv. That is the main rule.
  3. However, it also says that deciding about the structure of /srv is the sole responsibility of the local administrator! Therefore packages must not put anything into /srv, and the default document root must not be /srv, because the (apache) package does not know what is in /srv and below it. Maybe a subversion repository with clear text password and other things as well. So there must be a default outside of /srv. That default become /var/www.
  4. /var/www is mostly a placeholder. Packages use /usr/share for static HTML content, or /var/lib for dynamic variable content. Many people mistakenly thought that they should then put HTML into /var/www. That is a problem, because packages occasionally use that too. So recently they invented /var/www/html for packages. Hopefully people will not start to use that because then again they have to invent a new directory... and so on.
  5. Summary: you should use /srv and configure your Apache virtual hosts accordingly.

comments powered by Disqus