https://bz.apache.org/bugzilla/show_bug.cgi?id=69329

            Bug ID: 69329
           Summary: (almost) undocumented legacy path-based vhost matching
                    using ServerPath
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Documentation
          Assignee: docs@httpd.apache.org
          Reporter: vyq...@vayion.de
  Target Milestone: ---

Hi there!

While checking the documentation for vhost matching, I've stumbled upon the
`ServerPath` directive for vhost matching which may be relevant in some cases
but isn't mentioned in the "In-Depth Discussion of Virtual Host Matching"
(vhosts/details.html).

While bug 64996 is also concerned with vhost matching, the discussion doesn't
directly relate to this third type of matching. Hence, I created a new issue.

As it turns out, when selecting the appropriate vhost for a request, apache
doesn't only consider ip and host header, but may also fall back to path-based
vhost matching under certain conditions:

if multiple vhosts matched based on ip (i haven't tested whether all of them
have to be best matches) AND the client didn't specify a `Host` header AND the
`ServerPath` directive is set for a vhost AND the `ServerPath` directive of the
vhost matches the request path, THEN that vhost is selected.

(Note that apache only accepts http requests that don't contain a `Host` header
when using HTTP 1.0.)

This behavior is explained under vhosts/examples.html#serverpath, but there is
no mention of it in either vhosts/name-based.html or vhosts/details.html.

(Also, the link to "name-based virtual hosts" in the `ServerPath` directive
docs (mod/core.html#serverpath) should point to vhosts/name-based.html instead
of vhosts/.)

James

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscr...@httpd.apache.org
For additional commands, e-mail: docs-h...@httpd.apache.org

Reply via email to