tomcat https 认证
作者:互联网
文件位置:tomcat/conf/server.xml 修改为: <Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="443" URIEncoding="UTF-8" /> <Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true" keystoreFile="conf\cert\***.***.***.jks" keystorePass="z5166825awh8sg6"/> <Connector port="8009" protocol="AJP/1.3" redirectPort="443" />
解释:
keystoreFile:证书文件位置 根据自己的文件改名字
keystorePass:私钥密码
文件位置:tomcat/conf/web.xml 加入: <security-constraint> <!-- Authorization setting for SSL --> <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>
标签:xml,文件,https,tomcat,位置,认证,conf,改名字 来源: https://www.cnblogs.com/engzhangkai/p/12576525.html