我用Apache配置了Varnish 3,它运行得很好.但是我无法在Apache日志中记录客户端IP.我试了几个解决方案,没有运气.现在我的Apache访问日志文件正在记录服务器IP而不是客户端IP地址.
以下是我的配置供您考虑:
光油VCL:(/etc/varnish/default.vlc):http://pastebin.com/PuBqZ6fx
/etc/httpd/conf/httpd.conf中
LogFormat"%{X-Forwarded-For} i%l%u%t \"%r \"%> s%b \"%{Referer} i \"\"%{User-Agent} i \""varnishcombined
......其他东西...... ErrorLog日志/ fr-error-log CustomLog日志/ fr-custom-log varnishcombined ......其他东西......
注意:安装的Varnish版本是varnish-3.0.2-1.el5.x86_64
谢谢.Raheel