Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1BD1720049E for ; Thu, 10 Aug 2017 16:55:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1A5EF16B794; Thu, 10 Aug 2017 14:55:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 35EE316B792 for ; Thu, 10 Aug 2017 16:55:08 +0200 (CEST) Received: (qmail 5926 invoked by uid 500); 10 Aug 2017 14:55:07 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 5915 invoked by uid 99); 10 Aug 2017 14:55:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2017 14:55:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id A5665C023E for ; Thu, 10 Aug 2017 14:55:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.479 X-Spam-Level: X-Spam-Status: No, score=0.479 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=rowe-clan-net.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id GoFgjFF5ko9W for ; Thu, 10 Aug 2017 14:55:04 +0000 (UTC) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id A04CD5FAEA for ; Thu, 10 Aug 2017 14:55:03 +0000 (UTC) Received: by mail-lf0-f51.google.com with SMTP id y15so4572939lfd.5 for ; Thu, 10 Aug 2017 07:55:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rowe-clan-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=B2OdH9mdgclogsdHOouaYv0kgemoZDKFWS5Q+NaYZ+o=; b=K3LIFCRWw2XfEFKbRDioEWb2wG7gIyXX9I/QDoSCIYCZO0MUkZBSig5yUgtqDGF+fh M+x+BQ2/M2XkENc0lAb4DVdbcmKnBf3Wzc/Jqjs3ElYypRb0tiXCs8KpuDEJrZIfhdA7 1Uc7Azpx6/i/8nY6zzM2/1DpNF9P4nqwiQZaANYNtZFSLZusT4MH91Sy5dDw4GH2uLRJ v0wo59HVdXW4FA9JSUJRxE1qYMw0wnRStuKXY257BXKGi8ODm7Da2injaW0Tkoz4TIDz fwC0625DKPFKna6TLrW+GAaG5r37Nxc+Zb773Bana91juhU19aGwRBYrrUVj+mrMgJ+R A30A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=B2OdH9mdgclogsdHOouaYv0kgemoZDKFWS5Q+NaYZ+o=; b=fKi1KfYgbD/zXGoKMq9PRPMxHPi6Gd45cEdvIE5Tgj08obOTbS+7f/tEGpu7kvUnaK NjpEwU4t6eTl5nGN7JcdHzewr0hKakp306zGMutdaIvVOFbtAHBaS3i6yuxik/7A5zg3 osj7lmKI4sdZ5xOUD5rxBuzIyTKPgtqLb+066UrFRH0k+z00bFW5UfoVtOPxFL2t+PgO W+BcvmMzB3jIHDRTLI9OEvAGryKiYKLltQlROjCq1Ys9UC/6wLVoyVM0/7fjnVuzrajn YknzMx386RcIUNCBO+gPePCci51RIqf4K3VIOkRgOUJTCMOA2jU9bs0GPwoZj2WyuR3g G14w== X-Gm-Message-State: AHYfb5hM0oYIvr1DWjMQdrLurWYgBpJBqv/O3H8qZtMTvjSjprQg4Ivb +Ef+gKMjmf6XWM5jMCy26W05nLpu8IapUVU= X-Received: by 10.25.166.14 with SMTP id p14mr5476858lfe.67.1502376902349; Thu, 10 Aug 2017 07:55:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.16.22 with HTTP; Thu, 10 Aug 2017 07:55:01 -0700 (PDT) In-Reply-To: References: <678BA83E-09F8-4216-9F8A-675176BEDCCB@greenbytes.de> From: William A Rowe Jr Date: Thu, 10 Aug 2017 09:55:01 -0500 Message-ID: Subject: Re: Listen 443 https To: httpd Content-Type: text/plain; charset="UTF-8" archived-at: Thu, 10 Aug 2017 14:55:09 -0000 On Thu, Aug 10, 2017 at 9:19 AM, Stefan Eissing wrote: > >> Am 10.08.2017 um 16:09 schrieb William A Rowe Jr : >> >>> Would we expect breakage by such a change? >> >> I think that Listen *:NNN is maybe the most common misconfiguration >> in general, on multihomed boxes (and Listen myhost:NNN not answering >> the call of localhost being a most common point of confusion :) >> >> Your mention of ServerName is a little misleading. A corresponding >> virtual host isn't needed at all. And mod_ssl handshake is always >> controlled by the physical vhost (first matching named vhost, name >> being ignored), which makes this a little more confusing to users. > > If understand you correctly, if the first matching (document order?) > vhost for the address:port (with wildcards) has "SSLEngine on", we > get mod_ssl engaged. If not, we try to parse a http: request? > > Hmmm. That...could be improved. When the NamedVirtualHost still existed and was still documented, this was all more obvious to the end-user This is where it is all explained poorly as features such as '*' were further modified, so the document is pretty muddy and partly wrong; http://httpd.apache.org/docs/2.4/vhosts/name-based.html The author here clearly misunderstood the role of virtual hosts for directives which affect the initial establishment of the connection in the read request behavior, prior to re-electing a more specific name-based vhost match. This sentence in particular could be corrected; "In first establishing the connection and reading the request off the wire, and subsequently, If no matching ServerName or ServerAlias is found in the set of virtual hosts containing the most specific matching IP address and port combination, then the first listed virtual host that matches that will be used." That's more correct but still clumsy, better wordsmithing would be appreciated. It's answered much better in http://httpd.apache.org/docs/2.4/mod/core.html#virtualhost "When a request is received, the server first maps it to the best matching based on the local IP address and port combination only. Non-wildcards have a higher precedence. If no match based on IP and port occurs at all, the "main" server configuration is used." "If multiple virtual hosts contain the best matching IP address and port, the server selects from these virtual hosts the best match based on the requested hostname. If no matching name-based virtual host is found, then the first listed virtual host that matched the IP address will be used. As a consequence, the first listed virtual host for a given IP address and port combination is the default virtual host for that IP and port combination." But even here we could be more specific in the second para; "Once the request is received"... Back to the behavior of mod_ssl, the SSLProtocol directive is obviously dictated by the physical vhost. But SSLHonorCipherOrder and other post-SNI decisions? I'm unsure whether the handshake is "completed" with the SNI name-based election or physical vhost. >> What leads me to wonder, even with some easier-to-read Listen >> directives, if the user wouldn't be confused by omission of the >> SSLEngine on, when their other SSL directives aren't behaving >> as expected. Because they placed them in the wrong , >> obviously. But not obvious to them. The need to toggle SSLEngine >> may be an unintended usability feature. > > I think my gut feeling tells me that "SSLEngine on|off" is more > part of the port and of the vhost. The vhost may add other SSL* > configurations, once SNI has identified the correct one. But for > a certain port (address:port) we either do TLS or not. > > So, I was looking for ways to express that and Listen seems a good start. The protocol tag existed for only one reason, to imply a corresponding AcceptFilter (e.g. data or no data or http ready on the wire before the accept would recognize the connection.) Each time we overload this meaning we are introducing an alternate or alias to other httpd configuration, which might become confusing to many users. I just suggest we tread carefully and this time, think the potential confusion and side effects through. The other issue IMO is multiple protocols on the given listener. Already true of http / h2c / h2. A recent proposal suggested to add PROXY protocol to that list, and the list of potential combinations goes on.