My understanding is that custom/non-distro software should be installed in /opt. However in a Django deployment tutorial [1] I found a suggestion to install a Django webapp to /srv which is described as containing site-specific data which is served by the system.

Should non-distro webapps be installed in /opt or /srv?


According to FHS /srv is for the site-specific data, not software packages (and is a just newer alternative to /var in this respect)

/srv contains site-specific data which is served by this system

however if you are running a Django webapp with (say) Apache, your webapp can be classified as a data for it, so it should go to /srv/ (just like you would have deployed it to /var/www on an older system).

And FHS does clearly hints on that:

writable data and scripts (such as cgi scripts) can be reasonably placed

  • in this context does "site" mean "website"?
    – lofidevops
    Mar 30 '17 at 8:30
  • @d3vid - more like 'internet host', which can in turn serve a website (or multiple websites), mail service, NNTP site e.t.c. So /srv will contain the webapps, mailboxes, news feeds e.t.c.
    – zeppelin
    Mar 30 '17 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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