{"id":515,"date":"2010-05-27T12:00:25","date_gmt":"2010-05-27T12:00:25","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/docs\/?p=515"},"modified":"2023-05-12T13:23:56","modified_gmt":"2023-05-12T19:23:56","slug":"using-ssl-on-stand-alone-tomcat","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/techblog\/?ht_kb=using-ssl-on-stand-alone-tomcat","title":{"rendered":"Using SSL on Stand Alone Tomcat"},"content":{"rendered":"<p>On a recent client project, I had the opportunity to setup SSL for generated applications. \u00a0I&#8217;d like to share a document that I used to help me through it.<\/p>\n<p>&#8212;&#8211;<\/p>\n<p>This link describes how to configure SSL support on Tomcat 6. Please read the whole document to gain basic understanding of SSL mechanism and consequence of using SSL.<\/p>\n<p><a href=\"https:\/\/tomcat.apache.org\/tomcat-6.0-doc\/ssl-howto.html\" target=\"_blank\" rel=\"noopener\">https:\/\/tomcat.apache.org\/tomcat-6.0-doc\/ssl-howto.html<\/a><\/p>\n<p>For example, if we want to run m-power generated apps on SSL we need to do the following 2 steps: (assuming you are using JDK 1.6)<\/p>\n<p>1. Create a keystore file by type this at a command line:<\/p>\n<p>C:\\&gt;keytool -genkey -alias tomcat -keyalg RSA<\/p>\n<p>(we have entered password as \u2018changeit\u2019 to simplify the process). A file .keystore is created in you home directory. Tomcat by default will look in this location for this file.<\/p>\n<p>2. Modify server.xml file to add these lines to the applicable connector: (you may already have these lines in the file and you only need to uncomment them out)<\/p>\n<pre>maxThreads=\"150\" minSpareThreads=\"25\" maxSpareThreads=\"75\"\r\nenableLookups=\"false\" disableUploadTimeout=\"true\"\r\nacceptCount=\"100\" debug=\"0\" scheme=\"https\" secure=\"true\"\r\nclientAuth=\"false\" sslProtocol=\"TLS\" \/&gt;<\/pre>\n<p>Of course, because we created this Key ourselves, our browser is going to complain that the certificate is not authentic. That makes sense &#8212; Firefox or IE cannot trust me (or you!). In a real world scenario (i.e. banking), you will need to buy a key from a reputable company. This key would then replace the one you created in step #1.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On a recent client project, I had the opportunity to setup SSL for generated applications. \u00a0I&#8217;d like to share a document that I used to help me through it. &#8212;&#8211; This link describes how to configure SSL support on Tomcat 6. Please read the whole document to gain basic understanding&#8230;<\/p>\n","protected":false},"author":3,"comment_status":"closed","ping_status":"open","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[],"ht-kb-tag":[],"class_list":["post-515","ht_kb","type-ht_kb","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=515"}],"version-history":[{"count":13,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/515\/revisions"}],"predecessor-version":[{"id":11739,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/515\/revisions\/11739"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=515"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-category&post=515"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-tag&post=515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}