httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Mehler <>
Subject Re: [users@httpd] Redirecting virtual host to https in Apache 2.4
Date Wed, 19 Feb 2014 04:43:19 GMT

My thanks to everyone who helped. What I did was set up an additional
virtual host which points to the https one with a rewrite. It's
probably not the best way, but it does work. Here's my config:

<VirtualHost *:443>
     ServerAdmin xxx
     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"
<Directory /srv/http/webmail>
Options FollowSymLinks
AllowOverRide Limit
Require all granted

<VirtualHost *:80>
     ErrorLog "/var/log/httpd/webmail.example.com_error_log"
     CustomLog "/var/log/httpd/webmail.example.com_access_log" common
  RewriteEngine  on
  RewriteCond    %{HTTPS} !=on
  RewriteRule (.*) https://%{HTTP_HOST}


On 2/18/14, Eric Covener <> wrote:
> On Tue, Feb 18, 2014 at 4:27 PM, David Mehler <>
> wrote:
>> <VirtualHost>
> That hostname instead of * or an IP is almost always the source of these
> errors.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message