-1

I have ubuntu server setup with openvpn-access server and apache. I have reverse proxy working for most things I need access to but I cant figure out how to set it up for the connect/admin page of ovpn-as

To access the connect/admin page, the full internal address is:

https://192.168.187.9:943/?src=connect

I would like to be able to access that remotely by going to https://www.domain.com/vpn

Currently I have tried a location directive like:

<Location /vpn>
        ProxyPass https://192.168.187.9:943/vpn/?src=connect
        ProxyPassReverse https://192.168.187.9:943/vpn/?src=connect
</Location>

But it always results in a 500 internal server error

Whats the correct way to set this up in apache?

EDIT:

In the apache error log I'm seeing this:

 [ssl:error] [pid 1991:tid 140374873949952] [remote 192.168.187.9:943] AH01961: SSL Proxy requested for www.domain.com:443 but not enabled [Hint: SSLProxyEngine]
 [proxy:error] [pid 1991:tid 140374873949952] AH00961: HTTPS: failed to enable ssl support for 192.168.187.9:943 (192.168.187.9)
0

Try this instead, Enable mod_rewrite, proxy & proxy_http modules in Apache for this.

RewriteEngine On
RewriteRule ^/vpn/(.*)$ https://192.168.187.9:943/vpn/$1?src=connect [P,L]
  • with that I get a 404 error: The requested URL /vpn was not found on this server – Simon Dec 9 '15 at 20:12
  • You can try removing the Location tag & putt this rewrite rule inside virtual host section – serverliving.com Dec 10 '15 at 5:16
  • I still get the 404. This is in the virtual host that listens on 443 if that makes a difference – Simon Dec 10 '15 at 5:20
  • also it seems that navigating to https://192.168.187.9:943 will also take me to the correct page. so no need for the ?src=connect maybe that makes things easier? – Simon Dec 10 '15 at 5:24
  • 1
    Try the solution from here stackoverflow.com/questions/18872482/… – serverliving.com Dec 10 '15 at 6:01
0

You are missing this in your VirtualHost:

SSLProxyEngine On

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.