一、设置X-Forwarded-For段
nginx配置示例:
复制代码 代码如下:server
{
location
{
...
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
...
}
}
二、在iis站点上安装isapi filter
在f5的开发论坛上找到的,按开发者的话说,是为了解决iis放在f5后记录不到用户ip的问题,管他前端是f5还是nginx还是squid还是haproxy,都可以用。
装完之后重启下iis即可。
https://devcentral.f5.com/weblogs/Joe/archive/2009/08/19/x_forwarded_for_log_filter_for_windows_servers.aspx
安装方法,从官方文档复制了过来的,大家看看咯。
Installation
Follow these steps to install the filter.
Download and unzip the F5XForwardedFor.zip distribution.
Copy the F5XForwardedFor.dll file from the x86\Release or x64\Release directory (depending on your platform) into a target directory on your system. Let's say C:\ISAPIFilters.
Ensure that the containing directory and the F5XForwardedFor.dll file have read permissions by the IIS process. It's easiest to just give full read access to everyone.
Open the IIS Admin utility and navigate to the web server you would like to apply it to.
For IIS6, Right click on your web server and select Properties. Then select the "ISAPI Filters" tab. From there click the "Add" button and enter "F5XForwardedFor" for the Name and the path to the file "c:\ISAPIFilters\F5XForwardedFor.dll" to the Executable field and click OK enough times to exit the property dialogs. At this point the filter should be working for you. You can go back into the property dialog to determine whether the filter is active or an error occurred.
For II7, you'll want to select your website and then double click on the "ISAPI Filters" icon that shows up in the Features View. In the Actions Pane on the right select the "Add" link and enter "F5XForwardedFor" for the name and "C:\ISAPIFilters\F5XForwardedFor.dll" for the Executable. Click OK and you are set to go.
I'd love to hear feedback on this and if there are any other feature request, I'm wide open to suggestions. The source code is included in the download distribution so if you make any changes yourself, let me know!
Good luck and happy filtering!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?
更新日志
- 【原神】璃月特产「绝云椒椒」速刷路线,共160个
- 群星.2024-时光正好电视剧影视原声带【光影岁月】【FLAC分轨】
- 范文芳.2000-没有问题【EMI百代】【WAV+CUE】
- 群星.1996-华纳挚爱金曲十六首【华纳】【WAV+CUE】
- 刘若英 极具珍藏《滚石SACD系列刘若英精选》[ISO][1GB]
- 王杰 经典精品汇集《杰出精选·老歌回忆录》[WAV/分轨][460MB]
- 《周传雄 情歌教父作品精选 LPHD-CD版》[WAV+CUE][500MB]
- 塔瑞斯世界各职业有什么特性 全职业特性介绍
- 英雄联盟上路最新攻略 英雄联盟上单玩什么好
- Steam平台掀起“类香蕉”游戏热潮:玩家反响不一!
- 《剑网3无界》公测袭来 天时地利不如“人和”
- 《魔兽世界》国服开服时间确定!技术测试即将结束
- Mantovani2004-TheMantovaniSceneTheMantovaniSound[FLAC+CUE]
- 用最心动的情歌纪念《试听第6感HQ》2CD[WAV]
- [试音天碟]群星《360°完美车厢紫银合金AQCD》[WAV+CUE].