{"id":6005,"date":"2016-07-12T22:42:08","date_gmt":"2016-07-12T14:42:08","guid":{"rendered":"http:\/\/rmohan.com\/?p=6005"},"modified":"2016-07-12T22:42:08","modified_gmt":"2016-07-12T14:42:08","slug":"configure-apache-with-multiple-weblogic-server-instances","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6005","title":{"rendered":"Configure Apache with multiple weblogic server instances"},"content":{"rendered":"<p><strong>Configure Apache with multiple weblogic server instances<\/strong><br \/>\nI came across a unique situation at work where I needed to configure Apache web server to forward requests to multiple weblogic server instances running on same box but different port numbers. Here is the scenario:<\/p>\n<p>Instance A &#8211; http:\/\/test_server:7001\/App1(Domain I)<br \/>\nInstance B &#8211; http:\/\/test_server:7003\/App2 (Domain II)<br \/>\nInstance C &#8211; http:\/\/test_server:7005\/App3 (Domain III)<\/p>\n<p>I have App1 deployed on instance1 which is running in domain I. Similarly App2 deployed on instance 2, app3 deployed on instance 3. Needless to say all domains running in different ports(non-clustered environment).<\/p>\n<p>Now I would like to configure my Apache to forward request to respective URLs based on what do they type in the URL.<\/p>\n<p>If they type http:\/\/test_server\/App1 should go to instance A.<br \/>\nIf they type http:\/\/test_server\/App2 should go to instance B.<br \/>\nIf they type http:\/\/test_server\/App3 should go to instance C.<\/p>\n<p>When I use <IfModule> tag with location combination it did not work for me. But when I use <Location> tag for each app\/instance in httpd.conf, it worked. Hope this information helps.  <\/p>\n<p>#### for Instance 1\/App1<br \/>\n<Location \/App1><br \/>\n       SetHandler weblogic-handler<br \/>\n       WebLogicHost test_server<br \/>\n       WebLogicPort 7001<br \/>\n       WLCookieName cookie1<br \/>\n       DynamicServerList OFF<br \/>\n       MaxPostSize     2048<br \/>\n       Debug ALL<br \/>\n       WLLogFile logs\/httpd_proxy1.log<br \/>\n<\/Location><\/p>\n<p>#### for Instance2\/App2<\/p>\n<p><Location \/App2><br \/>\n       SetHandler weblogic-handler<br \/>\n       WebLogicHost test_server<br \/>\n       WebLogicPort 7003<br \/>\n       WLCookieName cookie2<br \/>\n       DynamicServerList OFF<br \/>\n       MaxPostSize     2048<br \/>\n       Debug ALL<br \/>\n       WLLogFile logs\/httpd_proxy1.log<br \/>\n<\/Location><\/p>\n<p>#### for Instance3\/App3<br \/>\n<Location \/App3><br \/>\n       SetHandler weblogic-handler<br \/>\n       WebLogicHost test_server<br \/>\n       WebLogicPort 7005<br \/>\n       WLCookieName cookie3<br \/>\n       DynamicServerList OFF<br \/>\n       MaxPostSize     2048<br \/>\n       Debug ALL<br \/>\n       WLLogFile logs\/httpd_proxy1.log<br \/>\n<\/Location><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Configure Apache with multiple weblogic server instances I came across a unique situation at work where I needed to configure Apache web server to forward requests to multiple weblogic server instances running on same box but different port numbers. Here is the scenario:<\/p>\n<p>Instance A &#8211; http:\/\/test_server:7001\/App1(Domain I) Instance B &#8211; http:\/\/test_server:7003\/App2 (Domain II) Instance [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6005"}],"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=6005"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6005\/revisions"}],"predecessor-version":[{"id":6006,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6005\/revisions\/6006"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}