Site Tools


path-srv

Table of Contents

/srv

/srv holds data that is served to the outside world by services running on this machine. The idea is to give web servers, FTP servers, and similar daemons a dedicated, clearly named location for their content, separate from system configuration in /etc and variable system data in /var.

/srv/http/          web server document root (nginx, Apache)
/srv/ftp/           FTP server root
/srv/git/           bare Git repositories hosted over SSH or git-daemon
/srv/tftp/          TFTP files for PXE network booting

In practice /srv is less consistently used than the FHS intends. Many distributions and packages default to placing served content in /var/www, /home/user/public_html, or a custom path configured in the service's own config file. The Filesystem Hierarchy Standard recommends /srv for this purpose, but there is no enforcement mechanism.

When a machine hosts multiple services or multiple virtual hosts, subdirectories under /srv provide a clean separation. A web server configuration pointing DocumentRoot to /srv/http/example.com makes it immediately clear from the path what the directory is for and who is responsible for its contents.

path-srv.txt ยท Last modified: by 127.0.0.1