让tomcat同时支持80 443 http https

song  7月前
0


在server.xml中开启两个connector

  1. <Connector port="8080" maxHttpHeaderSize="8192"  
  2.                maxThreads="150" minSpareThreads="25" maxSpareThreads="75"  
  3.                enableLookups="false" redirectPort="8443" acceptCount="100"  
  4.                connectionTimeout="20000" disableUploadTimeout="true"/>  

  1. <Connector port="8081" maxHttpHeaderSize="8192"  
  2.                maxThreads="150" minSpareThreads="25" maxSpareThreads="75"  
  3.                enableLookups="false" disableUploadTimeout="true"  
  4.                acceptCount="100" scheme="https" secure="true"  
  5.                clientAuth="false" sslProtocol="TLS" keystorePass="123456" keystoreFile="d:/tomcat.keystore"/>  

游客  现在