httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Javelet <>
Subject [users@httpd] Proxy Issues
Date Thu, 16 Jul 2015 23:34:06 GMT
Hello Everyone,

I'm having a bit of a struggle figuring out how to apply my _solution_ for
this current issue I'm facing.

I have server A & server B that both need to reach an external service,
server Z.
Server B has access while A does not, so we are wanting to make a proxy to
mediate the requests from B -> Z for A.

I thought the curl command from Server A would be:
curl --proxy http://server-b

But that gives the following error:
*   Trying x.x.x.x...
* Connected to (X.X.X.X) port 80 (#0)
* Establish HTTP proxy tunnel to server-z:443
> CONNECT server-z:443 HTTP/1.1
> Host: server-z:443
> User-Agent: curl/7.40.0
> Proxy-Connection: Keep-Alive
< HTTP/1.1 502 Proxy Error
< Date: Thu, 16 Jul 2015 22:40:16 GMT
< Server: Apache/2.4.12
< Content-Length: 383
< Content-Type: text/html; charset=iso-8859-1
* Received HTTP code 502 from proxy after CONNECT
* Closing connection 0
curl: (56) Received HTTP code 502 from proxy after CONNECT

For the current vhost configuration on server B(server-b.proxy), I am using:
ProxyPass / https://server-z
ProxyPassReverse / https://server-z

>From Server B, I can run:
curl http://server-b.proxy

Which works/mediates, but I'm pretty sure this is incorrect as when I try
it from Server A, timeout as per usual occurs. Also, the curl request is
made though a PHP wrapper which disables verification for the ssl
request(not sure if it matters or would be brought up).

>From what I understood I needed a reverse proxy since I wanted this on a
fixed url, but now I'm not so sure. Any clarity on what I'm doing wrong
would be much appreciated.


View raw message