Enabling SSL on a virtual host
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I have a single webserver (1 IP) to which many DNS entries point to. Up till now I've haven't needed SSL and the following config pattern has worked fine for me:
<VirtualHost *>
ServerName foo.mysite.com
...
</VirtualHost>
<VirtualHost *>
ServerName bar.mysite.com
...
</VirtualHost>
However, when I added SSL to to foo.mysite.com, the config had to become:
<VirtualHost foo.mysite.com:443>
...SSLStuff
In the meantime non-HTTPS traffic to foo.mysite.com worked fine except that the Alias directives did not work. So I realized the problem (the port was only for 443) and changed the config to:
<VirtualHost foo.mysite.com:80 foo.mysite.com:443>
But this has the unwanted effect of returning 400 Bad Request to HTTP traffic for foo.mysite.com, with this message:
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.
So my question is, how do I configure the VirtualHost to allow HTTP traffic (port 80) and HTTPS traffic (443)?
[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]