第一步
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
改:
<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="443" />
第二步
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
改:
<Connector port="8009" protocol="AJP/1.3" redirectPort="443" />
第三步
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
maxThreads="150" SSLEnabled="true" >
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
<SSLHostConfig>
<Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
certificateFile="conf/localhost-rsa-cert.pem"
certificateChainFile="conf/localhost-rsa-chain.pem"
type="RSA" />
</SSLHostConfig>
</Connector>
-->
改:
<Connector port="443" protocol="org.apache.coyote.http11.Http11Nio2Protocol" maxThreads="150" SSLEnabled="true" defaultSSLHostConfigName="默认域名" >
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
<SSLHostConfig hostName="域名1" >
<Certificate certificateKeystoreFile="conf/域名1-tomcat.pfx" certificateKeystorePassword="域名1密码" type="RSA"/>
</SSLHostConfig>
<SSLHostConfig hostName="域名2">
<Certificate certificateKeystoreFile="conf/域名2-tomcat.pfx" certificateKeystorePassword="域名2密码" type="RSA"/>
</SSLHostConfig>
</Connector>
第四步
修改host
<Host name="域名1" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
<Context path="" reloadable="true" docBase="webapps下项目名称"/>
</Host>
<Host name="域名2" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
<Context path="" reloadable="true" docBase="webapps下项目名称"/>
</Host>
记得开放80和443端口
评论 (0)