HTTP to HTTPS mapping using proxy servers

270 views Asked by At

I have a java application which is trying to call a HTTPS endpoint which is setup in my internal network. Also this request go through a corporate proxy.

Having said that, I don't want to implement a HTTPS client at my application level. Instead I will just trigger a plain http request, then further my proxy will take the http request and delegate it to the HTTPS endpoint. So that the proxy will take care of handling the SSL certificates & keys.

Is this something possible with Apache Httpd or Squid ?

Basically I dont want my application to worry about the SSL cerificates etc. Instead this can be managed at the proxy level ?

1

There are 1 answers

0
Jonathan On BEST ANSWER

this should be easy with apache. in your virtual host add

ProxyPass /myapp  https://somehost.com/myapp
ProxyPassReverse /myapp  https://somehost.com/myapp

then you can use yourinternalhost.company.com/myapp/

then watch your error log about SSLProxyCheck* messages (depends on the ssl certificate)

see http://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslproxycheckpeercn

mod_proxy: httpd.apache.org/docs/2.4/mod/mod_proxy.html (see proxyremote for using another (corporate) proxy