On Wed, 5 Jul 2000, Yusuf Goolamabbas wrote:
> Hi, I recently setup a squid2.3-stable3 on a FreeBSD4.0 box
> acceleratiing a mod-perl enabled Apache listening at a different
> port. Is there any way, I can forward the original source IP's to
> Apache to log. Right now, all requests to Apache show the source IP as
> the local interface
>
> I am using Host based virtual hosting on Apache with each virtual host
> logging to a separate file which is easy to send to customers.
>
> Regards, Yusuf
Hi Yusuf,
yes, this is possible. First you set "forwarded_for on" in squid.conf,
then you have to change the common logfile format in Apache's httpd.conf
like this:
Change
LogFormat "%h %l %u %t \"%r\" %>s %b" common
into
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common
That's all!
Good luck,
emg
/* Eelco M. Glasl <emglasl@gmx.net>, ICQ: 52029132, AIM: EMGlasl */
int m,u,e=0;float l,_,I;main(){for(;1840-e;putchar((++e>907&&942>e?
61-m:u)["\n >ten.xmg@lsalgme< lsalG .M ocleE"]))for(u=_=l=0;79-(m=
e%80)&&I*l+_*_<6&&26-++u;_=2*l*_+e/80*.09-1,l=I)I=l*l-_*_-2+m/27.;}
Received on Wed Jul 05 2000 - 04:31:59 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:20 MST