Thanks to you and Amos Jeffries. This is what I was looking for. Roger On 09/29/2009 12:41, tookers wrote: > > > > Roger Cornelius wrote: > > > > Apologies for what is probably a newbie question. I've searched the > > squid directives, archives of this list, the net, etc., and haven't > > discovered, or didn't recognize, the answer. > > > > I'm using squid 2.7.STABLE6 in accelerator mode. I used the basic > > accelerator config example at: > > > > http://wiki.squid-cache.org/ConfigExamples/Reverse/BasicAccelerator > > > > The httpd, which is running on the same machine, sees all requests as > > coming from the IP of the machine squid/apache are running on. How do I > > configure squid so httpd sees the IP of the actual machine making the > > request so I can do acl in httpd? > > > > Thanks. > > -- > > Roger Cornelius rac@xxxxxxxxxxx > > > > > > > Hi There, > > You can append the clients IP address to the request header you can set this > with 'forwarded_for on'. > In Apache, and even Squid, you can access the various elements in the > header. > > Squid Example:- > acl BlockByHeader req_header X-Forwarded-For 192\.168\.1\.10 > http_access deny BlockByHeader > > Apache Example:- > RequestHeader set X-My-Header "something useful" > > The log file in Apache can be changed to log the contents of X-Forwarded-For > header (which will contain the client IP) append this to your log file > format in httpd.conf > \"%{HTTP_X_FORWARDED_FOR}i\" > > Hope that helps. > > -- > View this message in context: http://www.nabble.com/Want-accel-mode-squid-to-pass-real-IP-to-httpd-tp25667604p25669555.html > Sent from the Squid - Users mailing list archive at Nabble.com. > -- Roger Cornelius rac@xxxxxxxxxxx