tomcat支持https配置
外层套一个nginx配置ssl
<Service name="Catalina1"> <Connector connectionTimeout="20000" port="8080" address="0.0.0.0" protocol="HTTP/1.1" /> <Engine name="second_ssl" debug="0" defaultHost="localhost"> <Valve className="org.apache.catalina.valves.RemoteIpValve" remoteIpHeader="X-Forwarded-For" protocolHeader="X-Forwarded-Proto" protocolHeaderHttpsValue="https" httpsServerPort="443"/> <Host name="localhost" 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" /> </Host> <Host appBase="/usr/local/tomcat/webapps/maven-web-demo" autoDeploy="true" name="www.developzhe.com" unpackWARs="true"> <Context allowLinking="true" path="" docBase="/usr/local/tomcat/webapps/maven-web-demo" debug="0" /> </Host> <Host appBase="/usr/local/tomcat/webapps/maven-web-demo" autoDeploy="true" name="testcname.developzhe.com" unpackWARs="true"> <Context allowLinking="true" path="" docBase="/usr/local/tomcat/webapps/maven-web-demo" debug="0" /> </Host> </Engine> </Service> </Server>