Re: Re: Re: Jonas 5.2.1 and Apache mod_jk
"S. Ali Tokmen" <[email protected]> Sun, 02 Oct 2011 02:02:51 +0300
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------060009090907090007070602 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Celinio OK, well my personal recommendation is mod_proxy_ajp. It is officially maintained by the httpd project and has a great number of stability and performance improvements. If you want to hit the AJP port, you should connect to the Apache httpd server; i.e. not visit on the 9000 port but the 80 (or whatever other Apache httpd) port. Cheers S. Ali Tokmen http://ali.tokmen.com/ GSM (ch): +41 79 207 29 22 [Swisscom] GSM (fr): +33 66 43 00 555 [Orange] GSM (tr): +90 555 266 52 73 [Avea] My AIM, ICQ, MSN Messenger and Yahoo IM contact details are on http://contact.ali.tokmen.com On 2011/10/01 19:26, Celinio Fernandes wrote: > Hi Ali, > there is no specific reason. > > Anyways, how can i make sure my webapp is using the mod_jk connector ? > I have installed and configured it in Apache and I have also > configured it in Jonas. > I can also see the AJP/JK connector configured on port 8009 in the > Jonas console admin. > > Now how do i make sure my request hits Apache first and that Apache > redirects it to Jonas then ? > > -----------------------------------------------------------------------= - > *From:* S. Ali Tokmen <[email protected]> > *To:* [email protected] > *Sent:* Saturday, October 1, 2011 5:49 PM > *Subject:* [jonas] Re: Jonas 5.2.1 and Apache mod_jk > > Hi Celinio > > Is there a spacific reason why you're using mod_jk under Apache httpd > 2.2 as opposed to the already embedded mod_proxy_ajp? > > Thank you > > S. Ali Tokmen > http://ali.tokmen.com/ > > GSM (ch): +41 79 207 29 22 [Swisscom] > GSM (fr): +33 66 43 00 555 [Orange] > GSM (tr): +90 555 266 52 73 [Avea] > > My AIM, ICQ, MSN Messenger and Yahoo IM > contact details are on http://contact.ali.tokmen.com > > On 2011/10/01 18:37, Celinio Fernandes wrote: >> Hi, >> I am trying to interface my instance of Jonas 5.2.1 with the >> connector mod_jk, in a Linux environment (CentOS). >> I have added the module mod_jk.so <http://mod_jk.so> to >> /usr/lib64/httpd/modules. >> >> My version of Apache is 2.2 >> >> I have configured /etc/httpd/conf/httpd.conf as the following : >> >> LoadModule jk_module modules/mod_jk.so >> >> <IfModule jk_module> >> # Ou trouver workers.properties ? >> JkWorkersFile /etc/httpd/conf/workers.properties >> # Ou mettre la memoire partagee de jk >> JkShmFile /etc/httpd/logs/mod_jk.shm >> # Ou mettre les logs jk >> JkLogFile /etc/httpd/logs/mod_jk.log >> # Positionner le niveau des logs jk [debug/error/info] >> JkLogLevel info >> # Selectionner lef ormat des logs pour le timestamp >> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " >> #Format des logs >> JkRequestLogFormat "%w %m %V %T" >> # Envoyer les contextes dont le nom commence par test : /voltage* >> vers le worker nomm=E9 worker1 >> JkMount /toto*/* worker1 >> # On peut placer ici plusieurs JkMount si on a plusieurs contextes >> traites >> # par des workers differents >> </IfModule> >> >> I have added the following worker in /etc/httpd/conf/worker.properties= : >> >> #Define 1 worker >> worker.list=3Dworker1 >> =20 >> #Set properties for worker1 (ajp13) >> worker.worker1.type=3Dajp13 >> worker.worker1.host=3Dblabla.com >> worker.worker1.port=3D8009 >> >> Under /home/test/jonas-full-5.2.1/conf/ I have configured both >> tomcat6-server.xml and tomcat7-server.xml (since I do not know which >> one is used). I have uncommented the following line (changed port >> 9009 to 8009) >> >> <Connector port=3D"8009" protocol=3D"AJP/1.3" redirectPort=3D"9043" = /> >> >> My web app HTTP port in Jonas is configured to 9000. >> When I hit the URL http://blabla.com:9000/toto I can see in the Jonas >> logs that Jonas is listening to that connector but I have no idea >> whether Apache has handled the request or not. >> >> What can i do ? Am i missing something ? >> Thanks for helping. > > --------------060009090907090007070602 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> Hi Celinio<br> <br> OK, well my personal recommendation is mod_proxy_ajp. It is officially maintained by the httpd project and has a great number of stability and performance improvements.<br> <br> If you want to hit the AJP port, you should connect to the Apache httpd server; i.e. not visit on the 9000 port but the 80 (or whatever other Apache httpd) port.<br> <br> Cheers<br> <br> <pre class="moz-signature" cols="72">S. Ali Tokmen <a class="moz-txt-link-freetext" href="http://ali.tokmen.com/">http://ali.tokmen.com/</a> GSM (ch): +41 79 207 29 22 [Swisscom] GSM (fr): +33 66 43 00 555 [Orange] GSM (tr): +90 555 266 52 73 [Avea] My AIM, ICQ, MSN Messenger and Yahoo IM contact details are on <a class="moz-txt-link-freetext" href="http://contact.ali.tokmen.com">http://contact.ali.tokmen.com</a></pre> <br> On 2011/10/01 19:26, Celinio Fernandes wrote: <blockquote cite="mid:[email protected]" type="cite"> <div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"> <div><span>Hi Ali,</span></div> <div><span>there is no specific reason.</span></div> <div><br> <span></span></div> <div><span>Anyways, how can i make sure my webapp is using the mod_jk connector ?</span></div> <div><span>I have installed and configured it in Apache and I have also configured it in Jonas.</span></div> <div><span>I can also see the </span>AJP/JK connector configured on port 8009 in the Jonas console admin.</div> <div><br> </div> <div>Now how do i make sure my request hits Apache first and that Apache redirects it to Jonas then ?<br> </div> <div><br> </div> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"> <hr size="1"><b><span style="font-weight:bold;">From:</span></b> S. Ali Tokmen <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]"><[email protected]></a><br> <b><span style="font-weight: bold;">To:</span></b> <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a><br> <b><span style="font-weight: bold;">Sent:</span></b> Saturday, October 1, 2011 5:49 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> [jonas] Re: Jonas 5.2.1 and Apache mod_jk<br> </font><br> <div id="yiv1828746923"> <div> Hi Celinio<br> <br> Is there a spacific reason why you're using mod_jk under Apache httpd 2.2 as opposed to the already embedded mod_proxy_ajp?<br> <br> Thank you<br> <br> <pre class="yiv1828746923moz-signature">S. Ali Tokmen <a class="moz-txt-link-freetext" href="http://ali.tokmen.com/">http://ali.tokmen.com/</a> GSM (ch): +41 79 207 29 22 [Swisscom] GSM (fr): +33 66 43 00 555 [Orange] GSM (tr): +90 555 266 52 73 [Avea] My AIM, ICQ, MSN Messenger and Yahoo IM contact details are on <a class="moz-txt-link-freetext" href="http://contact.ali.tokmen.com">http://contact.ali.tokmen.com</a></pre> <br> On 2011/10/01 18:37, Celinio Fernandes wrote: <blockquote type="cite"> <div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt;"> <div>Hi,</div> <div>I am trying to interface my instance of Jonas 5.2.1 with the connector mod_jk, in a Linux environment (CentOS).<br> </div> <div>I have added the module <a moz-do-not-send="true" target="_blank" href="http://mod_jk.so">mod_jk.so</a> to /usr/lib64/httpd/modules.</div> <div><br> </div> <div>My version of Apache is 2.2</div> <div><br> </div> <div>I have configured /etc/httpd/conf/httpd.conf as the following :</div> <div><br> </div> <div>LoadModule jk_module modules/mod_jk.so <br> <br> <IfModule jk_module><br> # Ou trouver workers.properties ?<br> JkWorkersFile /etc/httpd/conf/workers.properties<br> # Ou mettre la memoire partagee de jk<br> JkShmFile /etc/httpd/logs/mod_jk.shm<br> # Ou mettre les logs jk<br> JkLogFile /etc/httpd/logs/mod_jk.log<br> # Positionner le niveau des logs jk [debug/error/info]<br> JkLogLevel info<br> # Selectionner lef ormat des logs pour le timestamp<br> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "<br> #Format des logs<br> JkRequestLogFormat "%w %m %V %T"<br> # Envoyer les contextes dont le nom commence par test : /voltage* vers le worker nommé worker1<br> JkMount /toto*/* worker1<br> # On peut placer ici plusieurs JkMount si on a plusieurs contextes traites<br> # par des workers differents<br> </IfModule></div> <div><br> </div> <div>I have added the following worker in /etc/httpd/conf/worker.properties :</div> <div><br> </div> <div> #Define 1 worker<br> worker.list=worker1<br> <br> #Set properties for worker1 (ajp13)<br> worker.worker1.type=ajp13<br> worker.worker1.host=blabla.com<br> worker.worker1.port=8009<br> </div> <div><br> </div> <div>Under /home/test/jonas-full-5.2.1/conf/ I have configured both tomcat6-server.xml and tomcat7-server.xml (since I do not know which one is used). I have uncommented the following line (changed port 9009 to 8009)<br> </div> <div><br> </div> <div> <Connector port="8009" protocol="AJP/1.3" redirectPort="9043" /></div> <div><br> </div> <div>My web app HTTP port in Jonas is configured to 9000.</div> <div>When I hit the URL <a class="moz-txt-link-freetext" href="http://blabla.com:9000/toto">http://blabla.com:9000/toto</a> I can see in the Jonas logs that Jonas is listening to that connector but I have no idea whether Apache has handled the request or not.</div> <div><br> </div> <div>What can i do ? Am i missing something ?</div> <div>Thanks for helping.</div> </div> </blockquote> </div> </div> <br> <br> </div> </div> </div> </blockquote> </body> </html> --------------060009090907090007070602--