apache反向代理tomcat获取用户真实IP

校内CAS单点登录的审计日志中,用户的IP地址一直是服务器地址。这个问题拖了好久,今天终于解决了。
通过追查日志的来源,发现是自己实现了一个appender配置在了log4j中。
从这个类入手开始追查代码,最终发现IP的来源是通过request.getRemoteAddr这个方法来获得


More.....

HTTPS证书制作和配置示例

今天在校内尝试从git.bistu.edu.cn克隆代码,使用https协议时候发现clone失败,于是开始实验,使用curl连接cas.bistu.edu.cn、x.bistu.edu.cn、chat.bistu.edu.cn、community.bistu.edu.cn、site.bistu.edu.cn
发现只有cas和site正常,其他的都报错了,但是浏览器访问并未发现错误。
联想之前ZFZ的safari访问git报错


More.....

Apache+Tomcat8的HTTPS配置+反向代理

http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html

1.生成tomcat自签名证书
keytool -genkey -alias tomcat -keyalg RSA -keystore self.jks

Enter keystore password: 设置keystore密码
Re-enter new password: 设置keystore密码
What is your first and last name?
[Unknown]: localhost 输入localhost
What is the name of your organizational unit?
[Unknown]:
What is the name of your organization?
[Unknown]:
What is the name of your City or Locality?
[Unknown]:
What is the name of your State or Province?
[Unknown]:
What is the two-letter


More.....