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 C505510907 for ; Tue, 18 Feb 2014 21:27:46 +0000 (UTC) Received: (qmail 93655 invoked by uid 500); 18 Feb 2014 21:27:42 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 93633 invoked by uid 500); 18 Feb 2014 21:27:42 -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 93625 invoked by uid 99); 18 Feb 2014 21:27:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Feb 2014 21:27:42 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dave.mehler@gmail.com designates 209.85.160.51 as permitted sender) Received: from [209.85.160.51] (HELO mail-pb0-f51.google.com) (209.85.160.51) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Feb 2014 21:27:35 +0000 Received: by mail-pb0-f51.google.com with SMTP id un15so17365700pbc.10 for ; Tue, 18 Feb 2014 13:27:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=u5CmEOErupiF34DjmtnqgCCEUPxy+wt1krQGN8vFT0w=; b=fuF/1Y73hLtUdiZuw1SHFOy7AFTk4mWqZxZDxZd2lEOECNVMztiQ5nII5doher+q0P bz7Sj3mT0m/7uAKXy4wSMJ16DyVuGUjL1RrXqvQ83BSZdJH/zAv3Lc1EFEi8z7MBaPwM n9fW7bY5Nb6c8JpdRp95vOzMYRj7bcQpYAGTmS0UlFz1uasuwmuO3sZGnsM+vTt3rjNq /AeNKEzoEiOV9wCvYSZFT2Ke/DZnHJuuqaAeCXqBkmLNZwca+rlbhb1cajo94Dam37Jn 6dxbmNqcxdNEXoP1v6iJowuRaOBXyHMfguvHbeQ1UanAO8q/WWbK36lc4lJGjzJl3XHg DFwA== MIME-Version: 1.0 X-Received: by 10.66.25.101 with SMTP id b5mr35796188pag.101.1392758834488; Tue, 18 Feb 2014 13:27:14 -0800 (PST) Received: by 10.68.226.100 with HTTP; Tue, 18 Feb 2014 13:27:14 -0800 (PST) Date: Tue, 18 Feb 2014 16:27:14 -0500 Message-ID: From: David Mehler To: users Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] Redirecting virtual host to https in Apache 2.4 Hello, I'm running Apache 2.4 on an FC20 box. It's running several name based virtual hosts. I've set up one name based virtual host on port 443 I'll call it webmail.example.com. When a user goes to https://webmail.example.com the connection encrypts, the page is displayed. Here's the original version of that virtual host: ServerAdmin webmaster@example.com ServerName webmail.example.com ServerAlias webmail.example.com DocumentRoot /srv/http/webmail ErrorLog "/var/log/httpd/webmail.example.com_error_log" CustomLog "/var/log/httpd/webmail.example.com_access_log" common SSLEngine on SSLCipherSuite HIGH SSLCertificateFile "/etc/ssl/certs/server.crt" SSLCertificateKeyFile "/etc/ssl/private/server.key" Options FollowSymLinks AllowOverRide Limit Require all granted DirectoryIndex index.php My problem is I'm wanting a rewrite rule that will redirect any users who just go to: http://webmail.example.com to: https://webmail.example.com so they'll hit the ssl enabled virtual host. I'm getting page not founds. Here's my configuration: ServerAdmin webmaster@example.com ServerName webmail.example.com ServerAlias webmail.example.com DocumentRoot /srv/http/webmail ErrorLog "/var/log/httpd/webmail.example.com_error_log" CustomLog "/var/log/httpd/webmail.example.com_access_log" common # I've tried all this: # Redirect / https://webmail.example.com/ # Redirect http://webmail.example.com/ https://webmail.example.com/ #RewriteEngine on #RewriteCond %{HTTPS} !=on #RewriteRule (.*) https://%{HTTP_HOST} #RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} Pointers welcome. Thanks. Dave. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org