{"id":1465,"date":"2013-08-19T22:02:46","date_gmt":"2013-08-19T10:02:46","guid":{"rendered":"http:\/\/www.zoyinc.com\/?p=1465"},"modified":"2013-09-29T19:47:36","modified_gmt":"2013-09-29T06:47:36","slug":"how-to-get-the-mod_jk-connector-for-apache","status":"publish","type":"post","link":"http:\/\/www.zoyinc.com\/?p=1465","title":{"rendered":"How to get the mod_jk connector for Apache"},"content":{"rendered":"<p style=\"text-align: left;\"><a  href=\"http:\/\/www.apache.org\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-1467\" alt=\"\" src=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2013\/08\/ApacheModJK1.jpg\" width=\"536\" height=\"109\" srcset=\"http:\/\/www.zoyinc.com\/wp-content\/uploads\/2013\/08\/ApacheModJK1.jpg 894w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2013\/08\/ApacheModJK1-150x30.jpg 150w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2013\/08\/ApacheModJK1-300x60.jpg 300w, http:\/\/www.zoyinc.com\/wp-content\/uploads\/2013\/08\/ApacheModJK1-500x101.jpg 500w\" sizes=\"auto, (max-width: 536px) 100vw, 536px\" \/><\/a>If you want to run Tomcat from behind Apache as many people do then you need to find a method of sending requests from Apache to Tomcat. One of the popular mechanisms is to use &#8220;mod_jk&#8221;. The problem is that Apache or httpd does not generally come with mod_jk.<\/p>\n<p>I had this problem when I upgraded to Apache 2.4 recently and could not find a binary mod_jk for Fedora 18. Actually I was running Apache HTTP server 2.4, Tomcat 6.0.35, Java 1.6.0_23 and Fedora 18. I spent a lot of time looking and started to find a few articles on building mod_jk. I came to the conclusion that if you run Apache and Tomcat on Linux then you can probably build it yourself.<\/p>\n<p>You know what&#8230;&#8230;&#8230;. actually it&#8217;s pretty easy \ud83d\ude0e<\/p>\n<h2>Resources<\/h2>\n<p>Build MOD_JK connector<br \/>\n<a  href=\"http:\/\/www.openscope.net\/2010\/01\/02\/install-mod_jk\/\">http:\/\/www.openscope.net\/2010\/01\/02\/install-mod_jk\/<\/a><\/p>\n<p>Tomcat website<br \/>\n<a  href=\"http:\/\/tomcat.apache.org\/\">http:\/\/tomcat.apache.org\/<\/a><\/p>\n<p>Apache HTTP server website<br \/>\n<a  href=\"http:\/\/projects.apache.org\/projects\/http_server.html\">http:\/\/projects.apache.org\/projects\/http_server.html<\/a><\/p>\n<p>Tomcat mod_jk connector<br \/>\n<a  href=\"http:\/\/tomcat.apache.org\/download-connectors.cgi\">http:\/\/tomcat.apache.org\/download-connectors.cgi<\/a><\/p>\n<h2>Steps<\/h2>\n<table class=\"zsteps\" border=\"0\">\n<tbody>\n<tr>\n<td>1.<\/td>\n<td>Download the Tomcat connector from the Tomcat mod_jk connector page. In my case I downloaded &#8220;tomcat-connectors-1.2.37-src.tar.gz&#8221;<\/td>\n<\/tr>\n<tr>\n<td>2.<\/td>\n<td>Copy to a directory, in my case &#8220;\/tmp\/mod_jk&#8221; and run<\/p>\n<pre class=\"crayon:false;\">tar -zxvf tomcat-connectors-1.2.37-src.tar.gz<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td>3.<\/td>\n<td>After extracting the gzip file move to the new \u201cnative\u201d directory. In my case&nbsp;<\/p>\n<p style=\"padding-left: 30px;\">\/tmp\/mod_jk\/tomcat-connectors-1.2.37-src\/native<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>4.<\/td>\n<td>You need to find out where apsx is on your system. Often this comes with the \u201chttpd-devel\u201d RPM. You can check by finding httpd-devel in YumEx and looking for the packaged files. In my case it was at:&nbsp;<\/p>\n<p style=\"padding-left: 30px;\">\/usr\/bin\/apsx<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>5.<\/td>\n<td>From the same directory \u201cnative\u201d run:<\/p>\n<pre class=\"crayon:false; crayon-selected\">.\/configure --with-apxs=\/usr\/bin\/apxs\r\nmake\r\nmake install<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>You should find a copy of &#8220;mod_jk.so&#8221; with your other Apache modules which in my case was:<\/p>\n<p style=\"padding-left: 30px;\">\/usr\/lib\/httpd\/modules<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to run Tomcat from behind Apache as many people do then you need to find a method of sending requests from Apache to Tomcat. One of the popular mechanisms is to use &#8220;mod_jk&#8221;. The problem is that Apache or httpd does not generally come with mod_jk. I had this problem when I [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1473,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[305,163,296,161,162],"class_list":["post-1465","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-apache","tag-connector","tag-fedora","tag-mod_jk","tag-tomcat"],"_links":{"self":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/1465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1465"}],"version-history":[{"count":7,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/1465\/revisions"}],"predecessor-version":[{"id":1614,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/1465\/revisions\/1614"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/media\/1473"}],"wp:attachment":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1465"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}