天天看點

linux tomcat8.5配置https ssl 安全證書 PFX版

進入tomcat檔案夾找到conf檔案夾下面的service.xml然後配置

如下圖

linux tomcat8.5配置https ssl 安全證書 PFX版

一開始上面這一段落是被注釋的是以要去掉注釋符号

<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true" URIEncoding="UTF-8">
        <SSLHostConfig>
            <Certificate certificateKeystoreFile="conf/1354467_**********.pfx"   
                         ertificateKeystoreType="PKCS12"
                                certificateKeystorePassword="**********"
                                 certificateKeyAlias="alias" />
        </SSLHostConfig>
    </Connector>

           

certificateKeystorePassword是證書密碼,我用的是阿裡雲的證書

配置後重新開機tomcat 重新開機要等很久 要等很久 要等很久 我啟動了大概十幾分鐘才成功,如何判斷tomcat啟動成功呢

輸入

netstat -ntlp

看到如下圖就啟動成功了

linux tomcat8.5配置https ssl 安全證書 PFX版
linux tomcat8.5配置https ssl 安全證書 PFX版