阿里云windows服务器tomcat配置https方法
阿里云windows服务器tomcat配置https方法
阿里云windows服务器tomcat配置https方法

标题将下载的文件放进tomcat解压文件中

1.找到tomcat conf 中server.xml

修改为
 <Connector port="80" protocol="HTTP/1.1"
  connectionTimeout="20000"
  redirectPort="443" />   
		//修改为keystoreFile:证书地址     keystorePass:密码
	<Connector port="443"
    protocol="org.apache.coyote.http11.Http11Protocol"
    SSLEnabled="true"
    scheme="https"
    secure="true"
    keystoreFile="C:/develop/apache-tomcat-8.5.32/cert/xxxxxxxx.pfx"
    keystoreType="下载下来文件中的密码"
    keystorePass="S5nP164i"
    clientAuth="false"
    SSLProtocol="TLSv1+TLSv1.1+TLSv1.2"
    ciphers="TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256"/>
 

2.修改tomcat conf web.xml

</welcome-file-list>后面添加
  <login-config>  
    <!-- Authorization setting for SSL -->  
    <auth-method>CLIENT-CERT</auth-method>  
    <realm-name>Client Cert Users-only Area</realm-name>  
</login-config>  
<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>

最后如果不行查看服务器安全规则是否添加

最后在服务器实例中添加安全规则  入方向 自定义TCP 端口443/443   IPV4地址段访问  授权对象0.0.0.0/0

相关文章:

  • 2021-09-30
  • 2021-04-17
  • 2021-12-13
  • 2021-12-02
  • 2021-11-22
  • 2021-04-10
猜你喜欢
  • 2021-11-22
  • 2021-09-27
  • 2021-11-28
  • 2021-12-08
  • 2022-12-23
相关资源
相似解决方案