Apache-2.4 and <VirtualHost _default_:443>

James B. Byrne byrnejb at harte-lyne.ca
Mon Apr 16 19:07:11 UTC 2018


The Apache documentation
(https://httpd.apache.org/docs/2.4/vhosts/details.html) states:

"The main server is only used to serve a request if the IP address and
port number to which the client connected does not match any vhost
(including a * vhost). In other words, the main server only catches a
request for an unspecified address/port combination (unless there is a
_default_ vhost which matches that port)."

In extra/httpd-ssl.conf the following is found:

<VirtualHost _default_:443>
#   General setup for the virtual host
  DocumentRoot      "/usr/local/www/apache24/data"
. . .

When  extra/httpd-ssl.conf contains this statement and is included
from httpd.conf then none of my virtual host ssl configurations work.
Everything ssl goes to the host server document root.

My question is:  Does the parenthetical comment "(unless there is a
_default_ vhost which matches that port)" really mean that the magic
wildcard _default_ overrides every ip address defined virtual host; as
the evidence seems to indicate?  If so then why?  What is he use case
for this feature and why is that the default configuration instead of
<VirtualHost *:443>


-- 
***          e-Mail is NOT a SECURE channel          ***
        Do NOT transmit sensitive data via e-Mail
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne                mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3



More information about the freebsd-questions mailing list