I’ve just made an upgrade and now partly thinking on web-server directory structure for local workstation for web-development on linux platform. Running multiple hosts and different projects required. Where is it better to put all the server’s docroots? /var/www? /srv? /www? I plan to make it as separate partition – could it be good for backups? 🙂 I’m looking forward to your thoughts on this.
I’ve just made an upgrade and now partly thinking on web-server directory structure for
Share
For development, you could put the files anywhere – perhaps in your home directory (you can allow Apache to serve files from your home directory by setting
UserDir enabledin the Apache configuration: see http://httpd.apache.org/docs/2.1/mod/mod_userdir.html).For production,
/srv/wwwis probably the best place for the files; this is (loosely) defined in the FHS: http://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEMAdditionally,
/srv/wwwis typically (certainly on Fedora, for example) one of the locations that is regarded by SELinux as web content, which allows Apache to read the files.