{"id":252,"date":"2012-06-15T16:30:21","date_gmt":"2012-06-15T08:30:21","guid":{"rendered":"http:\/\/rmohan.com\/?p=252"},"modified":"2012-06-15T16:30:21","modified_gmt":"2012-06-15T08:30:21","slug":"jboss-with-apache-integration","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=252","title":{"rendered":"Jboss with Apache integration"},"content":{"rendered":"<p><strong>Jboss with Apache integration<\/strong><\/p>\n<p>Jboss Apache integration is same procedure of Tomcat Setup. \ud83d\ude42  so they are not hard to so.<\/p>\n<p>1) Download mod_jk module from<\/p>\n<p>http:\/\/www.gtlib.gatech.edu\/pub\/apache\/tomcat\/tomcat-connectors\/jk\/binaries\/linux\/jk-1.2.28\/i586\/<\/p>\n<p>2) Copy mod_jk-1.2.28-httpd-2.2.X.so to \/opt\/apacheconf<\/p>\n<p>3) Edit the httpd.conf and add the following line<br \/>\nInclude \/opt\/apacheconf\/mod-jk.conf<\/p>\n<p>4) Create \/opt\/apacheconf\/mod-jk.conf file with the following content<br \/>\nLoadModule jk_module \/opt\/apacheconf\/mod_jk-1.2.28-httpd-2.2.X.so<br \/>\nJkWorkersFile \/opt\/apacheconf\/workers.properties<br \/>\nJkLogFile \/opt\/apachelogs\/mod_jk.log<br \/>\nJkLogLevel info<br \/>\nJkLogStampFormat &#8220;[%a %b %d %H:%M:%S %Y]&#8221;<br \/>\nJkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories<br \/>\nJkRequestLogFormat &#8220;%w %V %T&#8221;<\/p>\n<p>JkMountFile \/opt\/apacheconf\/uriworkermap.properties<br \/>\nJkShmFile \/opt\/apachelogs\/jk.shm<\/p>\n<p><Location \/jkstatus><br \/>\nJkMount status<br \/>\n#Order deny,allow<br \/>\n#Deny from all<br \/>\n#Allow from 127.0.0.1<br \/>\n<\/Location><\/p>\n<p>5) Create \/opt\/apacheconf\/uriworkermap.properties file with the following content<br \/>\n# Simple worker configuration file<br \/>\n# Mount the Servlet context to the ajp13 worker<br \/>\n\/jmx-console=loadbalancer<br \/>\n\/jmx-console\/*=loadbalancer<br \/>\n\/web-console=loadbalancer<br \/>\n\/web-console\/*=loadbalancer<br \/>\n\/testWeb\/*=loadbalancer<br \/>\n!\/testWeb\/images\/*=loadbalancer<\/p>\n<p>6) Create \/opt\/apacheconf\/workers.properties file with the following content<br \/>\nworker.list=loadbalancer,status<br \/>\n# Define Node1<br \/>\n# modify the host as your host IP or DNS name.<br \/>\nworker.node1.port=8009<br \/>\nworker.node1.host={jboss-server-ip-address goes here}<br \/>\nworker.node1.type=ajp13<br \/>\nworker.node1.lbfactor=1<br \/>\nworker.node1.prepost_timeout=10000 #Not required if using ping_mode=A<br \/>\nworker.node1.connect_timeout=10000 #Not required if using ping_mode=A<br \/>\nworker.node1.ping_mode=A #As of mod_jk 1.2.27<br \/>\n# worker.node1.connection_pool_size=10 (1)<\/p>\n<p># Define Node2<br \/>\n# modify the host as your host IP or DNS name.<br \/>\n#worker.node2.port=8009<br \/>\n#worker.node2.host= node2.mydomain.com<br \/>\n#worker.node2.type=ajp13<br \/>\n#worker.node2.lbfactor=1<br \/>\n#worker.node2.prepost_timeout=10000 #Not required if using ping_mode=A<br \/>\n#worker.node2.connect_timeout=10000 #Not required if using ping_mode=A<br \/>\n#worker.node2.ping_mode=A #As of mod_jk 1.2.27<br \/>\n# worker.node1.connection_pool_size=10 (1)<\/p>\n<p># Load-balancing behaviour<br \/>\nworker.loadbalancer.type=lb<br \/>\n#worker.loadbalancer.balance_workers=node1,node2<br \/>\nworker.loadbalancer.balance_workers=node1<\/p>\n<p># Status worker for managing load balancer<br \/>\nworker.status.type=status<\/p>\n<p>The above configuration is to test with one app server functionally.<\/p>\n<p>7) Update \/opt\/apacheconf\/httpd-vhosts.conf with JkMount<br \/>\nListen 9080<br \/>\nNameVirtualHost *<br \/>\n<VirtualHost *><br \/>\nServerName {server-name}<br \/>\nServerAlias {alias}<br \/>\nJkMount \/testWeb loadbalancer<br \/>\nJkMount \/testWeb\/* loadbalancer<br \/>\n<\/VirtualHost><\/p>\n<p>8) Update the following line to include jvmRoute in \/opt\/jboss-eap-5.0\/jboss-as\/server\/default\/deploy\/jbossweb.sar\/server.xml<\/p>\n<p><Engine name=\"jboss.web\" defaultHost=\"localhost\" jvmRoute=\"domain-name-goes-here\"><\/p>\n<p>9) Restart Apache and JBOSS server<\/p>\n<p>10) Test the web server URL http:\/\/{domain-name}\/testWeb\/test.jsp<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jboss with Apache integration<\/p>\n<p>Jboss Apache integration is same procedure of Tomcat Setup. \ud83d\ude42 so they are not hard to so.<\/p>\n<p>1) Download mod_jk module from<\/p>\n<p>http:\/\/www.gtlib.gatech.edu\/pub\/apache\/tomcat\/tomcat-connectors\/jk\/binaries\/linux\/jk-1.2.28\/i586\/<\/p>\n<p>2) Copy mod_jk-1.2.28-httpd-2.2.X.so to \/opt\/apacheconf<\/p>\n<p>3) Edit the httpd.conf and add the following line Include \/opt\/apacheconf\/mod-jk.conf<\/p>\n<p>4) Create \/opt\/apacheconf\/mod-jk.conf file with the following content LoadModule jk_module \/opt\/apacheconf\/mod_jk-1.2.28-httpd-2.2.X.so JkWorkersFile [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/252"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=252"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/252\/revisions"}],"predecessor-version":[{"id":253,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/252\/revisions\/253"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}