« SocksCap v2.37 发布 |
Main
| 模式匹配 pattern matching - Regular Expression & Shell Expression & perlre regex ... »
December 9, 2004
squid 反向加速/代理加速模式下 本机apache2的原IP log module - mod_extract_forwarded
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
https://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