I’ve never understood why applications don’t use t...
# ktor
b
I’ve never understood why applications don’t use the
/srv
directory defined by the FHS (Filesystem Hierarchy Standard) since 2004 which most Linux distros follow
/srv
contains site-specific data which is served by this system.
n
Many Linux distros use a different place for serving site data. With Debian (including Debian based ones like Ubuntu) the
/var/www
directory is used (for Apache).
The
/srv
directory doesn't exist in Debian and all distros based on Debian (incl Ubuntu and Linux Mint).
o
I wonder what’s the Linux-way to discover proper configuration information like this?
b
We’ve used
/srv
on Ubuntu for even our PHP applications (regardless of Apache or PHP-FPM) for 5 years now. It absolutely exists on base Debian too (check for yourself
docker run --rm debian ls -ls / | grep srv
)
Debians wiki defines the directory as
Site-specific data which is served by the system
In particular, paths specifically created by the FHS editors, such as /media/ and /srv/, do not see widespread usage.
^^ This is certainly the case but doesn’t make it any less part of the defined standard
@orangy I would probably say the Linux Standard Base (part of the Linux Foundation) which also names FHS https://wiki.linuxfoundation.org/lsb/about
When targeting Linux as a platform, application developers want to have some assurance that the code they write on one Linux distribution will run on other Linux distributions without having to go through extra effort. This matches their experiences on other popular platforms, such as Windows or Mac OS X.
The LSB workgroup has, as its core goal, to address these two concerns. We publish a standard that describes the minimum set of APIs a distribution must support, in consultation with the major distribution vendors.
It’s also worth mentioning that Apache (including under Debian) actually ships with
/srv
in its configuration that’s just commented out for legacy reasons
n
Must be Ubuntu which doesn't include the /srv directory by default.
b
@napperley Again, we use
/srv
provided by Ubuntu (as a sub-distro of Debian). This can also be verified
docker run --rm ubuntu ls -ls / | grep srv
Out of curiosity, I checked the Ubuntu documentation on its filesystem and the first version available of the page February 2006 (almost 13 years ago) documents the
/srv
directory and using
/srv/www
as the HTTP document root (it still documents
/srv/ww
in the latest update from January 2016). Similarly, the Debian wiki documentation on its hierarchy first published in January 2004 directly references FHS (which included
/srv
as of 2004)
🆗 1