Apache2 reverse-proxy to https 9443

apache-2.2reverse-proxy

I have a WSO2 Mashup server. Normally it is accessed by https://xxx.xxx.xxx.xxx:9443/carbon

For some reason, I want to set a reverse proxy to access it, so it can be access by https://xxx.xxx.xxx.xxx/carbon

I have followed the guide from http://wiki.apache.org/httpd/TomcatReverseProxy and created a conf file in the conf.d folder.

ProxyRequests Off
ProxyPass /carbon/ https://127.0.0.1:9443/carbon/
ProxyPassReverse /carbon/ https://127.0.0.1:9443/carbon/


<Location "/carbon">
    Order allow,deny
    Allow from all
</Location>

I get error 404 if I try http://xxx.xxx.xxx.xxx/carbon

Not Found

The requested URL /carbon was not found on this server.

Apache/2.2.22 (Ubuntu) Server at 125.215.250.19 Port 80

Anyway, all I want is to access by https only, but I get error 107 if I try https://xxx.xxx.xxx.xxx/carbon

SSL connection error

Unable to make a secure connection to the server. This may be a problem with the server, or  it may be requiring a client authentication certificate that you don't have.

Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error

Best Answer

You are proxying /carbon/ and accessing /carbon which are not the same thing. When accessing a resource that is a directory like /carbon a web server will actually send a redirect to /carbon/ which is probably why you expect it to work as the 9443 server does.

Try accessing /carbon/ or proxy /carbon instead

ProxyPass /carbon https://127.0.0.1:9443/carbon
ProxyPassReverse /carbon https://127.0.0.1:9443/carbon
Related Topic