Configuring redirects from http to https

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have the following configuration file covering two virtual hosts:

# http redirect
<VirtualHost aaa.bbb.ccc.ddd:80>
 ServerName www.host1.com
 ServerAlias host1.com *.host1.com 
   Redirect "/" "https://www.host1.com"
</VirtualHost>

<Virtualhost *:80>
 ServerName www.host2.com
 ServerAlias host2.com *.host2.com
   Redirect / https://www.host2.com
</VirtualHost>

# https versions
<VirtualHost aaa.bbb.ccc.ddd:443>
  ServerAdmin . . .
  ServerName www.host1.com
  ServerAlias . . .
. . .

The https parts work well but if people try to get http://host1.com or http://host2.com they get connection (111) errors indicating that the redirects aren't working. I've tried different versions of the redirects -- with and without double quotes -- and it doesn't seem to make a difference.

How to I get the redirects to function?

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux