如何在Apache Tomacat中正确设置SSL? HTTP工作正常

时间:2018-12-26 05:33:50

标签: apache ssl ssl-certificate centos7 tomcat8

HTTPS在Nginx前端工作正常,但登录被拒绝,HTTP也工作正常。 这是Chrome控制台中显示的错误 无法加载资源:net :: ERR_SSL_PROTOCOL_ERROR favicon.ico:1无法加载资源:服务器响应状态为500()。 我已经创建了abc.jks文件。 我的server.xml配置看起来像这样

<Connector port="8080" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->

<Connector executor="tomcatThreadPool"
           port="8080" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443" />

<Connector protocol="org.apache.coyote.http11.Http11NioProtocol"
       port="8443" maxThreads="200"
       scheme="https" secure="true" SSLEnabled="true"
       keystoreFile="/etc/ssl/certs/abc.jks" keystorePass="MYPASSWORD"
       clientAuth="false" sslProtocol="TLS"/>

<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
     This connector uses the NIO implementation that requires the JSSE
     style configuration. When using the APR/native implementation, the
     OpenSSL style configuration is required as described in theAPR/native
     documentation -->

  <!-- <Connector
    port="8443"protocol="org.apache.coyote.http11.Http11NioProtocol"
           maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
           clientAuth="false" sslProtocol="TLS" />
   -->    ` 

0 个答案:

没有答案