Saturday, May 8, 2010

Configuring Proxy To Connect To Another Proxy

Posted on 9:33 PM by Agazhw

If there is a need to make an (inner) proxy connect to the outside world via another (outer) proxy server, you can use the same environment variables as are used to redirect clients to the proxy to make inner proxy use the outer one:
•http_proxy
•ftp_proxy
•gopher_proxy
•wais_proxy


E.g. your (inner) proxy server's startup script could look like this:

#!/bin/sh http_proxy=http://outer.proxy.server:8082/ export http_proxy /usr/etc/httpd -r /etc/inner-proxy.conf -p 8081This is a little ugly, so there are also the following directives in the configuration file:

•http_proxy http://outer.proxy.server/
•ftp_proxy http://outer.proxy.server/
•gopher_proxy http://outer.proxy.server/
•wais_proxy http://outer.proxy.server/


no_proxy
In the same way that clients can specify a set of domains for which the proxy should not be consulted, httpd has a no_proxy configuration directive to tell it that it should not connect to another proxy for certain URLs:

no_proxy cern.ch,ncsa.uiuc.edu,some.host:8080


WARNING: The argument string is a comma-separated list and should not contain spaces!

No Response to "Configuring Proxy To Connect To Another Proxy"

Leave A Reply