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 4B4D4200C7B for ; Sat, 20 May 2017 18:47:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 49BB6160BBE; Sat, 20 May 2017 16:47:13 +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 405D6160BA7 for ; Sat, 20 May 2017 18:47:12 +0200 (CEST) Received: (qmail 91361 invoked by uid 500); 20 May 2017 16:47:10 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 91350 invoked by uid 99); 20 May 2017 16:47:10 -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; Sat, 20 May 2017 16:47:10 +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 54647C701D for ; Sat, 20 May 2017 16:47:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.881 X-Spam-Level: * X-Spam-Status: No, score=1.881 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URI_TRY_3LD=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=adaminfinitum.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 zzXqXwEmEAEq for ; Sat, 20 May 2017 16:47:08 +0000 (UTC) Received: from mail-pg0-f52.google.com (mail-pg0-f52.google.com [74.125.83.52]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 231355FD47 for ; Sat, 20 May 2017 16:47:07 +0000 (UTC) Received: by mail-pg0-f52.google.com with SMTP id q125so50836694pgq.2 for ; Sat, 20 May 2017 09:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adaminfinitum.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=q2LEWjv7y8Y7aivyzBtCmkMfNK357iv3w3lL4UmVJu4=; b=k+JgRye9J7tqw/FFl37735o2JgO1qlIvMt+phKO9eLIJH29sw8Cgm95K/w/AxYTNfe /2E7ToTJQTPQML1nsws2HZ+5hDiRJdrR8eNm+OPayMXsF87fQcSO3dxuPuw9b28okMWP nbfsUPGfgBPWLY26QluAEWSAW3S4RGhtU9J6A= 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=q2LEWjv7y8Y7aivyzBtCmkMfNK357iv3w3lL4UmVJu4=; b=G1obKYHMiMJ/iTUhsKH3odeBFPc7g0jhkT6gROg76fk8nyJ8iXGMg5opMI8z6V7x49 NRYLqn9FmZmRmxXUWTMFtlVyh5VNQKeakzzXEWmduLDF6fIjuK7oqS8LEpZmj9FwBjwu jC+G238v6EcRFJBIPjysGgflmFVs2GEScMdNYDlrMfUT68tcaNtF1s8wnmtzPa2Nucq6 469wAk3ZSbVH1j/EPskxLOEcx/DHvC0NW1GqDnGNeIbN5YQg/vsaIQ7xEHgVuKzCvUMe MmRJKo7yW0wmhCH77ubPs4HPOhiLcIpECPLkTjGXxzGfcVLA4KA8bHDNnTK0ZBd72EZC 2mjg== X-Gm-Message-State: AODbwcBXLq2mLNf1stbpopjc2AuTd/hE4/Yx2cYPSLt0Zh2FKkuicq/V CrlQgOcG0ooRXcDZd+XqGdtcRszX9vE/RFgkOw== X-Received: by 10.84.217.218 with SMTP id d26mr18647169plj.47.1495298820028; Sat, 20 May 2017 09:47:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.128.142 with HTTP; Sat, 20 May 2017 09:46:39 -0700 (PDT) X-Originating-IP: [2602:301:771a:f2cf:8558:3525:5ac2:3cc5] In-Reply-To: References: From: Adam Powell Date: Sat, 20 May 2017 12:46:39 -0400 Message-ID: To: users@httpd.apache.org Content-Type: multipart/alternative; boundary="f403045cd33a005308054ff7630c" Subject: Re: [users@httpd] Suggestion/Question about HTTP & HTTPS configurations archived-at: Sat, 20 May 2017 16:47:13 -0000 --f403045cd33a005308054ff7630c Content-Type: text/plain; charset="UTF-8" Hi Daniel, Thanks for trying to help but maybe I didn't explain this well enough. Debian uses "Include" by default because of it's built-in `a2ensite` shortcut. Even with the Include (as your code illustrates) there needs to be a Virtual Host configuration block for HTTP on port 80 and for HTTPS on port 443. Unless specifically configured differently, why not assume they are the same (as HTTP/port 80 for a matching Virtual Host)? I hope that helps clarify. Adam Powell http://www.adaminfinitum.com On Sat, May 20, 2017 at 6:05 AM, Daniel wrote: > There is a directive called "Include" > > With this directive you can specify any number of directives in a file > and then define the Include pointing to the same file wherever you may > need. > > For instance > > > Include conf/common.conf > > > > SSLEngine on > SSLCertificatefile conf/x509.crt > SSLCertitificateKeyFile conf/rsa.key > Include conf/common.conf > > > and common.conf can have: > ServerName myserver.exam.com > DocumentRoot /var/www > DirectoryIndex index.html > FallbackResource /index.html > Redirect /one/ /two/ > Header set myheader "Hello" > # and all directives you may need. > > > > > 2017-05-20 2:53 GMT+02:00 Adam Powell : > > Hello, > > > > I am a user of Apache in the sense that I install it, configure it and > run > > it to host sites...I'm hoping this is the correct list to send this to. > > > > Anyway, I recently did my first "from scratch" Apache install, build and > > configuration in a cloud server (I had always used cPanel & WHM before). > > > > My suggestion is that Apache should "assume" that port 80 for HTTP and > port > > 443 for HTTPS and that they both serve the same content. > > > > I'm not suggesting people shouldn't be able to customize it, but adding > > duplicate and redundant directives for each Virtual Host for HTTP and > HTTPS > > seems unneeded. > > > > In short, I'm suggesting a "smart default" that in the absence of a > specific > > Virtual Host configuration for HTTPS, just assumes that the HTTPS matches > > the HTTP config for that Virtual Host. > > > > Background: I got Apache (2.4.x) up and running on a Debian VM, > configured > > all my Virtual Hosts, installed an SLL certificate and went to view the > > HTTPS version of a site. > > > > I was redirected to the 'default' page for the server (not the default > page > > for the Virtual Host). > > > > I then realized I needed additional, identical rules for that Virtual > Host > > for HTTPS on port 443...simply put, it seems like that extra level of > > configuration shouldn't be required...that it should work that way > > automagically unless specifically configured otherwise. > > > > If not, I'd love to know why that's a bad idea. > > > > Thanks! > > > > Adam Powell > > http://www.adaminfinitum.com > > > > > > -- > Daniel Ferradal > IT Specialist > > email dferradal at gmail.com > linkedin es.linkedin.com/in/danielferradal > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org > For additional commands, e-mail: users-help@httpd.apache.org > > --f403045cd33a005308054ff7630c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi = Daniel,

Thanks for trying= to help but maybe I didn't explain this well enough.

Debian uses "Include" by= default because of it's built-in `= a2ensite` shortcut.

Even= with the Include (as your code illustrates) there needs to be a Virtual Ho= st configuration block for HTTP on port 80 and for HTTPS on port 443.
=

Unless = specifically configured differently, why not assume they are the same (as H= TTP/port 80 for a matching Virtual Host)?

I hope that helps clarify.


On Sat, May 20, 2017 at 6:05 AM, Daniel <= dferradal@gmail.com> wrote:
There is a directive called "Include"

With this directive you can specify any number of directives in a file
and then define the Include pointing to the same file wherever you may
need.

For instance

<VirtualHost *:80>
Include conf/common.conf
</VirtualHost>

<Virtualhost *:443>
SSLEngine on
SSLCertificatefile conf/x509.crt
SSLCertitificateKeyFile conf/rsa.key
Include conf/common.conf
</Virtualhost>

and common.conf can have:
ServerName myserver.exam.com
DocumentRoot /var/www
DirectoryIndex index.html
FallbackResource /index.html
Redirect /one/ /two/
Header set myheader "Hello"
# and all directives you may need.




2017-05-20 2:53 GMT+02:00 Adam Powell <adam@adaminfinitum.com>:
> Hello,
>
> I am a user of Apache in the sense that I install it, configure it and= run
> it to host sites...I'm hoping this is the correct list to send thi= s to.
>
> Anyway, I recently did my first "from scratch" Apache instal= l, build and
> configuration in a cloud server (I had always used cPanel & WHM be= fore).
>
> My suggestion is that Apache should "assume" that port 80 fo= r HTTP and port
> 443 for HTTPS and that they both serve the same content.
>
> I'm not suggesting people shouldn't be able to customize it, b= ut adding
> duplicate and redundant directives for each Virtual Host for HTTP and = HTTPS
> seems unneeded.
>
> In short, I'm suggesting a "smart default" that in the a= bsence of a specific
> Virtual Host configuration for HTTPS, just assumes that the HTTPS matc= hes
> the HTTP config for that Virtual Host.
>
> Background: I got Apache (2.4.x) up and running on a Debian VM, config= ured
> all my Virtual Hosts, installed an SLL certificate and went to view th= e
> HTTPS version of a site.
>
> I was redirected to the 'default' page for the server (not the= default page
> for the Virtual Host).
>
> I then realized I needed additional, identical rules for that Virtual = Host
> for HTTPS on port 443...simply put, it seems like that extra level of<= br> > configuration shouldn't be required...that it should work that way=
> automagically unless specifically configured otherwise.
>
> If not, I'd love to know why that's a bad idea.
>
> Thanks!
>
> Adam Powell
> http://www.adaminfinitum.com
>



--
Daniel Ferradal
IT Specialist

email=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dferradal at gmail.com
linkedin=C2=A0 =C2=A0 =C2=A0es.linkedin.com/in/danielfe= rradal

-----------------------------------------------------------------= ----
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


--f403045cd33a005308054ff7630c--