西数超哥博客
运维经验教程分享

tomcat配置ssl

 

 

tomcat配置ssl.支持https

1,找到tomcat安装目录conf/server.xml

<!–

<Connector port=”8443″ protocol=”HTTP/1.1″ SSLEnabled=”true”

maxThreads=”150″ scheme=”https” secure=”true”

clientAuth=”false” sslProtocol=”TLS” />

–>

取消注释改为(keystoreFile为证书文件目录,keystorePass证书密码):

<Connector port=”443″ protocol=”org.apache.coyote.http11.Http11Protocol” SSLEnabled=”true”

maxThreads=”150″ scheme=”https” secure=”true”

keystoreFile=”conf\SHA256withRSA_www.591kst.com.jks”

keystorePass=”990416wlm”

clientAuth=”false” sslProtocol=”TLS” />

2,将以下两处8443端口改443

<Connector port=”80″

<Connector port=”8009″

3,项目web.xml 添加

<security-constraint>

<web-resource-collection >

<web-resource-name >SSL</web-resource-name>

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

</web-resource-collection>

 

<user-data-constraint>

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

</user-data-constraint>

</security-constraint>

4,重启tomcat

赞(0)
声明:本站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,若涉及侵权请及时告知,将会在第一时间删除。本站原创内容未经允许不得转载:西数超哥博客 » tomcat配置ssl