Nginx as Proxy to Squid Forward Proxy

Curtis Spencer thorin at gmail.com
Tue Dec 30 06:19:41 MSK 2008


Hi,

This is kind of a strange request.  What i want to do is get nginx to
proxy urls such as the following

http://www.mywebsite.com/proxy/www.yahoo.com

to a squid forward proxy, essentially grabbing the content of
www.yahoo.com from a squid cache.

By doing a GET http://www.yahoo.com request, the squid proxy will
return back that content.
I haven't had any success with getting URL rewriting with the
proxy_pass and rewrite module to be able to send that type of GET
request to squid.
The best I can do is GET /http://www.yahoo.com, which squid calls an
invalid request, and therefore does not return the content.

Any suggestions how to do this without writing a new nginx module?  I
currently am running my own http forward proxy that is more flexible,
but I would rather use squid for better scalability and caching.

Thanks in advance,

Curtis

--
Curtis Spencer
blog.sevenforge.com





More information about the nginx mailing list