F5+weblogic 如何在weblogic的access.log中记录F5之前的应用ip?
2015-11-15 19:55
656 查看
场景介绍:
用户端------------>F5------------------>应用系统(weblogic应用服务器)
应用系统的access日志中记录的信息全部是F5的地址而非用户端的实际IP地址,
1、经过查找F5的资料,发现F5中有这样一个配置项:X-Forwarded-For,指向的是F5地址,导致access日志记录的是F5地址。另外,检查http
profile配置,将参数Insert X-Forwarded-For配置启用,F5会将用户的IP地址插入X-Forwarded-For 作为标头,才在weblogic的access日志中记录用户的实际IP地址。
2、登录weblogic控制台
第一步:
AdminConsole —> Servers —-> [Your_Server_Name] —> Configuration [Tab] —> General [Sub-Tab] —>
- Click on “Advanced” Link
- Check the CheckBox in this Page “WebLogic Plug-In Enabled”
“WL-Proxy-Client-IP”
第二步:
Servers –> [YOUR_SERVER_NAME] —> Logging [Tab] —> HTTP [sub-tab]
- Click on Advanced Link at the bottom of the page
- In the “Extended Logging Format Fields:” Just add the
c-ip at the beginning or at the end of the values and save it.
这里附上自定义日志字段的api:https://docs.oracle.com/cd/E13222_01/wls/docs81/adminguide/web_server.html#http_log
参考章节:Supported Field identifiers
第三步:
Servers -> [YOUR_SERVER_NAME] -> Protocols -> HTTP [sub-tab]
-In the 'Remote Address Override' text box enter 'X-Forwarded-For'
最后重启服务器!
转载请注明原创地址[http://write.blog.csdn.net/postedit/49851575],谢谢。
用户端------------>F5------------------>应用系统(weblogic应用服务器)
应用系统的access日志中记录的信息全部是F5的地址而非用户端的实际IP地址,
1、经过查找F5的资料,发现F5中有这样一个配置项:X-Forwarded-For,指向的是F5地址,导致access日志记录的是F5地址。另外,检查http
profile配置,将参数Insert X-Forwarded-For配置启用,F5会将用户的IP地址插入X-Forwarded-For 作为标头,才在weblogic的access日志中记录用户的实际IP地址。
2、登录weblogic控制台
第一步:
AdminConsole —> Servers —-> [Your_Server_Name] —> Configuration [Tab] —> General [Sub-Tab] —>
- Click on “Advanced” Link
- Check the CheckBox in this Page “WebLogic Plug-In Enabled”
“WL-Proxy-Client-IP”
第二步:
Servers –> [YOUR_SERVER_NAME] —> Logging [Tab] —> HTTP [sub-tab]
- Click on Advanced Link at the bottom of the page
- In the “Extended Logging Format Fields:” Just add the
c-ip at the beginning or at the end of the values and save it.
这里附上自定义日志字段的api:https://docs.oracle.com/cd/E13222_01/wls/docs81/adminguide/web_server.html#http_log
参考章节:Supported Field identifiers
第三步:
Servers -> [YOUR_SERVER_NAME] -> Protocols -> HTTP [sub-tab]
-In the 'Remote Address Override' text box enter 'X-Forwarded-For'
最后重启服务器!
转载请注明原创地址[http://write.blog.csdn.net/postedit/49851575],谢谢。
相关文章推荐
- hadoop 相关工具访问端口(转)
- VMware虚拟机中CentOS 6.5设置固定IP
- [1096]:A+B for Input-Output Practice (VIII)
- Spring Boot修改内置Tomcat端口号
- Java-反射再学习
- python基础知识六
- scala学习-基本数据类型和简单操作5
- 反射java
- 链表Java实现
- 如何在WEBI中合并几项
- UML总结之对象图
- opencv学习笔记(十八)——图像非线性滤波
- 如何使用IconFont字体图标代替网页图片?
- 读《探索需求-设计前的质量》有感一
- hdoj 4325 Flowers 【线段树||二分】
- Java Web容器的启动与处理请求的过程
- sicily 1027. MJ, Nowhere to Hide
- 《大道至简》第八章读后感
- linux修改进程名
- hdoj--1950--Bridging signals(二分查找+LIS)