« SocksCap v2.37 发布 |
Main
| 模式匹配 pattern matching - Regular Expression & Shell Expression & perlre regex ... »
December 9, 2004
squid 反向加速/代理加速模式下 本机apache2的原IP log module - mod_extract_forwarded
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/archives/2004/12/09/000440.html
squid 反向加速/代理加速模式下 本机apache2的原IP log module - mod_extract_forwarded
理解标题: 两点 1.反向加速/代理加速 两种模式 本篇是代理加速模式 2.apache2 v2 和 v1 的 modules 不能共用 配置也完全不同
Apache 1.* http://web.warhound.org/mod_extract_forwarded/
Apache 2 version: mod_extract_forwarded is being portedto Apache 2 by Richard Barrett. Please see Richard'spage for the project status and the source code.
Apache 2.x http://www.openinfo.co.uk/apache/index.html
apache2 下配置和 apache1 完全不同
安装: wget http://www.openinfo.co.uk/apache/extract_forwarded-2.0.2.tar.gz tar zxvf extract_forwarded-2.0.2.tar.gz ( drwxr-xr-x richard/staff 0 2004-03-02 19:21:57 extract_forwarded/ -rw-r-x--- richard/staff 1221 2004-03-02 16:35:29 extract_forwarded/INSTALL -rw-r--r-- richard/staff 38639 2004-03-08 23:27:36 extract_forwarded/mod_extract_forwarded.c -rw-r-x--- richard/staff 11721 2004-03-02 19:48:39 extract_forwarded/README ) cd extract_forwarded
apxs -c -i -a mod_extract_forwarded.c 这个全自动安装 会在 apache httpd.conf 自动添加 LoadModule extract_forwarded_module modules/mod_extract_forwarded.so (默认自动是写全的 /usr/lib/httpd/modules/mod_extract_forwarded.so)
默认这时还不工作 还需要配置 (其中 127.0.0.1 为代理加速配置) MEForder refuse,accept MEFrefuse all MEFaccept 127.0.0.1 #MEFaddenv on #default on #MEFdebug on #default off
MEFdebug 设为 on 的话 cd /var/log/httpd/ tail error_log 可以看到很多具体信息 MEF: phase:post read request, initial substituted 1.1.1.1 for 127.0.0.1, http://2.2.2.2/file.html MEF: phase:URI translate, already done, NFA required, http://2.2.2.2/file.html MEF: phase:access check, already done, NFA required, http://2.2.2.2/file.html MEF: phase:cleanup initial, undo spoof substituted 127.0.0.1 for 1.1.1.1 1.1.1.1 为远端客户机 2.2.2.2 为服务器 用ip连接 当然域名也可以
如果不通过代理加速直接连的话 MEF: phase:post read request, no FORWARDED-FOR header, /favicon.ico MEF: phase:URI translate, no FORWARDED-FOR header, /favicon.ico MEF: phase:access check, no FORWARDED-FOR header, /favicon.ico
相关文章 http://www.smth.edu.cn/pc/pccon.php?id=10&nid=94652&s=all
|
|
Posted by windtear at December 9, 2004 11:13 AM
Trackback Pings
TrackBack URL for this entry:
http://cgi.windtear.net/cgi-bin/wt-tb.cgi/440
Post a comment
【
我爱网络】
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 变量转义的问题