Where to host the root web server?

I just did the update and now partially thought about the directory structure of the web server for the local workstation for linux web development. Running multiple hosts and various projects. Where is better to place all server docroots? / Var / WWW? / SRV? / WWW? I plan to do this as a separate section - can it be good for backup? :) I look forward to your thoughts on this.

+3
source share
3 answers

For development, you can place the files anywhere - perhaps in your home directory (you can allow Apache to serve files from your home directory by UserDir enabledsetting Apache in the settings: see http://httpd.apache.org/docs/2.1/mod/ mod_userdir.html ).

For production /srv/www, this is probably the best place for files; this is (freely) defined in the FHS: http://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM

In addition, /srv/wwwusually (of course, on Fedora, for example) is one of the places that SELinux sees as web content, which allows Apache to read files.

+3
source

/srv . , , , .

0

This is well explained in the File System Hierarchy Standard . He must go to /srv.

0
source

Source: https://habr.com/ru/post/1750284/


All Articles