Ssl – Apache answer both HTTP and HTTPS on the same port

apache-2.2httpsssl

I'm trying to get apache to redirect from http to https, however I want them both on the same port (20100, but I doubt that will matter). Basically what's going on here except I'm not doing this for webmin. Currently I have it configured to serve HTTPS, and when I access with HTTP I get:

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.

There seem to be a lot of somewhat similar questions, however I am unable to find one that actually answers my question.

Best Answer

This is not going to be possible with Apache. With Apache you cannot have HTTPS and HTTP running on the same port.

I am aware of a few port-multiplexers designed to make HTTPS/OpenVPN and SSH run on the same port, but these require additional software.

Related Topic