OpenVPN port-share with Apache/SSL

Solution 1:

the port-share option sets the port the other application is listening.

What you want to do, is to configure

port-share 10443

and set Apache to listen on port 10443:

Listen <your-public-ip>:10443

That's because two applications can't open same port at once.

Solution 2:

OpenVPN's port-share option allows you to redirect traffic to another HTTPS site , not to a regular web server; the error you're seeing

[error] [client 127.0.0.1] Invalid method in request \x16\x03\x01

occurs when an SSL request is sent to a non-0SSL site. I can reproduce the error by using

  port-share localhost 80

(instead of 443) If you set up your HTTPS site correctly then port-sharing will work.

HTH,

JJK