I setup vhosts in apache2 2.0.48 I create folders named /var/www/mydomains.com and entered the proper entries into my vhosts.conf I was getting a permission denied message until I found this setting in my commonapache2.conf <Directory /var/www/localhost/htdocs> which needed to be changed to <Directory /var/www> in order for apache to serve pages. if the intention is for users to create folders for their domains in /var/www , which is what I am assuming it is ... then this setting is an error and should be changed as I did.
no, do not change it to /var/www add additional directory defines for each subdir ... 1 directory define per vhost ...
Or you can also add them under ../htdocs, as I previously had my domains under /home/httpd/htdocs/www/ I simply moved them to /var/www/localhost/htdocs/www/ You can still create specific directory rules for each domain, but you get the advantage of have the basic default in one place.
GLEP 11 defines the Document Root location as /var/www/<fully qualified domain name>/ If there is a reason someone can show for doing this in the "1 directory define per vhost" way, then the vhost.conf template should be updated for the user so that the vhost example works. How is the vhost-config tool planning to manage this?
for you default rules, consider using DirectoryMatch blocks instead of Directory blocks. the actual last field of /var/www/$FQDN/ will be customizable as to how it works, as single level splitting is a PITA when you have lots of vhosts. I personally use /var/www/$DOMAIN/$HOST/ as my htdocs directory for each vhost.
Should this bug be closed?
Please read the config files under /etc/apache2/conf/vhosts/ to see different ways to perform virtual hosting on a server. There is also plenty of very clear documentation on the Apache web site on which configuration directives to use. Although there's a lot we can do to improve our apache config files, what you're suggesting is not how Apache is meant to be configured. Closing bug. Best regards, Stu
Closing.