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]

 



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.

Best regards,

Sébastien WENSKE



-----Message d'origine-----
De : Henrik Nordstrom [mailto:henrik@xxxxxxxxxxxxxxxxxxx] 
Envoyé : mardi 24 novembre 2009 00:25
À : Sébastien WENSKE
Cc : squid-users@xxxxxxxxxxxxxxx
Objet : Re:  squid 3.0 as reverse proxy and apache log at back-end

mån 2009-11-23 klockan 17:41 +0100 skrev Sébastien WENSKE:

> In my previous mail I explained that I'm using a squid reverse proxy
> with high bandwidth to cache my apache at home. There are connected by
> VPN, and I would know if it is possible to get original IP in my
> apache logs.

Yes. You need to configure Apache to log the X-Forwarded-For header sent
by Squid.

Regards
Henrik



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

  Powered by Linux