Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9BEB1F916 for ; Tue, 1 Oct 2013 15:55:21 +0000 (UTC) Received: (qmail 93037 invoked by uid 500); 1 Oct 2013 15:55:18 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 92947 invoked by uid 500); 1 Oct 2013 15:55:18 -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 92934 invoked by uid 99); 1 Oct 2013 15:55:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Oct 2013 15:55:17 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of norman@alltimetech.com designates 65.173.168.4 as permitted sender) Received: from [65.173.168.4] (HELO mail.ykc.com) (65.173.168.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Oct 2013 15:55:10 +0000 Received: from YOGA (unverified [199.66.148.165]) by mail.ykc.com (Vircom SMTPRS 5.21.2043.16221) with ESMTP id for ; Tue, 1 Oct 2013 10:54:48 -0500 X-Modus-BlackList: 199.66.148.165=OK;norman@alltimetech.com=OK X-Modus-Trusted: 199.66.148.165=YES X-Modus-Audit: FALSE;0;0;0 From: "Norman Hurt" To: Date: Tue, 1 Oct 2013 10:54:32 -0500 Message-ID: <00c901cebebe$850b0a40$8f211ec0$@alltimetech.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00CA_01CEBE94.9C377340" X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac6+voSMjJM2d6HNTviVaBe3zk6GXQ== Content-Language: en-us X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] UNSUBSCRIBE ------=_NextPart_000_00CA_01CEBE94.9C377340 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit UNSUBSCRIBE From: John McIntyre [mailto:joh98.mac@gmail.com] Sent: Tuesday, October 1, 2013 10:25 AM To: users@httpd.apache.org Subject: [users@httpd] Virtual Hosts Possible for SSL ? Hi, I have an apache 2.2.15 instance running on a CentOS 6.4 server. This server is (or will be, if I ever get it working...) two domains. One of them has an SSL certificate, and one doesn't. I've been struggling with this for two days solid, and if my research is correct, then the SSL handshake takes place before the browser sends the server name, and so what I'm trying to do isn't possible. Is this true? The appropriate sections from my httpd.conf are as follows: NameVirtualHost *:80 ServerAdmin root@domain1.com DocumentRoot /var/www/html ServerName domain1.com ErrorLog /var/log/httpd/error_log CustomLog /var/log/httpd/access.log combined Redirect permanent / https://domain1.com/ SSLEngine On SSLCertificateFile /etc/httpd/ssl/httpd.pem SSLCertificateKeyFile /etc/httpd/ssl/httpd.key ServerAdmin root@domain1.com ServerName domain1.com DocumentRoot /var/www/html ErrorLog /var/log/httpd/error_log CustomLog /var/log/httpd/access.log combined ServerName domain2.com ServerAlias domain2.com *.domain2.com DocumentRoot /var/www/html/domain2 Here is what I want to happen. i) User types http://domain1.com into his browser. The server automatically redirects this to the secure connection, namely https://domain1.com. This content is in /var/www/html So far, this works perfectly. ii) User types http://domain2.com into his browser. The server sends back what is in /var/www/html/domain2 This doesn't work. In fact, what happens is that whenever someone asks for domain2, he gets domain1. Am I doomed to failiure, or is what I'm trying to do, actually possible? Thanks. ------=_NextPart_000_00CA_01CEBE94.9C377340 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

UNSUBSCRIBE

 

From:= = John McIntyre [mailto:joh98.mac@gmail.com]
Sent: Tuesday, = October 1, 2013 10:25 AM
To: = users@httpd.apache.org
Subject: [users@httpd] Virtual Hosts = Possible for SSL ?

 

Hi,

I have an = apache 2.2.15 instance running on a CentOS 6.4 = server. 

 

This server is (or will be, if I ever get it = working...) two domains.  One of them has an SSL certificate, and = one doesn't.  I've been struggling with this for two days solid, = and if my research is correct, then the SSL handshake takes place before = the browser sends the server name, and so what I'm trying to do isn't = possible.  Is this true?

 

The appropriate sections from my httpd.conf are as = follows:

 

NameVirtualHost *:80

 

<VirtualHost domain1.com:80>

    ServerAdmin root@domain1.com

    DocumentRoot = /var/www/html

    ServerName domain1.com

  =   ErrorLog = /var/log/httpd/error_log

  =   CustomLog /var/log/httpd/access.log = combined

    Redirect permanent / = https://domain1.com/<= /p>

</VirtualHost>

 

<VirtualHost domain1.com:443>=

    SSLEngine On

  =   SSLCertificateFile = /etc/httpd/ssl/httpd.pem

  =   SSLCertificateKeyFile = /etc/httpd/ssl/httpd.key

  =   ServerAdmin root@domain1.com

    ServerName domain1.com

  =   DocumentRoot /var/www/html

  =   ErrorLog = /var/log/httpd/error_log

  =   CustomLog /var/log/httpd/access.log = combined

</VirtualHost>

 

<VirtualHost *:80>

  =       ServerName domain2.com

  =       ServerAlias domain2.com *.domain2.com

  =       DocumentRoot = /var/www/html/domain2

</VirtualHost>

 

Here is what I want to = happen.

 

i) User types http://domain1.com into his browser. =  The server automatically redirects this to the secure connection, = namely https://domain1.com.  This content is in = /var/www/html

 

So far, this works = perfectly.

 

ii) User types http://domain2.com into his browser. =  The server sends back what is in /var/www/html/domain2

 

This doesn't work.  In fact, what happens is that = whenever someone asks for domain2, he gets domain1. =  

 

Am I doomed to failiure, or is what I'm trying to do, = actually possible?

 

Thanks.

------=_NextPart_000_00CA_01CEBE94.9C377340--