Running HTTP and HTTPS on the same port with Apache. They said it couldn’t be done. They were wrong!
https://github.com/Dejvino/https-multiplexer
I’ve modified a simple Python port forwarding utility to act as a port multiplexer that can automatically forward HTTP and HTTPS requests to the appropriate ports. If the request looks like an HTTP in plain text, it forwards it to port A. Otherwise it is assumed to be HTTPS and is forwarded to port B.
Now you can run your web applications from a single port, regardless of using HTTP or HTTPS. Hooray!