Search squid archive

RE: squid 3.0 as reverse proxy and apache log at back-end

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 24 Nov 2009 01:27:30 +0100, Sébastien WENSKE <sebastien@xxxxxxxxx>
wrote:
> Many thanks Henrik!
> 
> I have add these two directive in apache2.conf:
> 
> 	LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\"
> 	\"%{User-Agent}i\"" reverse_proxy
> and
> 	SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" is-forwarder
> 
> And in my vhost:
> 
>         CustomLog /var/log/apache2/blog.log reverse_proxy
env=is-forwarder
>         CustomLog /var/log/apache2/blog.log combined env=!is-forwarder
> 
> This works pretty fine.

Careful though with XFF. I'd put quotes around it too.
 As ISPs move into layering NAT and proxy gateways, or if you extend your
own CDN vertically, you can expect it to contain more than one IP with
maybe some whitespace between them.

Amos


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux