简体   繁体   中英

Use SSL with maven cargo tomcat plugin

I see this post for configuring SSL with Maven Jetty Plugin.

HowTo use https / ssl with Maven/Mortbay Jetty Plugin?

Can someone pls tell me how to do it with cargo plugin for tomcat 7?

By adding these parameters in cargo plugin configuration tag I was able to configure SSL.

<cargo.servlet.port>8443</cargo.servlet.port>
<cargo.protocol>https</cargo.protocol>
<cargo.tomcat.connector.clientAuth>false</cargo.tomcat.connector.clientAuth>
<cargo.tomcat.connector.sslProtocol>TLS</cargo.tomcat.connector.sslProtocol>
<cargo.tomcat.connector.keystoreFile>path/to/kestorefile</cargo.tomcat.connector.keystoreFile>
<cargo.tomcat.connector.keystorePass>password to the keystore</cargo.tomcat.connector.keystorePass>
<cargo.tomcat.connector.keyAlias>your_alias</cargo.tomcat.connector.keyAlias>
<cargo.tomcat.httpSecure>true</cargo.tomcat.httpSecure>

If you are following the general Tomcat SSL configuration instructions at http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html , set your keyAlias to be "tomcat". If you omit the cargo.tomcat.connector.keyAlias property, your key should have the alias "mykey" in your keystore.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM