码迷,mamicode.com
首页 > Web开发 > 详细

apache2.2 做后端,增加真实ip到日志中

时间:2016-10-06 22:44:43      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

apache2.2使用mod_remoteip模块

 

一.安装

wget https://github.com/ttkzw/mod_remoteip-httpd22/raw/master/mod_remoteip.c
/usr/local/apache/bin/apxs -i -c -n mod_remoteip.so mod_remoteip.c

 

 

二.添加Apache配置
vi /usr/local/apache/conf/httpd.conf
Include conf/extra/httpd-remoteip.conf
vi /usr/local/apache/conf/extra/httpd-remoteip.conf
LoadModule remoteip_module modules/mod_remoteip.so
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 127.0.0.1 #多个前端代理,请用空格分隔

 

apache2.2 做后端,增加真实ip到日志中

标签:

原文地址:http://www.cnblogs.com/itfenqing/p/5934961.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!