https://issues.apache.org/bugzilla/show_bug.cgi?id=47020
Summary: Virtual Host Definition Location Management &
Documentation
Product: Apache httpd-2
Version: 2.2.9
Platform: Macintosh
OS/Version: other
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: All
AssignedTo: [email protected]
ReportedBy: [email protected]
OK, a colleague and I have found several inconsistencies with apache inclusions
for conf modifications, post httpd.conf. The basic problem started when
VirtualHost entries were not being recognized by configtest. I will try to
report them as found, individually. Collectively they don't provide any way of
following a route through included config files.
Here is the tested environment (httpd.conf):
# Virtual hosts
#Include /private/etc/apache2/extra/httpd-vhosts.conf
Include /private/etc/apache2/other/*.conf
Include /private/etc/apache2/users/username.conf
Include /private/etc/apache2/users/lasso8.conf
I tried parking my VirtualHosts into my username.conf. That has never worked
as configtest indicated *:80 had no VirtualHosts.
Moved to extra/httpd-vhosts.conf:
It worked. But, httpd-vhosts.conf is NEVER included in httpd.conf. See above.
The documentation for 2.2 shows that an example is provided inside
extra/httpd-vhost.conf. Only when the VirtualHosts are placed in there, do
they work.
Documentation for 2.2 also indicates that the VirtualHosts can be placed at the
end of the httpd.conf. That's a bad idea, as OS upgrades can reset this file
back to the default supplied with a new OS. users/*.conf files remain, which
is a good thing. All mods should be done in user conf files, such as
users/username.conf. They remain safe with OS upgrades.
Third, the nature of the progression through conf files, allows the last
iteration of a directive to be superior in priority. So regardless of the file
location of ANY directive, its priority is based upon its linear location. My
situation respected that, but configtest didn't take into consideration my
user/username.conf file whatsoever, nor did the apache server.
Conclusions:
1. documentation suggests examples which should take actual syntax
2. documentation does not indicate restrictions of VirtualHost location
3. location does indeed have restrictions
4. extra/httpd-vhosts.conf file is included even when commented out
5. *.conf files (all files) should be assigning directives priority in a
linear fashion, using includes as a method for organizing directives, and not
dictating where items must be placed
email [email protected]
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]