It seems that many web applications have a need to store data, logs, etc. I have been using a directory scheme I thought others on this mailing list may be interested in. Because of my need to keep things neat, clean and separate I do not like having this dynamic data in the same web directory that serves the application.
For instance, my PyBlosxom ebuild has serveral CGI files that get installed when you use webapp-config to create a new instance of the application. I did not want the data and log files to reside in that same path. So what I did was create a hook script that webapp-config runs whenever it installs or removes and instance of the PyBlosxom application. The hook script creates a directory specific to that instance that is being installed. Given an instance of PyBlosxom served from the /blog directory you get this: /srv/fqdn/www/htdocs/blog /srv/fqdn/www/webapps/blog/data /srv/fqdn/www/webapps/blog/logs The structure allows the data to be separate from the application. This does not force the /srv heirarchy on anyone, the hook script uses the webapp-cofig environment variables so that things get installed where the user would expect them. To keep things separate I take this one step further. I also push the directory of the web application down a level. This separates content I generate from content that was installed for me. So my directory structure actually looks more like: /srv/fqdn/www/blog # PyBlosxom /srv/fqdn/www/mail # Squirrel Mail /srv/fqdn/www/htdocs # my content /srv/fqdn/www/webapps # web application data Does this seem reasonable? I was thinking about writing a GLEP or proposing an addendum to GLEP 11 or 20 to address this. My driving force behind this is a desire to have the application and the application data separate. As a side effect it is easier to do backups and my data between machines. -- David Stanek www.roninds.net GPG keyID #6272EDAF on http://pgp.mit.edu Key fingerprint = 8BAA 7E11 8856 E148 6833 655A 92E2 3E00 6272 EDAF
pgpjRBaQMR1NQ.pgp
Description: PGP signature