Web applications. Mega important. 
I raised the issue sometime ago. Though since I have been gallivanting across Russia and Asia until now I didn’t do any work in this area.
Only recently I noticed the issue was brought up again by Neil McGovern and a debian-webapps mailing list created.
So back to work.
I really wanted to see the top level directory /web. Mainly because that’s how I have configured my own servers for years and I find it a good solution.
So a little foolishly I spewed out my thoughts on two fronts.
Ok, I concede. 
Lets go for the non-consensus /srv/www could be also /srv/physics/www of FHS‘s /srv/www . Though, I still think we should store package files by HTTP_HOST.
So:
/srv/www/HTTP_HOST
I mean everybody has an Apache configuration like this below already, don’t you?
debian$ cat /etc/apache2/sites-available/virtual NameVirtualHost *UseCanonicalName Off VirtualDocumentRoot /web/%0 #LogFormat "%V %h %l %u %t "%r" %>s %b" vhost_common #CustomLog /var/log/apache/access_log full Options All
No messy editing of httpd.conf after a package install!
I still haven’t got my head around the problem. I know about my cases or packages, but I am not sure what type of package files are referred to here. I probably need to work out some examples or test cases and look at the other Web applications in Debian.
Bug #314808 is one to watch.
In that virtual host config file I’m guessing %0 is the domain being requested? In that case, do you use symlinks eo ensure www.domain.com and domain.com have the same content? Also, I see that logging is commented out. How would you provide logs for each domain? Can %0 be used again in specifying a log path?
Ideally, I’d like any host on any domain to serve “domain.com” content, unless there existed a specific host.domain.com directory in /web. I wouldn’t want bob.domain.com and yoyoma.domain.com log files though: I’d want just domain.com log files, and host.domain.com logfiles.
Time to read up on Apache2’s httpd.conf options I think
Thanks for the post
You should be able to fix subdomains by pointing to something like my directory with an Redirection htaccess.
http://trac.natalian.org/browser/projects/nowww/
OR
In the httpd.conf
OR
I think the ServerAlias directive…
About the logs. You can log each domain in Apache2. A little trickier in Apache 1.3 I recall. I don’t bother with logs atm.