I need to proxy some remote api https://example.com/api/
to be accessible locally as http://localhost/api/
I tried putting this line in httpd.conf
:
ProxyPass /api/ https://example.com/api/
I have checked these modules are enabled:
ssl_module, proxy_module, proxy_http_module
When I'm trying to reach http://localhost/api/
, I'm getting 500 Internal Server Error, And what I see in error_log
is:
[Wed Jan 14 16:42:04.788401 2015] [proxy:warn] [pid 21916] [client ::1:59260] AH01144: No protocol handler was valid for the URL /api/v1/ads. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
My question is relative to this one: https://stackoverflow.com/questions/1997001/setting-up-a-basic-web-proxy-in-apache. Actually, when I try to proxy http resources, everything works for me, so the problem is somewhere around SSL.
The reason I want this to work is the Access-Control-Allow-Origin
problem I'm experiencing when working with remote api locally.
UPDATE
Here's the entire conf file. https://www.dropbox.com/s/mkrxna4h2o9yu8k/httpd.conf?dl=0