PDA

View Full Version : in regards to Caching reverse squid proxy with debian


nux
10th February 2009, 21:26
Hey, I have a question that resulted from this howto:

http://www.howtoforge.com/how-to-set-up-a-caching-reverse-proxy-with-squid-2.6-on-debian-etch

I am trying to process logs passed to apache from squid with the X-Forwarded-For header.

The issue is sometimes it sends multiple IP addresses, and I want to limit it to sending just the external (or the farthest right) IP. I just want to properly parse the logs with awstats.

Not exactly sure how I would do this.

Any suggestions would be appreciated.

Thanks

falko
11th February 2009, 20:24
That's a good question. I think you could write a shell script that processes your access log and deletes the second, third, fourth... IP before awstats uses the access log to create its stats.