You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2009/04/14 10:22:33 UTC

DO NOT REPLY [Bug 47020] New: Virtual Host Definition Location Management & Documentation

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: bugs@httpd.apache.org
        ReportedBy: beerich@gmail.com


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 beerich@gmail.com

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47020] Virtual Host Definition Location Management & Documentation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47020


Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID




--- Comment #1 from Eric Covener <co...@gmail.com>  2009-04-14 04:19:52 PST ---
> 1.  documentation suggests examples which should take actual syntax

identify the example and open a bug.

> 2.  documentation does not indicate restrictions of VirtualHost location

None of the ones you've identified are reproducable. Discuss them on a mailing
list.

> 3.  location does indeed have restrictions

Elaborate, or preferably discuss on the users mailing list.

> 4.  extra/httpd-vhosts.conf file is included even when commented out

Not reproducable.  You're not reading your config carefully.

> 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

That's how they work. Your OS may assign special significance to them by
convention, but all files are the same to Apache.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org