• tomcat配置多个ssl证书


    下载 ssl 证书就不说了,只看 server.xml 配置

    <?xml version="1.0" encoding="UTF-8"?>
    
    <!--  访问 80 重定向到 443 --> <Connector port="80" maxHttpHeaderSize="8192" address="0.0.0.0" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" />
      <!-- 特别注意 defaultSSLHostConfigName 要配置一个默认的访问域名 --> <Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true" defaultSSLHostConfigName="www.test.a.com"> <SSLHostConfig hostName="www.test.a.com"> <Certificate certificateKeystoreFile="D: omcatapache-tomcat-8.5.20cert1a.pfx" certificateKeystorePassword="a的密码" certificateKeystoreType="PKCS12" /> </SSLHostConfig> <SSLHostConfig hostName="www.test.b.com"> <Certificate certificateKeystoreFile="D: omcatapache-tomcat-8.5.20cert2.pfx" certificateKeystorePassword="b的密码" certificateKeystoreType="PKCS12" /> </SSLHostConfig> </Connector> <Connector port="8009" protocol="AJP/1.3" redirectPort="443" /> <Engine name="Catalina" defaultHost="www.test.a.com"> <Realm className="org.apache.catalina.realm.LockOutRealm"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> </Realm>
        <!-- 这里配置的两个域名访问的是同一个 项目 --> <Host name="www.test.a.com" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Alias>www.test.a.com</Alias> <Alias>www.test.b.com</Alias> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" /> </Host> </Engine> </Service> </Server>
  • 相关阅读:
    Zookeeper入门
    Redis五种数据类型
    shardingJDBC分库分表
    RabbitMQ入门
    Spring-Boot
    spring-mvc
    oracle一些对表的操作命令
    对IFeatureClass的选择结果进行再次选择及排序
    关于基础 DBMS 错误 ORA-01654的总结
    Linq 如何实现 in 与 not in
  • 原文地址:https://www.cnblogs.com/wujiaxing/p/13666676.html
Copyright © 2020-2023  润新知