Specifying Tomcat ports in IntelliJ IDEA to use multiple tomcat servers

Source from: http://www.altuure.com/2008/11/12/tomcat-port-configuration/

Edit the server.xml:

<Server port="${tomcat.init.port}1" shutdown="SHUTDOWN">

<Service name="Catalina">
<Connector port="${tomcat.init.port}2" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="${tomcat.init.port}3"/>
<Connector port="${tomcat.init.port}3" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"/>
<Connector port="${tomcat.init.port}4" protocol="AJP/1.3" redirectPort="${tomcat.init.port}3"/>

</Service>
</Server>

Run it like this:

CATALINA_OPTS=-Dtomcat.init.port=908
 ./startup.sh

so you will have

SHUTDOWN:9081
 HTTP:9082
 HTTPS:9083
 AJP:9084

Tomcat and SSL (keystore file)

Tomcat and SSL (keystore file)

http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html

To install and configure SSL support on Tomcat 6, you need to follow these simple steps. For more information, read the rest of this HOW-TO.

  1. Create a certificate keystore by executing the following command:
  2. Windows:

    %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA

    Unix:

    $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA

    and specify a password value of “changeit”.
    Uncomment the “SSL HTTP/1.1 Connector” entry in $CATALINA_BASE/conf/server.xml and tweak as necessary.

<Connector port=”8443″ minSpareThreads=”5″ maxSpareThreads=”75″ enableLookups=”true” disableUploadTimeout=”true” acceptCount=”100″  maxThreads=”200″ scheme=”https” secure=”true” SSLEnabled=”true” keystoreFile=”${user.home}/.keystore” keystorePass=”changeit” clientAuth=”false” sslProtocol=”TLS”/>