我尝试为tomcat 8.5.20中不同位置的两个域配置两个连接器。但是,只有第一个域正常工作。第二个导致chrome上的错误NET :: ERR_CERT_COMMON_NAME_INVALID。
<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150"
SSLEnabled="true" defaultSSLHostConfigName="www.datalearner.com" >
<SSLHostConfig hostName="www.datalearner.com">
<Certificate certificateKeystoreFile="/usr/local/tomcat/sslforfree/ssl.jks"
certificateKeystorePassword="xxx" type="RSA" />
</SSLHostConfig>
<SSLHostConfig hostName="admin.localgou.com">
<Certificate certificateKeystoreFile="/usr/local/apache-tomcat-8.5.20/certification/admin.localgou.com.jks"
certificateKeystorePassword="xxx" type="RSA" />
</SSLHostConfig>
</Connector>
当我更改订单时,例如:
<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150"
SSLEnabled="true" defaultSSLHostConfigName="admin.localgou.com" >
<SSLHostConfig hostName="admin.localgou.com">
<Certificate certificateKeystoreFile="/usr/local/apache-tomcat-8.5.20/certification/admin.localgou.com.jks"
certificateKeystorePassword="xxx" type="RSA" />
</SSLHostConfig>
<SSLHostConfig hostName="www.datalearner.com">
<Certificate certificateKeystoreFile="/usr/local/tomcat/sslforfree/ssl.jks"
certificateKeystorePassword="xxx" type="RSA" />
</SSLHostConfig>
</Connector>
然后浏览www.datalearner.com会出现同样的错误。