proxy代理   soft软件   IT 业界特快   norton 诺顿病毒库   代理列表   search FTP搜索   whois IP地理位置   blog 追求完美  
money理财   life生活   RSS聚合门户   firefox WEB浏览器   免费域名   typeset 假古文   AntiVirus 反病毒   ipcn 站点导航  

« squid 代理模式 and 加速模式 | Main | refresh_pattern @ squid »

October 31, 2004

squid 反向加速模式下 本机apache的原IP log module - mod_extract_forwarded

版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/archives/2004/10/31/000293.html

squid 和 apache 如果跑在同一台机器上
squid 工作在反向加速模式(可基于单主机加速 或 代理+单主机加速)
apache Listen 127.0.0.1:80 (Port 80 BindAddress 127.0.0.1)

此时 apache log 的是 127.0.0.1
如果想在 apache 做 log 并记录原IP
就需要 mod_extract_forwarded

官方主页:
http://web.warhound.org/mod_extract_forwarded
http://web.warhound.org/mod_extract_forwarded/mod_extract_forwarded.c

配置见
http://web.warhound.org/mod_extract_forwarded/mod_extract_forwarded.html

编译
apxs -c -o mod_extract_forwarded.so mod_extract_forwarded.c

cp -a mod_extract_forwarded.so /usr/lib/apache/

# add in /etc/httpd/conf/httpd.conf
LoadModule extract_forwarded_module modules/mod_extract_forwarded.so

AddModule mod_extract_forwarded.c
AllowForwarderCaching On
AddAcceptForwarder all

 

本blog WWW

Posted by windtear at October 31, 2004 10:54 PM

Trackback Pings

TrackBack URL for this entry:
http://cgi.windtear.net/cgi-bin/wt-tb.cgi/293

Comments

Post a comment

Remember Me?



我爱网络
2007-12-31 23:51 2007年度 ipcn.org/ipchina.org 总结报告
2007-12-31 00:31 vmware gsx server service
2007-12-31 00:15 squid 对 404 302 缓存的相关问题
2007-12-30 14:24 升级到 MovableType 3.3x 并修改 entry_basename 兼容性
2007-12-30 13:52 [php] realip judge 前面补0的ip格式剔除
2007-12-14 16:34 rm -rf * 系统管理员要排查的定时炸弹
2007-12-13 19:03 山西的宽带运营商太过分了 私自窜改dns解析
2007-12-13 16:35 F5 MIB 再学习 唯一性标记用地址的小bug
2007-12-11 22:15 perl 用Spreadsheet::WriteExcel写了个处理/读写excel的小程序
2007-12-11 13:39 perl 变量转义的问题

本站使用中的任何问题,请与 windtear SPAM windtear SPAM net 联系
Copyright© 1999-2008 Windtear. All rights reserved.
京ICP备05050670号