3 月 192014
 

使用IP 192.168.197.111主机上的浏览器访问
非正常前端与后端日志

192.168.197.111 - - [20/Mar/2014:16:11:47 +0800] "GET /tools/ajax/getNaviImgImage.ajax.php?file=19253527240ec31dd4a650e190f66cc28551d973.jpg HTTP/1.1" 200 24571 "http://hk.linuxcache.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36"
192.168.197.65 - - [20/Mar/2014:16:11:40 +0800] "GET /tools/ajax/getNaviImgImage.ajax.php?file=19253527240ec31dd4a650e190f66cc28551d973.jpg HTTP/1.0" 200 24558 "http://hk.linuxcache.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36"

正常前端与后端日志

192.168.197.111 - - [20/Mar/2014:17:52:42 +0800] "GET /fav2.ico HTTP/1.1" 200 3638 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36"
192.168.197.111 - - [20/Mar/2014:17:52:35 +0800] "GET /fav2.ico HTTP/1.0" 200 3638 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36"

Nginx主机配置文件部分

location / {
   #root html;
   #index index.html index.htm;
   proxy_pass http://apache;
   proxy_set_header Host $host;

   proxy_set_header X-Real-IP $remote_addr;
   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 }

下载

http://www.stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz

[root@http02 mod_rpaf-0.6]# yum install httpd-devel
[root@http02 mod_rpaf-0.6]# apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c

[root@http02 mod_rpaf-0.6]# ls /usr/lib64/httpd/modules/mod_rpaf-2.0.so
/usr/lib64/httpd/modules/mod_rpaf-2.0.so
[root@http02 mod_rpaf-0.6]#
RPAFenable On
# Enable reverse proxy add forward
RPAFproxy_ips 127.0.0.1 10.0.0.1
# which ips are forwarding requests to us
RPAFsethostname On
# let rpaf update vhost settings
# allows to have the same hostnames as in the “real”
# configuration for the forwarding Apache
RPAFheader X-Forwarded-For
# Allows you to change which header mod_rpaf looks
# for when trying to find the ip the that is forwarding
# our requests

#201403191741 nginx proxy
LoadModule rpaf_module modules/mod_rpaf-2.0.so
RPAFenable On
RPAFproxy_ips 127.0.0.1 10.0.0.1
RPAFsethostname On
RPAFheader X-Forwarded-For

RPAFenable On
RPAFproxy_ips 192.168.197.65
RPAFsethostname On
RPAFheader X-Forwarded-For
[root@http02 mod_rpaf-0.6]# apachectl graceful
httpd: Could not reliably determine the server’s fully qualified domain name, using http02.hk.linuxcache-cloud.net for ServerName
[root@http02 mod_rpaf-0.6]#

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)