您的位置:首页 > 理论基础 > 计算机网络

Tomcat配置部分页面Https访问

2015-04-01 23:07 274 查看
1、首先对Tomcat进行认证配置(参见:https单向/双向认证的tomcat配置攻略

/article/4110408.html

2、修改tomcat下的conf的web.xml文件,在</web-app>前面增加要https访问的路径的配置。如:(下面代表以 /mm/或/fi/开头的路径系统将自动转为https)

<security-constraint>

<web-resource-collection>

<web-resource-name>must https</web-resource-name>

<url-pattern>/mm/*</url-pattern>

</web-resource-collection>

<user-data-constraint>

<transport-guarantee>CONFIDENTIAL</transport-guarantee>

</user-data-constraint>

</security-constraint>

<security-constraint>

<web-resource-collection>

<web-resource-name>must https</web-resource-name>

<url-pattern>/fi/*</url-pattern>

</web-resource-collection>

<user-data-constraint>

<transport-guarantee>CONFIDENTIAL</transport-guarantee>

</user-data-constraint>

</security-constraint>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: