Re: Mod_jk Configuration
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Chris, On 1/26/15 8:05 PM, Chris Arnold wrote: Yeah, that document is evidently a pack of lies. Specifically, the path and docbase attributes in Context are ignored in META-INF/context.xml files, and you really shouldn't have your Context anywhere else (except in conf/[engine]/[host]/[appname].xml, which behaves almost the same way). Best thing to do is to name the web application the same as where you want it to be deployed and not try to re-write anything. Is there a particular reason you want to map / to /share instead of /share to /share? Ease of use and it worked in a previous installment. I think this goes against what you are saying in the above text but, I just got a reply from the alfresco mailinglist. Here is what was said: The way we got around this was to just tell tomcat to deploy Share at / (ROOT) as well as at /share. To do that, we added the following line to the very end of our tomcat server.xml file (5 lines from the end, just before the line reading “/host”): Context path= debug=0 docBase=share / I don’t know if that’s exactly the right way to go about it, but it’s worked well for us for about 4.5 years now. I'm surprised that the Alfresco team is still giving-out advice that was appropriate in the mid-2000s. Some notes: 1. Don't put Context in server.xml. Just don't. 2. debug hasn't been used in ... forever. 3. path= is bad, and isn't necessary if you follow #1 Normally, docBase=share would be bad, because it's relative to the host's appBase and would result in double-deployment. In your case, you want (?) double-deployment so it's not a big deal. Note that you are therefore running *two* copies of the Alfresco share application in your server. That may impact your capacity planning. Also, you (or they?) said that you can't re-base the application to /, so I'm not sure why they are recommending that you do that. Honestly, that application should be written to be re-baseable without a problem. I'm disappointed with Alfresco that it's not. I still have a concern with this as we have other sites that we need to access at the http://domain.tld level and it seems to me ( I could e understanding his solution wrong) that above solution will point all http(s)://domain.tld requests to /share. Am I misunderstanding his solution? Remember that Tomcat controls virtually nothing: if you deploy something on / in Tomcat, but don't proxy it in httpd, then it effectively does not exist. So if you only proxy /share, then / doesn't matter. Is everything else currently working? Just the problem with /share? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUx70/AAoJEBzwKT+lPKRYVQEP/2nSC7lyg8but7sw/n2zrh0o TqR+Z+MLQJb+pAY5x3ba4Gn+TQvve6XrLkdCBb+ebhOoAz36fIG+Nmb8QemmtXgs aVud0ogbqtvUOL2D67Hitw/yesIzCODzrjv0xX3QkM4As8doSF/ntRCDndlco8TI Jw2fDQMEtjwog8DnMo09H6kwCTOSamzAGG5TDSO3nAWdDErMWwaf9ytltZMo8Ran aG3ZTFpgMg3C6p/txGKxToNFWolP7PTve+jtzn774eGZTktyFWyhA9NKC4NCSwlb 4CGWG8x13BcdSBpqTDgw1UnwDHLNSO4mLkj01E2JAa8JoiGZ7MKgxfyA0e1Bon2p zkk/3XmJ992tSvzIWxwIj38dcdACjTT9sU2cHQO6DB8JxnFO/RM3JXjYCMuh6Up7 +VORu14gZJOPQSPQ8kr+Gctbdb60eAh2G9TLVFT+yxm1vpctzjMQJFmtgsGL8x9y OwaDn7oeVHy5zAz8B/faHJckLTEkgPibkKavEFjyGysABo27wvtA5FXIvHUyezO6 yo75Tu5cFsK5ei3n/QJ+jnxMKJZdXYC2e/FiAskwPIvoKBiPf2avewEjXhr33/Y6 fzWc63qGqe80oryJ4x078M2OhOiENvphpCbfb2CHEwRSzyRPjXUTNcLhCCcoReSm c8CyeBm5y5sPDUnve2/T =39Gx -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Mod_jk Configuration
I'm surprised that the Alfresco team is still giving-out advice that was appropriate in the mid-2000s. Some notes: 1. Don't put Context in server.xml. Just don't. 2. debug hasn't been used in ... forever. 3. path= is bad, and isn't necessary if you follow #1 It did not work so i took it out Normally, docBase=share would be bad, because it's relative to the host's appBase and would result in double-deployment. In your case, you want (?) double-deployment so it's not a big deal. Note that you are therefore running *two* copies of the Alfresco share application in your server. That may impact your capacity planning. No, 1 running instance which is what we have working on the other server Also, you (or they?) said that you can't re-base the application to /, so I'm not sure why they are recommending that you do that. They answered that question, not me Is everything else currently working? Just the problem with /share? I haven't moved past the /share issue as this is the most important right now. I can't move any further in the server upgrade until this is taken care of, then i can move to other stuff - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Chris, On 1/25/15 7:38 PM, Chris Arnold wrote: If you won't re-name the web application, I think redirects will be your best bet. If a client requests http(s)://share2.domain.tld/, you should redirect them to https://share2.domain.tld/share/ and then JkMount /share/* worker1. You can redirect using RedirectPermanant or a few other things like having an index.html with an HTTP-EQUIV header in it. At this point, you seem to be able to successfully connect httpd - Tomcat. If you don't want to follow our advice for a more robust configuration, you don't have You know what Chris, I am trying to follow your advice! Forgive me if I am not a tomcat expert like you and others on this list! We aren't trying to look down upon you; it's not about being an expert or not. The best possible setup here is to set up httpd with more than one VirtualHost (and SNI, since you are using HTTPS) with the correct hostnames, etc., and only use JkMount from the share2 VirtualHost. Then, re-name your application from share.war to ROOT.war and re-deploy it into Tomcat. Use JkMount /share/* worker1 and be done with it. If the application can't handle that (try it!), you'll have to make other arrangements. I keep inviting you or anybody else that would, to either contact me off list for all the full links/info or maybe a remote session. The offer still stands for either a off list contact or teamviewer session (I am willing to pay). It's probably not necessary to pay. I know I have a working config on a server that I am trying to upgrade using, what looks like , Apache mod_rewrite and mod_jk but this is expensive and I heard mod_jk is much better. You should not need mod_rewrite to do this. Check to see if the application can be re-named. If it's been written properly, then it can be trivially re-named. If that doesn't work, we'll take a look at other options. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUxlkRAAoJEBzwKT+lPKRYs2UQAMtG4GDCA+QwihpsaRVFvaI/ /AmZzXNUbeadMyleu8ZsavsIpISZCJy4Dn4kssjmt77kcBUx7DnTWUe570DUJ4Tq Ftq59+7X2XfGBjPAOGZgp6Gvz7gV36vp9jhV2X0DyadLW4wFOVfbjQUHiNCyiVOX CL6+z6ykYM8MZd8+9GshfHIH6LH5/F6BFtOsluWOxxgUDjSn9xkEuBj3CBj264Ln IZa2PAqWz7F5VvAFNzrxWVTlFmWzTqhMr4461CSlZ34MVaavdmqerPbizVVV/rpI oiRpFlOnOC+b+8mPteCZzs7yciCD8C9ljicQbYa9+lXUsu8mD88XQkX2JkRilS5U Ru438UkZhMCcC7B4CZX7CD1UblpFhcuf+NUx/LQ69S2n+mTBROYZTlZVIJlwHHV6 XuL4r3kSXscY5uyz8eimNXi55owCHIQJy8KLFTqiyIzFzFQhblLDRVgJfL275t0b 2pidZHYOWkXrzK/SaSgbOVIPmsC7Rc7MK+0B5ikMSLRGxivpXEnWEnULYbUtWo2N zjlIpk7P5w5oL3XXW3Dpf7qTcUrMINJnLdCo6PzQ/z+AE6YEFbSAKmbfkOUnt3yb YC6ebo1Euhs9MePHUG/yE9L81J70KLsodPWIASTKw3mA6yOKKrEC4qHd19M8S9f+ 5DXilt7RPpgVHd6FlklW =4JDw -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Mod_jk Configuration
The best possible setup here is to set up httpd with more than one VirtualHost (and SNI, since you are using HTTPS) with the correct hostnames, etc., and only use JkMount from the share2 VirtualHost. Then, re-name your application from share.war to ROOT.war and re-deploy it into Tomcat. Use JkMount /share/* worker1 and be done with it. If the application can't handle that (try it!), you'll have to make other arrangements. According to: https://wiki.alfresco.com/wiki/Deploying_To_Server that is not even necessary. I understand that link is a years old and talks about tomcat 6 but the general idea is the same. I will try to rename the war and see what happens. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Mod_jk Configuration
If the application can't handle that (try it!), you'll have to make other arrangements. According to: https://wiki.alfresco.com/wiki/Deploying_To_Server that is not even necessary. I understand that link is a years old and talks about tomcat 6 but the general idea is the same. I will try to rename the war and see what happens. No, renaming the war will break everything: https://forums.alfresco.com/forum/end-user-discussions/alfresco-share/tried-set-sharewar-root-webapp-07262012-1228 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Chris, On 1/26/15 4:52 PM, Chris Arnold wrote: The best possible setup here is to set up httpd with more than one VirtualHost (and SNI, since you are using HTTPS) with the correct hostnames, etc., and only use JkMount from the share2 VirtualHost. Then, re-name your application from share.war to ROOT.war and re-deploy it into Tomcat. Use JkMount /share/* worker1 and be done with it. If the application can't handle that (try it!), you'll have to make other arrangements. According to: https://wiki.alfresco.com/wiki/Deploying_To_Server that is not even necessary. I understand that link is a years old and talks about tomcat 6 but the general idea is the same. I will try to rename the war and see what happens. Yeah, that document is evidently a pack of lies. Specifically, the path and docbase attributes in Context are ignored in META-INF/context.xml files, and you really shouldn't have your Context anywhere else (except in conf/[engine]/[host]/[appname].xml, which behaves almost the same way). Best thing to do is to name the web application the same as where you want it to be deployed and not try to re-write anything. Is there a particular reason you want to map / to /share instead of /share to /share? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUxrsIAAoJEBzwKT+lPKRY7a0QAMllYOS212JVjYb3jNOi1LO7 jNLjA81tHgXYoYCNINdKAS0M1kiwSxFVWuGBtN/WT9QoawXjR1bq01j7q5h0fwRt VPy2cFiusD/scwqEV6QeFyrGm96K9lA9tj3gnbsVz1ZyFWs3YYu5Gfm49yuCUp96 4Frno+x6dChJYA6PSSS4l9UtC90hGAZuIzvDveta4gRV6HYnr3jFlOhTpEuX0aCn MkbujVlb8B/of52C/iHDERUPdnyrb92AFBgF5YGLYtwarrzh+Vsj6xxvnABkZ4XE ppuCVAAMPN2j7DRJCYrD1l5kMTbTCPYNbl99uTbSMhzz+btfuo2AlLkuL6CJtrIe 8n6HZc5dpUdUJN3VTLhk18WzF6wjZImJ0qBywn+tu7jE0RFh/e8lfl5gBbAn/v6/ oApR02gyLF9rrXvmzEl7BepKzsVO8VyRSXTY2OBlbYnNQwr+FSM+3OVUeXYA5dzg zRDaQ3P84fj3owZDlPjKRLdeV586xRmaIuh0Gep5JjmTceFYMkr1gYkqRu8xBgyU z25bokqGgN1MO2j8MxwzB0WUmt99B8kKel/+0NzA9iJztI/Bb/qa9n03SCXd0fSi lewHqQ8AzhpENY+exyZYra+X2if+qBJD6oXP9GQKwkkiC/E3c9VC1omXzqQbiCeX 2I0xYULkViwp68yjEcAX =xaqF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Mod_jk Configuration
Yeah, that document is evidently a pack of lies. Specifically, the path and docbase attributes in Context are ignored in META-INF/context.xml files, and you really shouldn't have your Context anywhere else (except in conf/[engine]/[host]/[appname].xml, which behaves almost the same way). Best thing to do is to name the web application the same as where you want it to be deployed and not try to re-write anything. Is there a particular reason you want to map / to /share instead of /share to /share? Ease of use and it worked in a previous installment. I think this goes against what you are saying in the above text but, I just got a reply from the alfresco mailinglist. Here is what was said: The way we got around this was to just tell tomcat to deploy Share at / (ROOT) as well as at /share. To do that, we added the following line to the very end of our tomcat server.xml file (5 lines from the end, just before the line reading “/host”): Context path= debug=0 docBase=share / I don’t know if that’s exactly the right way to go about it, but it’s worked well for us for about 4.5 years now. I still have a concern with this as we have other sites that we need to access at the http://domain.tld level and it seems to me ( I could e understanding his solution wrong) that above solution will point all http(s)://domain.tld requests to /share. Am I misunderstanding his solution? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Chris, On 1/26/15 5:36 PM, Chris Arnold wrote: Yeah, that document is evidently a pack of lies. Specifically, the path and docbase attributes in Context are ignored in META-INF/context.xml files, and you really shouldn't have your Context anywhere else (except in conf/[engine]/[host]/[appname].xml, which behaves almost the same way). Best thing to do is to name the web application the same as where you want it to be deployed and not try to re-write anything. Is there a particular reason you want to map / to /share instead of /share to /share? Ease of use and it worked in a previous installment. Okay. If you must rewrite you should be able to do something like this (untested!): RewriteRule ^(/.*) /share/$1 [L] JkMount /share/* worker1 I dunno if that will work, but mod_rewrite runs pretty early/often in the pipeline and I think mod_jk will tolerate that. Note that any response from Tomcat that includes links will have those links still pointing to /foo and not /share/foo which may or may not result in a problem. It may be easier for you to use mod_proxy and do something simpler like this: ProxyPass / ajp://host:port/share Don't forget the ProxyPassReverse if you do that. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUxsfQAAoJEBzwKT+lPKRY7IwP/R/4V7v9KoRycFKFpDJzuLnL 3PXkCmWCrnVCPbS0xjsRGNeRkPxBQ9hqgmJpGypaE5lypO9zDP+0FERCC/0aPwnC jd5wXUm/ZlTLQCAWmNzXM/sO55psF1T3ZcVnSDOv6BfdlTOTwLAl/E0edOeGRUI9 iD12Lgh5s7suKd+/aQpVVGLme/VpW/7sw/7fPCxzotuX5yPEzZ7PsngRIQLzH1+H QtBJRX2y6gxd7yr2CktHPiEfEGTGDzhs+EAim8wZBW13G7o7V5STrBbf6Nur75Vg DY/0txpf+hz/oqi0pik08WNWRxlXRkDf+Ae+/oSDUE8oEhmNuYyKdSJHLvpOw7eB PIHFC3aAxtjU2ZKZY8JxT2UM1CJAHyRfqUlVECzJN5VXZFEV7217yQClhwbyAOYq O9a8lrmVFAznvOB6UmFC84J46MJue/f66dKOauTMhrKGrMJBUk95HLDsXSoAT00e TAn3sQyaSypiqn8AJZIQl7KGOGkohHy7wdjzWvJYLeOufWowz9ypg3/QKbI9/AX/ yemW7fT0+vCIrz7IOiY57xsnQR8q3AeyWQkTI/k5XqzpZkZBC8L8/fv7lIgiQfQo 9wuR3kKyF8nfAmnN7WBF+5O/rBwezlIROwcaEisG4plGbumlDPieQn9ryQcXflk7 LM4Yw6Zq18j2qjSL0oy4 =2XTx -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
Yeah, that document is evidently a pack of lies. Specifically, the path and docbase attributes in Context are ignored in META-INF/context.xml files, and you really shouldn't have your Context anywhere else (except in conf/[engine]/[host]/[appname].xml, which behaves almost the same way). Best thing to do is to name the web application the same as where you want it to be deployed and not try to re-write anything. Is there a particular reason you want to map / to /share instead of /share to /share? Ease of use and it worked in a previous installment. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Chris, On 1/23/15 7:49 PM, Chris Arnold wrote: *sigh* If you only want to proxy for one VirtualHost, then only set up JkMounts in that one VirtualHost. Like this: VirtualHost *:80 ServerName share2..xxx JkMount /* worker1 (or balancer, whichever you want) /VirtualHost Maybe I wasn't clear in my other reply, the above jkmount /* worker1 sends all requests to the tomcat app. So a request to http://domain.tld would get you to the tomcat app (not what we want) Then your virtual hosts are not set up correctly. If you have a VirtualHost for share2.xxx.xxx and a separate VirtualHost for .xxx then the settings should not bleed across. If you want to map / to /share it's a giant pain in the neck and I don't think you will actually be able to accomplish. Best to proxy /share to /share, or, better yet, re-name your application to ROOT.war and proxy / to /. Renaming the war would, I believe, will break everything. Why? You should not have needed to change workers.properties. Maybe not but u doing so, I have eliminated all the extra clutter in workers.properties as being the problem and the vhost: JkMount /share2/* worker1 but this gives a 404 *sigh*: For what URL? If I understand your question, https://share2.domain.tld. I found that the /share2/* part of jkmount /share2/* worker1 should be just /share/*. Changed to just /share/* and now https://share2.domain.tld takes you to the root (/srv/www/hotdogs) and that is not even where our sites are hosted (/srv/www/htdocs/sites). Then your DocumentRoot is not set correctly. I highly recommend that you have an expert take a look at your httpd configuration... it sounds severely mis-configured. However, if I put a port 80 redirect to port 443 in the vhost and go to http://share2.domain.tld, that gets me to the correct tomcat app (https://share2.domain.tld/share) Don't mess with the Tomcat configuration. Basically, stop touching things. My replies have not alluded to any messing with tomcat config. What URL can you use to get to the application *without* httpd in the middle? https://share2.domain.tld:8443/share You can see why we need users to be able to type share2.domain.tld and arrive at the tomcat app. If you contact me off list I will be happy to give you the complete url so you can see exactly the address that is need to get to. I don't want that info on a publicly index mailing list. If you won't re-name the web application, I think redirects will be your best bet. If a client requests http(s)://share2.domain.tld/, you should redirect them to https://share2.domain.tld/share/ and then JkMount /share/* worker1. You can redirect using RedirectPermanant or a few other things like having an index.html with an HTTP-EQUIV header in it. At this point, you seem to be able to successfully connect httpd - Tomcat. If you don't want to follow our advice for a more robust configuration, you don't have to. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUxWvNAAoJEBzwKT+lPKRYq/8QAMqpMDnEtqvY6irKXI+vCBs9 ZHfVw/93bflr91yc1tN3/EKVFQDLu9qlvkMX+AbG72u4nHRlcq/rtWQbkSA+X3W7 +2Pdx6CXHbYcbGjxN0Z60OZs9GWuWmQ6Fwm/pz70ZKEhsaRfEzUgdsdpY9eR9IKd Rdczw75EJara2jJfFQE9zs24g0I7N2nL+xTL2EMz5VzUyGRiiJnFCat2CPsw0QJU broRMy5leXfi5MQFR58BhPT6GZVFS5xP83RlJzlcCanIipCh6oWI8aKJ2ZJNvslY bJJAzem0JJ0U9exx+5wGKoKMUAC3XFeCWaB1anuVBmHJkQ/TSEcBM8HdwdGIlMu6 LemtQ5vj8ECfiCJnjVLR7AW+zRNwRM5dSVyMpcEYHz3jkzxZf2wMuEoihdkKEVC4 B95PqVkEC8qTCEPOCIupaod+HsJnl6F2Am8dWpjlWO0u2v0bVaFhs/3ss4yivNq7 F1YR5yh3Jkk2xtcsBx5wx4uwlPfdRtIDtHzTkE0SYPs3yobq+T3x5KdNVX0oZh/Q pL+1sDwnixKA4rFbzscXxVxJ1P/4keYQbHamsQnyENpXyWJYCUQaKLCoY3aftNz2 HlKMlsNb4DFF9ZnClPes+SikCJPtnVgS6ckZKc00m0kc9L4tlcgged5AMANpwT8r cApDaCCt2V1FXBUWJ2Pc =Yqys -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
If you won't re-name the web application, I think redirects will be your best bet. If a client requests http(s)://share2.domain.tld/, you should redirect them to https://share2.domain.tld/share/ and then JkMount /share/* worker1. You can redirect using RedirectPermanant or a few other things like having an index.html with an HTTP-EQUIV header in it. At this point, you seem to be able to successfully connect httpd - Tomcat. If you don't want to follow our advice for a more robust configuration, you don't have You know what Chris, I am trying to follow your advice! Forgive me if I am not a tomcat expert like you and others on this list! I keep inviting you or anybody else that would, to either contact me off list for all the full links/info or maybe a remote session. I know I have a working config on a server that I am trying to upgrade using, what looks like , Apache mod_rewrite and mod_jk but this is expensive and I heard mod_jk is much better. The offer still stands for either a off list contact or teamviewer session (I am willing to pay). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Chris, On 1/23/15 10:40 AM, Chris Arnold wrote: What you want is: JkMount /share2/* worker1 or maybe: JkMount /share2/* balancer workers.properties defines the workers (target host/port, connection options, etc.) and the JkMount directives in httpd.conf map URL patterns to those workers. So JkMount /* proxied everything and we only need https://share2..xxx proxied to https://share2..xxx/share. *sigh* If you only want to proxy for one VirtualHost, then only set up JkMounts in that one VirtualHost. Like this: VirtualHost *:80 ServerName share2..xxx JkMount /* worker1 (or balancer, whichever you want) /VirtualHost If you want to map / to /share it's a giant pain in the neck and I don't think you will actually be able to accomplish. Best to proxy /share to /share, or, better yet, re-name your application to ROOT.war and proxy / to /. So now i have a new workers.properties: worker.list=worker1 worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 You should not have needed to change workers.properties. and the vhost: JkMount /share2/* worker1 but this gives a 404 *sigh*: For what URL? In the workers.properties, worker.worker1.host, does that need to be share2? Error log: [Fri Jan 23 10:35:31.426108 2015] [core:info] [pid 4622] [client 192.168.123.165:50481] AH00128: File does not exist: /srv/www/htdocs/share/ That suggests that your proxy configuration is either incorrect or being ignored. Or that your URL isn't what you say it is. If you are trying to reach .../share2/something, why does the error message say .../share/? That appears to using the default_server.conf of apache since the doc root is /opt/alfresco/tomcat/webapps/share. Does the doc root in the vhost need to be set to /opt/alfresco/tomcat/webapps/share? Don't mess with the Tomcat configuration. Basically, stop touching things. What URL can you use to get to the application *without* httpd in the middle? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUwrcUAAoJEBzwKT+lPKRYtL4QAL3LUR4oZptkyCXtZ9rw6dmP rZlF2lXu1XGR3SIuQ4pM46JgcTI8EKiDTcFkUngiqAxVQluALyHshju0mxgdCQ4r MFEWpRdyJasGRHhoLogaahMZKvCKUsdMmDRYNqElnqiSaSV2RaoJpVO+vWsWI7xT f8GcrKg1TGImZFeWMyJznJ8gDjOeecWlU83l2k4ZtkV1Js0GwlF5d5kMuoCa5R9+ H82femIJGE+hTHHxlTOSmogt3noVxGkKk/KczSaehVF/28906TTOrECXtd14nmn4 T2j3sqvPvp0Pom14eecEDaT8Dz23BsfAmJCl17v04N9AN13dwveClgQROQAZ31Ph +8DmRTvDSCj48Gd0qjIYFTsf14LUBp0F8PyYC+oFPGhDq86eZ6c7aK7Sy7/Jm/d1 riVkTQZFaVHY4MXHxzN0AT0TZn2v6r7XC7NRAfkJeuhptzDlP7ePhyZSeP3awJrt nKGrcJTGacGuVsFkUgozUsCVbAM46E6KPZYEs6+sKBcU9DO/2WUbc7KMdl3NCk46 Iaqoa8SPkOswuIUtOL5aTThn3eP3Q0bWqjsAr6gqJBCQl2B7DFpNmigd1rnFchtw SZs3neZ3wz1FdrZMixA/lE0okMjTfxoD6rslDyI7ZrU/DKUSt0ojGbceyM0ODYQr GX2UhnByTJcoL/9PVJPS =lEGU -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
*sigh* If you only want to proxy for one VirtualHost, then only set up JkMounts in that one VirtualHost. Like this: VirtualHost *:80 ServerName share2..xxx JkMount /* worker1 (or balancer, whichever you want) /VirtualHost Maybe I wasn't clear in my other reply, the above jkmount /* worker1 sends all requests to the tomcat app. So a request to http://domain.tld would get you to the tomcat app (not what we want) If you want to map / to /share it's a giant pain in the neck and I don't think you will actually be able to accomplish. Best to proxy /share to /share, or, better yet, re-name your application to ROOT.war and proxy / to /. Renaming the war would, I believe, will break everything. You should not have needed to change workers.properties. Maybe not but u doing so, I have eliminated all the extra clutter in workers.properties as being the problem and the vhost: JkMount /share2/* worker1 but this gives a 404 *sigh*: For what URL? If I understand your question, https://share2.domain.tld. I found that the /share2/* part of jkmount /share2/* worker1 should be just /share/*. Changed to just /share/* and now https://share2.domain.tld takes you to the root (/srv/www/hotdogs) and that is not even where our sites are hosted (/srv/www/htdocs/sites). However, if I put a port 80 redirect to port 443 in the vhost and go to http://share2.domain.tld, that gets me to the correct tomcat app (https://share2.domain.tld/share) Don't mess with the Tomcat configuration. Basically, stop touching things. My replies have not alluded to any messing with tomcat config. What URL can you use to get to the application *without* httpd in the middle? https://share2.domain.tld:8443/share You can see why we need users to be able to type share2.domain.tld and arrive at the tomcat app. If you contact me off list I will be happy to give you the complete url so you can see exactly the address that is need to get to. I don't want that info on a publicly index mailing list. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Mod_jk Configuration
What you want is: JkMount /share2/* worker1 or maybe: JkMount /share2/* balancer workers.properties defines the workers (target host/port, connection options, etc.) and the JkMount directives in httpd.conf map URL patterns to those workers. So JkMount /* proxied everything and we only need https://share2..xxx proxied to https://share2..xxx/share. So now i have a new workers.properties: worker.list=worker1 worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 and the vhost: JkMount /share2/* worker1 but this gives a 404 *sigh*: In the workers.properties, worker.worker1.host, does that need to be share2? Error log: [Fri Jan 23 10:35:31.426108 2015] [core:info] [pid 4622] [client 192.168.123.165:50481] AH00128: File does not exist: /srv/www/htdocs/share/ That appears to using the default_server.conf of apache since the doc root is /opt/alfresco/tomcat/webapps/share. Does the doc root in the vhost need to be set to /opt/alfresco/tomcat/webapps/share? Added: so the doc root on the vhost is set to /opt/alfresco/tomcat/webapps and then thos error (the working configuration does not have a doc root set on the vhost but that one is using mod_proxy and not mod_jk): [Fri Jan 23 10:43:30.135139 2015] [authz_core:error] [pid 4914] [client 192.168.123.165:50532] AH01630: client denied by server configuration: /opt/alfresco/tomcat/webapps/share/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Mod_jk Configuration
What you want is: JkMount /share2/* worker1 or maybe: JkMount /share2/* balancer workers.properties defines the workers (target host/port, connection options, etc.) and the JkMount directives in httpd.conf map URL patterns to those workers. So JkMount /* proxied everything and we only need https://share2..xxx proxied to https://share2..xxx/share. So now i have a new workers.properties: worker.list=worker1 worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 and the vhost: JkMount /share2/* worker1 but this gives a 404 *sigh*: In the workers.properties, worker.worker1.host, does that need to be share2? Error log: [Fri Jan 23 10:35:31.426108 2015] [core:info] [pid 4622] [client 192.168.123.165:50481] AH00128: File does not exist: /srv/www/htdocs/share/ That appears to using the default_server.conf of apache since the doc root is /opt/alfresco/tomcat/webapps/share. Does the doc root in the vhost need to be set to /opt/alfresco/tomcat/webapps/share? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Chris, On 1/21/15 6:41 PM, Chris Arnold wrote: Chris, On 1/21/15 5:56 PM, Chris wrote: You must have changed something since your original configuration. Do you have JkMount ajp13 somewhere? You need to use the worker name and not the protocol name. Can you post your updated workers.properties file, and related httpd.conf configurations? workers.properties: worker.list=jk-status worker.jk-status.type=status worker.jk-status.read_only=true worker.list=jk-manager worker.list=worker1 worker.jk-manager.type=status You have two status workers. Is that intentional? worker.list=balancer worker.balancer.type=lb worker.balancer.max_reply_timeouts=10 worker.balancer.balance_workers=worker1 worker.worker1.reference=worker.template worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.activation=A worker.template.type=ajp13 worker.template.socket_keepalive=true version of mod_jk running 1.2.26 If you are really running 1.2.26, you should upgrade to 1.2.40. worker.template.connection_pool_minsize=0 That's an odd setting. Do you expect long periods of time during which no requests will be handled? worker.template.connection_pool_timeout=600 worker.template.reply_timeout=30 worker.template.recovery_options=3 Httpd.conf: Include /opt/alfresco/tomcat/conf/jk.conf apache vhost: IfDefine SSL IfDefine !NOSSL ## ## SSL Virtual Host Context ## VirtualHost 192.168.123.200:443 # General setup for the virtual host DocumentRoot /opt/alfresco/tomcat/webapps/share ServerName share2.domain.tld:443 ServerAlias mail.* ifolder.* share.* apps.* ErrorLog /var/log/apache2/ssl-error_log TransferLog /var/log/apache2/ssl-access_log LogLevel Debug LogLevel rewrite:trace8 # SSL Engine Switch: # Enable/Disable SSL for this virtual host. SSLEngine on #This rewrites https://share.anydomain.tld to our share server #RewriteEngine On #RewriteCond %{HTTP_HOST} ^share2\. #RewriteCond %{HTTPS} on #RewriteCond %{REQUEST_URI} !^/share2/ #RewriteRule ^/(.*) https://share2.teknerds.net:8443/share/ [P] JkMount /share2/* worker1 Found it! IT was in the jk.conf file: JkMount /share2/*.* ajp13 I have removed ajp13 so now that line looks like: JkMount /share2/*.* *.* won't do what you want it to do. Please check out the Apache httpd guide here for the syntax for JkMount: http://tomcat.apache.org/connectors-doc/reference/apache.html Restart apache and got this error: Jan 21 18:38:02 labweb start_apache2[3042]: AH00526: Syntax error on line 32 of /opt/alfresco/tomcat/conf/jk Jan 21 18:38:02 labweb start_apache2[3042]: JkMount needs a path when not defined in a location So i commented it out (it was like this originally). So then you don't have any JkMounts, so nothing will be proxied. What you want is: JkMount /share2/* worker1 or maybe: JkMount /share2/* balancer workers.properties defines the workers (target host/port, connection options, etc.) and the JkMount directives in httpd.conf map URL patterns to those workers. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUwQucAAoJEBzwKT+lPKRY2NQQAKb9tQ2MvvqCzus6/jtghFCy qIsjB9qYpY9tdM1S9ml2SHVvmbfBmT7eZysgpCHjQOIqw5+bIxee6lxOrPcRNEFy RN6H8NFDtBkDiKF4zLx0UpDYICHwGD0VcvXG4FXMR1505zcYOcmzZOOEoAbsNiJX YESTjShLlRPe+vABBQ3NFTuFwsH0auDUveFsYREAnsYgaYIfbf607ydajwiJy8HN czS4nwWhb3nFhQcVgeZCMyO1sHaXB+jmb5EGbWogsoRjB7Nr7mf7KhTVzJiq6SFZ sYcji3rscEnZ5h0MNHxuMhYlz2lsOUFhEzn5nxQAFPn8XtUY/BsO5SEHypXJKJL2 qNP57uops6u11QvLVtf14SUUDeVAJcL/AFgn+h6MHVpfThqwbjmARKP+q4kZNdmY c0FTyelDq6fLZ68h/cUi6hB6hBiV34JgJZQXMhTFcYmIcK0HVjmdXrIPnNMXlNfk uszxqDSmElaJo9RrJXzBMFxxSZGmpmYkUctlvdZCOPzZi46k2PW8G49geiH2PYRa NTdmpW6b9HawWWdgZ7Pw2tVEeeiEDe+eFaMecDRsT6bbkMtikkbLFn7uQTp6lavL eY0I1TLCt1r+uqJGvKNw5lPRjIYuLl8XDZ7nFZPL7sEJjK1heVfaDayIpF9eTD6d fxgIG01ai16qg7NzSIEf =gV4t -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Chris, On 1/21/15 5:56 PM, Chris Arnold wrote: When i look at the apache log for that request, i dont see where the request is even making it to apache or tomcat. Try to request a static file from DocumentRoot directory. If you cannot, then your HTTPS is not configured correctly. Get that working first. Yeah, I overlooked that in my first response. As long as you don't see the request in the Apache access log, you'll not make progress. So i got all the connections worked out and now apache and tomcat are accepting connections. However, i still can not get mod_jk working correctly. Here is the mod_jk debug log: [Wed Jan 21 12:31:04 2015] [2345:139798017603520] [error] extension_fix::jk_uri_worker_map.c (578): Could not find worker with name 'ajp13' in uri map post processing. You must have changed something since your original configuration. Do you have JkMount ajp13 somewhere? You need to use the worker name and not the protocol name. Can you post your updated workers.properties file, and related httpd.conf configurations? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUwDHrAAoJEBzwKT+lPKRYeHoP/1DkXe8lNduURqqGUgPIdBKX mpBhi0QbcSMUHX55gy0GHOitm12wr/JqeHRj3XNrZu6HR9IsCOR+ybuI6xObbAWs miwwYHBe9XrD52GTfLiXfUXfE3JzNMXC6u0TjInGZOLSwG6N5/wK2ng2tzRcoqdR m+xA1Rc0/iTPjQ0hp4z0TemxrdqXbYuPVF/BahkVAsl205ciADkBYAQQ8d1A6h/Q SY3G2p3XlD0SMYVO/4MCUgyhyEEO0+TUZ0KaaLpMSzhTTpYnsBFP4/6kdXei0xsL 8ak94TeySlpLdjDqxofYN3YobUnrXdLQipjMM/KlMRnbKl/aLVVe6yct0sq+tTr3 mTQY1UB1hzbmmps6GdRasTjxp2Ik0DHS6IDgAa0ATBI3+3gVVD9vpVAVCMbdhevH Oz/yhZoRAO5uTgQxbg8Srv6daMstJ8Ei6lw6M9gYUK32yvPDU49WxEOFhUnLv7Gd TsMVUnAZ1uXIwhY2LpVycA8gerilQjziyLBZfL1kved9PzExWrBv14yPc+yyXRxB Mcgdxu3/11AqjENv9HBG3UE3aYoIx8YybHz6wNPISRxhbF/RcvC2TmTEG9BK93gh mH5BcRsx800NdDfa/txoXiOP405BaNMbaU/RWkiCJdPCGNOs4dYbonQPYXxzKnog 0fUPXjd6DG4CHqgPRWsc =XIb6 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Mod_jk Configuration
+1 And also, could you specify again what URL you are requesting in the browser, which you would expect to be proxied to Tomcat ? https://share2.domain.tld Looking at the log you just showed, it seemed that the only requests ever passed through mod_jk for evaluation, where things like /error/* and mod_jk (rightly so) decides that they are not for Tomcat, declines to process them, and returns the request to Apache, to tell it to find another victim to handle that URL. Agreed! Which is why i need some guidance. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Chris, On 1/21/15 5:56 PM, Chris Arnold wrote: When i look at the apache log for that request, i dont see where the request is even making it to apache or tomcat. Try to request a static file from DocumentRoot directory. If you cannot, then your HTTPS is not configured correctly. Get that working first. Yeah, I overlooked that in my first response. As long as you don't see the request in the Apache access log, you'll not make progress. So i got all the connections worked out and now apache and tomcat are accepting connections. However, i still can not get mod_jk working correctly. Here is the mod_jk debug log: [Wed Jan 21 12:31:04 2015] [2345:139798017603520] [error] extension_fix::jk_uri_worker_map.c (578): Could not find worker with name 'ajp13' in uri map post processing. You must have changed something since your original configuration. Do you have JkMount ajp13 somewhere? You need to use the worker name and not the protocol name. Can you post your updated workers.properties file, and related httpd.conf configurations? +1 And also, could you specify again what URL you are requesting in the browser, which you would expect to be proxied to Tomcat ? With the previous configuration that you showed here, that should be a URL like http://yourhost.etc/share/(something) or http://yourhost.etc/share2/(something) Looking at the log you just showed, it seemed that the only requests ever passed through mod_jk for evaluation, where things like /error/* and mod_jk (rightly so) decides that they are not for Tomcat, declines to process them, and returns the request to Apache, to tell it to find another victim to handle that URL. Example from your previous log : ... map_uri_to_worker_ext::jk_uri_worker_map.c (1170): Attempting to map URI '/error/include/bottom.html' from 1 maps [Wed Jan 21 12:34:46 2015] [2507:139894823892928] [debug] find_match::jk_uri_worker_map.c (984): Attempting to map context URI '/share2/*=worker1' source 'JkMount' [Wed Jan 21 12:34:46 2015] [2507:139894823892928] [debug] jk_map_to_storage::mod_jk.c (3816): no match for /error/include/bottom.html found ... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Mod_jk Configuration
Chris, On 1/21/15 5:56 PM, Chris wrote: You must have changed something since your original configuration. Do you have JkMount ajp13 somewhere? You need to use the worker name and not the protocol name. Can you post your updated workers.properties file, and related httpd.conf configurations? workers.properties: worker.list=jk-status worker.jk-status.type=status worker.jk-status.read_only=true worker.list=jk-manager worker.list=worker1 worker.jk-manager.type=status worker.list=balancer worker.balancer.type=lb worker.balancer.max_reply_timeouts=10 worker.balancer.balance_workers=worker1 worker.worker1.reference=worker.template worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.activation=A worker.template.type=ajp13 worker.template.socket_keepalive=true version of mod_jk running 1.2.26 worker.template.connection_pool_minsize=0 worker.template.connection_pool_timeout=600 worker.template.reply_timeout=30 worker.template.recovery_options=3 Httpd.conf: Include /opt/alfresco/tomcat/conf/jk.conf apache vhost: IfDefine SSL IfDefine !NOSSL ## ## SSL Virtual Host Context ## VirtualHost 192.168.123.200:443 # General setup for the virtual host DocumentRoot /opt/alfresco/tomcat/webapps/share ServerName share2.domain.tld:443 ServerAlias mail.* ifolder.* share.* apps.* ErrorLog /var/log/apache2/ssl-error_log TransferLog /var/log/apache2/ssl-access_log LogLevel Debug LogLevel rewrite:trace8 # SSL Engine Switch: # Enable/Disable SSL for this virtual host. SSLEngine on #This rewrites https://share.anydomain.tld to our share server #RewriteEngine On #RewriteCond %{HTTP_HOST} ^share2\. #RewriteCond %{HTTPS} on #RewriteCond %{REQUEST_URI} !^/share2/ #RewriteRule ^/(.*) https://share2.teknerds.net:8443/share/ [P] JkMount /share2/* worker1 Found it! IT was in the jk.conf file: JkMount /share2/*.* ajp13 I have removed ajp13 so now that line looks like: JkMount /share2/*.* Restart apache and got this error: Jan 21 18:38:02 labweb start_apache2[3042]: AH00526: Syntax error on line 32 of /opt/alfresco/tomcat/conf/jk Jan 21 18:38:02 labweb start_apache2[3042]: JkMount needs a path when not defined in a location So i commented it out (it was like this originally). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Mod_jk Configuration
When i look at the apache log for that request, i dont see where the request is even making it to apache or tomcat. Try to request a static file from DocumentRoot directory. If you cannot, then your HTTPS is not configured correctly. Get that working first. Yeah, I overlooked that in my first response. As long as you don't see the request in the Apache access log, you'll not make progress. So i got all the connections worked out and now apache and tomcat are accepting connections. However, i still can not get mod_jk working correctly. Here is the mod_jk debug log: [Wed Jan 21 12:31:04 2015] [2345:139798017603520] [error] extension_fix::jk_uri_worker_map.c (578): Could not find worker with name 'ajp13' in uri map post processing. [Wed Jan 21 12:31:04 2015] [2345:139798017603520] [error] extension_fix::jk_uri_worker_map.c (578): Could not find worker with name 'ajp13' in uri map post processing. [Wed Jan 21 12:33:29 2015] [2430:140672245532608] [error] extension_fix::jk_uri_worker_map.c (578): Could not find worker with name 'ajp13' in uri map post processing. [Wed Jan 21 12:33:29 2015] [2430:140672245532608] [error] extension_fix::jk_uri_worker_map.c (578): Could not find worker with name 'ajp13' in uri map post processing. [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] jk_set_time_fmt::jk_util.c (480): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S %Y] ' [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_open::jk_uri_worker_map.c (904): rule map size is 1 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_add::jk_uri_worker_map.c (854): wildchar rule '/share2/*.*=ajp13' source 'JkMount' was added [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_dump::jk_uri_worker_map.c (178): uri map dump after map open: id=0, index=0 file='(null)' reject_unsafe=0 reload=60 modified=0 checked=0 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 0: size=0 nosize=0 capacity=0 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 1: size=1 nosize=0 capacity=4 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_dump::jk_uri_worker_map.c (197): NEXT (1) map #0: uri=/share2/*.* worker=ajp13 context=/share2/*.* source=JkMount type=Wildchar len=11 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] jk_set_time_fmt::jk_util.c (480): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S %Y] ' [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_open::jk_uri_worker_map.c (904): rule map size is 1 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_add::jk_uri_worker_map.c (863): exact rule '/share2=worker1' source 'JkMount' was added [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_add::jk_uri_worker_map.c (854): wildchar rule '/share2/*=worker1' source 'JkMount' was added [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_dump::jk_uri_worker_map.c (178): uri map dump after map open: id=0, index=0 file='(null)' reject_unsafe=0 reload=60 modified=0 checked=0 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 0: size=0 nosize=0 capacity=0 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 1: size=2 nosize=0 capacity=4 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_dump::jk_uri_worker_map.c (197): NEXT (1) map #0: uri=/share2/* worker=worker1 context=/share2/* source=JkMount type=Wildchar len=9 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_dump::jk_uri_worker_map.c (197): NEXT (1) map #1: uri=/share2 worker=worker1 context=/share2 source=JkMount type=Exact len=7 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] jk_set_time_fmt::jk_util.c (480): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S %Y] ' [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_open::jk_uri_worker_map.c (904): rule map size is 1 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_add::jk_uri_worker_map.c (854): wildchar rule '/share2/*=worker1' source 'JkMount' was added [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_dump::jk_uri_worker_map.c (178): uri map dump after map open: id=0, index=0 file='(null)' reject_unsafe=0 reload=60 modified=0 checked=0 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 0: size=0 nosize=0 capacity=0 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug] uri_worker_map_dump::jk_uri_worker_map.c (184): generation 1: size=1 nosize=0 capacity=4 [Wed Jan 21 12:34:35 2015] [2490:139894823892928] [debug]
Re: Mod_jk Configuration
Am 22.01.2015 um 01:03 schrieb Chris Arnold: +1 And also, could you specify again what URL you are requesting in the browser, which you would expect to be proxied to Tomcat ? https://share2.domain.tld Looking at the log you just showed, it seemed that the only requests ever passed through mod_jk for evaluation, where things like /error/* and mod_jk (rightly so) decides that they are not for Tomcat, declines to process them, and returns the request to Apache, to tell it to find another victim to handle that URL. Agreed! Which is why i need some guidance. You have set JkMount /share2/* worker1 which means: forward any request that hits the VirtualHost in which you have put that JkMount and where the request has a URI starting with /share2/ via the worker worker1. Then you test with the request http://share2.domain.tld/ which has URI /. This URI does not start with /share2/ so it does not match the JkMount and the request is not being forwarded. Attempting to map URI '/' from 1 maps Attempting to map context URI '/share2/*=worker1' source 'JkMount' no match for / found Instead Apache tries to produce an error page using a new interal request with an URI starting with /error/ etc. So either you test with the request http://share2.domain.tld/share2/what-ever-makes-sense-here or - if your really need to forward anything under http://share2.domain.tld/ you need to use JkMount /* worker1 instead of the JkMount you are currently using. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Mod_jk Configuration
Current working setup: apache 2.2 using mod_jk to pass 443 requests to tomcat on 8443. We are migrating from SLES 11 SP3 to SLEs 12. On SLES 11 we use alfresco 5.0.c which includes tomact 7.x i believe. SLES 11 has apache 2.2.10. SLES 12 has apache 2.4 and we use the same version of alfresco on SLES 12 (tomcat 7.x). So i installed SLES 12, apache 2.4 and alfresco 5.0.c on a test server. I then followed the upgrading guide for apache 2.2 to 2.4. I copied the existing working config files from the alfresco tomact to the SLES 12 alfresco tomact. Restarted all apache/tomcat services and try to go to https://share2.domain.tld.https://share2.domain.tld./ Chrome reports Error code: ERR_CONNECTION_REFUSED When i look at the apache log for that request, i dont see where the request is even making it to apache or tomcat. Here is mod_jk: # simple configuration for apache (for AJP connector, modul mod_jk.so) IfModule mod_jk.c JkWorkersFile /opt/alfresco/tomcat/workers.properties JkLogFile /var/log/alfresco/mod_jk.log JkShmFile /var/log/alfresco/shm # Log level to be used by mod_jk JkLogLevel error # The following line prohibits users from directly accessing WEB-INF Location /share/WEB-INF/ #AllowOverride None Require all denied /Location #Location /servlets-examples/WEB-INF/ #AllowOverride None #deny from all #/Location /IfModule Here is worker.properties: worker.list=jk-status worker.jk-status.type=status worker.jk-status.read_only=true worker.list=jk-manager worker.list=worker1 worker.jk-manager.type=status worker.list=balancer worker.balancer.type=lb worker.balancer.max_reply_timeouts=10 worker.balancer.balance_workers=worker1 worker.worker1.reference=worker.template worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.activation=A worker.template.type=ajp13 worker.template.socket_keepalive=true worker.template.connection_pool_minsize=0 worker.template.connection_pool_timeout=600 worker.template.reply_timeout=30 worker.template.recovery_options=3 I have mod_jk loaded in apache. Can anyone identify where the issue is?
Re: Mod_jk Configuration
2015-01-17 2:31 GMT+03:00 Chris Arnold carn...@electrichendrix.com: Current working setup: apache 2.2 using mod_jk to pass 443 requests to tomcat on 8443. We are migrating from SLES 11 SP3 to SLEs 12. On SLES 11 we use alfresco 5.0.c which includes tomact 7.x i believe. SLES 11 has apache 2.2.10. SLES 12 has apache 2.4 and we use the same version of alfresco on SLES 12 (tomcat 7.x). So i installed SLES 12, apache 2.4 and alfresco 5.0.c on a test server. I then followed the upgrading guide for apache 2.2 to 2.4. I copied the existing working config files from the alfresco tomact to the SLES 12 alfresco tomact. Restarted all apache/tomcat services and try to go to https://share2.domain.tld.https://share2.domain.tld./ Chrome reports Error code: ERR_CONNECTION_REFUSED When i look at the apache log for that request, i dont see where the request is even making it to apache or tomcat. Try to request a static file from DocumentRoot directory. If you cannot, then your HTTPS is not configured correctly. Get that working first. Here is mod_jk: # simple configuration for apache (for AJP connector, modul mod_jk.so) IfModule mod_jk.c JkWorkersFile /opt/alfresco/tomcat/workers.properties JkLogFile /var/log/alfresco/mod_jk.log JkShmFile /var/log/alfresco/shm # Log level to be used by mod_jk JkLogLevel error # The following line prohibits users from directly accessing WEB-INF Location /share/WEB-INF/ #AllowOverride None Require all denied /Location #Location /servlets-examples/WEB-INF/ #AllowOverride None #deny from all #/Location /IfModule Here is worker.properties: worker.list=jk-status worker.jk-status.type=status worker.jk-status.read_only=true worker.list=jk-manager worker.list=worker1 worker.jk-manager.type=status worker.list=balancer So, what is the value for worker.list? You set the same worker.list property 4 times, but with different values. worker.balancer.type=lb worker.balancer.max_reply_timeouts=10 worker.balancer.balance_workers=worker1 worker.worker1.reference=worker.template worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.activation=A worker.template.type=ajp13 worker.template.socket_keepalive=true worker.template.connection_pool_minsize=0 worker.template.connection_pool_timeout=600 worker.template.reply_timeout=30 worker.template.recovery_options=3 I have mod_jk loaded in apache. Can anyone identify where the issue is? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
Am 17.01.2015 um 00:31 schrieb Chris Arnold: Current working setup: apache 2.2 using mod_jk to pass 443 requests to tomcat on 8443. We are migrating from SLES 11 SP3 to SLEs 12. On SLES 11 we use alfresco 5.0.c which includes tomact 7.x i believe. SLES 11 has apache 2.2.10. SLES 12 has apache 2.4 and we use the same version of alfresco on SLES 12 (tomcat 7.x). So i installed SLES 12, apache 2.4 and alfresco 5.0.c on a test server. I then followed the upgrading guide for apache 2.2 to 2.4. I copied the existing working config files from the alfresco tomact to the SLES 12 alfresco tomact. Restarted all apache/tomcat services and try to go to https://share2.domain.tld.https://share2.domain.tld./ Chrome reports Error code: ERR_CONNECTION_REFUSED When i look at the apache log for that request, i dont see where the request is even making it to apache or tomcat. Here is mod_jk: # simple configuration for apache (for AJP connector, modul mod_jk.so) IfModule mod_jk.c JkWorkersFile /opt/alfresco/tomcat/workers.properties JkLogFile /var/log/alfresco/mod_jk.log JkShmFile /var/log/alfresco/shm # Log level to be used by mod_jk JkLogLevel error # The following line prohibits users from directly accessing WEB-INF Location /share/WEB-INF/ #AllowOverride None Require all denied /Location #Location /servlets-examples/WEB-INF/ #AllowOverride None #deny from all #/Location /IfModule No JkMount? mod_jk uses the JkMount directive to decide, which requests should be forwarded. Something like JkMount /myapp|/* balancer The directive should be put into the VirtualHost that is used in your Apache web server config to serve the requests for /myapp. Here is worker.properties: worker.list=jk-status worker.jk-status.type=status worker.jk-status.read_only=true worker.list=jk-manager worker.list=worker1 worker.jk-manager.type=status worker.list=balancer worker.balancer.type=lb worker.balancer.max_reply_timeouts=10 worker.balancer.balance_workers=worker1 worker.worker1.reference=worker.template worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.activation=A worker.template.type=ajp13 worker.template.socket_keepalive=true worker.template.connection_pool_minsize=0 worker.template.connection_pool_timeout=600 worker.template.reply_timeout=30 worker.template.recovery_options=3 I have mod_jk loaded in apache. Can anyone identify where the issue is? Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Mod_jk Configuration
No JkMount? mod_jk uses the JkMount directive to decide, which requests should be forwarded. Something like JkMount /myapp|/* balancer The directive should be put into the VirtualHost that is used in your Apache web server config to serve the requests for /myapp. When i look at the existing server that works, i cant tell if we are using mod_proxy or mod_jk. In the SSL-virtualhost, i see: #This rewrites https://share.anydomain.tld to our share server RewriteEngine On RewriteCond %{HTTP_HOST} ^share\. RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !^/share/ RewriteRule ^/(.*) https://share.domain.tld:8443/share/ [P] JkMount /share/* worker1 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
Am 17.01.2015 um 01:51 schrieb Konstantin Kolinko: 2015-01-17 2:31 GMT+03:00 Chris Arnold carn...@electrichendrix.com: Current working setup: apache 2.2 using mod_jk to pass 443 requests to tomcat on 8443. We are migrating from SLES 11 SP3 to SLEs 12. On SLES 11 we use alfresco 5.0.c which includes tomact 7.x i believe. SLES 11 has apache 2.2.10. SLES 12 has apache 2.4 and we use the same version of alfresco on SLES 12 (tomcat 7.x). So i installed SLES 12, apache 2.4 and alfresco 5.0.c on a test server. I then followed the upgrading guide for apache 2.2 to 2.4. I copied the existing working config files from the alfresco tomact to the SLES 12 alfresco tomact. Restarted all apache/tomcat services and try to go to https://share2.domain.tld.https://share2.domain.tld./ Chrome reports Error code: ERR_CONNECTION_REFUSED When i look at the apache log for that request, i dont see where the request is even making it to apache or tomcat. Try to request a static file from DocumentRoot directory. If you cannot, then your HTTPS is not configured correctly. Get that working first. Yeah, I overlooked that in my first response. As long as you don't see the request in the Apache access log, you'll not make progress. Here is mod_jk: # simple configuration for apache (for AJP connector, modul mod_jk.so) IfModule mod_jk.c JkWorkersFile /opt/alfresco/tomcat/workers.properties JkLogFile /var/log/alfresco/mod_jk.log JkShmFile /var/log/alfresco/shm # Log level to be used by mod_jk JkLogLevel error # The following line prohibits users from directly accessing WEB-INF Location /share/WEB-INF/ #AllowOverride None Require all denied /Location #Location /servlets-examples/WEB-INF/ #AllowOverride None #deny from all #/Location /IfModule Here is worker.properties: worker.list=jk-status worker.jk-status.type=status worker.jk-status.read_only=true worker.list=jk-manager worker.list=worker1 worker.jk-manager.type=status worker.list=balancer So, what is the value for worker.list? You set the same worker.list property 4 times, but with different values. Konstantin: that's actually OK. Some of the properties are allowed multiple times. The values are cumulative. That aloows a modular layout of the config file. In the docs under http://tomcat.apache.org/connectors-doc/reference/workers.html it is explicitly mentioned if a property is allowed multiple times. Currently this is true e.g. for the worker.list property and the balance_workers property of an lb worker. worker.balancer.type=lb worker.balancer.max_reply_timeouts=10 worker.balancer.balance_workers=worker1 worker.worker1.reference=worker.template worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.activation=A worker.template.type=ajp13 worker.template.socket_keepalive=true worker.template.connection_pool_minsize=0 worker.template.connection_pool_timeout=600 worker.template.reply_timeout=30 worker.template.recovery_options=3 Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
Am 17.01.2015 um 03:43 schrieb Chris Arnold: No JkMount? mod_jk uses the JkMount directive to decide, which requests should be forwarded. Something like JkMount /myapp|/* balancer The directive should be put into the VirtualHost that is used in your Apache web server config to serve the requests for /myapp. When i look at the existing server that works, i cant tell if we are using mod_proxy or mod_jk. In the SSL-virtualhost, i see: #This rewrites https://share.anydomain.tld to our share server RewriteEngine On RewriteCond %{HTTP_HOST} ^share\. RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !^/share/ RewriteRule ^/(.*) https://share.domain.tld:8443/share/ [P] That will forward any https request with a URI *not* starting with /share/ using mod_proxy. If there are no ProxyPass directives, it will not use persistent backend connections though. JkMount /share/* worker1 And this will use a worker named worker1 to forward anything with a URI starting with /share/ using mod_jk. Neither will work as long as your request don't actually hit the Apache web server. Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Mod_jk Configuration
When i look at the apache log for that request, i dont see where the request is even making it to apache or tomcat. Try to request a static file from DocumentRoot directory. If you cannot, then your HTTPS is not configured correctly. Get that working first. Yeah, I overlooked that in my first response. As long as you don't see the request in the Apache access log, you'll not make progress. I meant to answer that in my last answer: i can get to a site from HTTPD and i can also get to the https://192.168.xx.3:8443 Tomcat SSL with no problems. I just cant make it from HTTPD to Tomcat. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Mod_jk Configuration
Am 17.01.2015 um 04:05 schrieb Chris Arnold: When i look at the apache log for that request, i dont see where the request is even making it to apache or tomcat. Try to request a static file from DocumentRoot directory. If you cannot, then your HTTPS is not configured correctly. Get that working first. Yeah, I overlooked that in my first response. As long as you don't see the request in the Apache access log, you'll not make progress. I meant to answer that in my last answer: i can get to a site from HTTPD and i can also get to the https://192.168.xx.3:8443 Tomcat SSL with no problems. I just cant make it from HTTPD to Tomcat. Note that mod_jk will not use your 8443 port on Tomcat. It will use the 8009 AJP port (and connector in server.xml). If your mod_jk log doesn't contain any errors and if the needed JkMount directive is in place, increase the log level of mod_jk: JkLogLevel debug That will produce lots of info, but since your system is not already doing production, you can increase the log level, restart Apache and then try a single request that you expect to be forwarded from Apache to Tomcat. The log of that request (and of the startup) will help us to find the reason for your problems. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Mod_jk Configuration
#This rewrites https://share.anydomain.tld to our share server RewriteEngine On RewriteCond %{HTTP_HOST} ^share\. RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !^/share/ RewriteRule ^/(.*) https://share.domain.tld:8443/share/ [P] That will forward any https request with a URI *not* starting with /share/ using mod_proxy. If there are no ProxyPass directives, it will not use persistent backend connections though. JkMount /share/* worker1 And this will use a worker named worker1 to forward anything with a URI starting with /share/ using mod_jk. Neither will work as long as your request don't actually hit the Apache web server. OK, so netstat does not show apache listening on 443. Here is listen.conf: Listen 80 IfDefine SSL IfDefine !NOSSL IfModule mod_ssl.c Listen 443 /IfModule /IfDefine mod_ssl is loaded on apache /IfDefine - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
mod_jk configuration woes
I have the following configuration (config files below) and am encountering the error ajp_connection_tcp_get_message::jk_ajp_common.c (1033): wrong message format 0x4854 from 127.0.0.1:8082 when attempting to access a URL that matches one of my JKMounted entries. My versions are listed below, my workers.properties entries are supplied, my relevant http.conf entries are supplied, and the debug log from mod_jk.log is supplied. mod_jk was built from source because of the known issue of the latest mod_jk builds not working properly with the 2.2.3 version of Apache httpd. Can anyone provide some insight as to why Im getting this error message? Is it my combination of Tomcat, Apache, mod_jk? Is there something that mod_jk is expecting but not getting from Tomcat? Note that the URL http://localhost:8082/towergrovefeeddemo_en/ works just fine from the machine on which the httpd and tomcat instances are running. http://www.towergrovefeed.com/towergrovefeeddemo_en/ should (effectively) map to that for purposes of proxying. I dont know what it is that mod_jk dislikes about the reply its getting. Thanks for any insights. - Virgil Versions === Tomcat version 4.1.31 Apache httpd version 2.2.3 mod_jk version 1.2.26 compiled from source using instructions found at http://webui.sourcelabs.com/tomcat/mail/user/threads/Problem_with_mod_jk_installation.meta workers.properties === # Define worker names worker.list=worker1, englishdemo, dev # Properties for worker1 worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 # Properties for englishdemo worker.englishdemo.type=ajp13 worker.englishdemo.host=localhost worker.englishdemo.port=8082 # Properties for dev worker.dev.type=ajp13 worker.dev.host=localhost worker.dev.port=8086 httpd.conf entries: === LoadModule jk_module modules/mod_jk.so # Where to find workers.properties # Update this path to match your conf directory location (put workers.properties next to httpd.conf) JkWorkersFile /etc/httpd/conf/workers.properties # Where to put jk shared memory # Update this path to match your local state directory or logs directory JkShmFile /var/log/httpd/mod_jk.shm # Where to put jk logs # Update this path to match your logs directory location (put mod_jk.log next to access_log) JkLogFile /var/log/httpd/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel debug # Select the timestamp log format JkLogStampFormat [%a %b %d %H:%M:%S %Y] # Send everything for context /examples to worker named worker1 (ajp13) JkMount /towergrovefeeddemo_en/* englishdemo JkMount /towergrovefeeddev2/* dev JkMount /examples/* worker1 Complete mod_jk debug log from startup of apache to execution of first request: === [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] jk_set_time_fmt::jk_util.c (430): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S %Y] ' [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] uri_worker_map_open::jk_uri_worker_map.c (427): rule map size is 3 [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] uri_worker_map_add::jk_uri_worker_map.c (379): wildchar rule '/towergrovefeeddemo_en/*=englishdemo' source 'JkMount' was added [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] uri_worker_map_add::jk_uri_worker_map.c (379): wildchar rule '/towergrovefeeddev2/*=dev' source 'JkMount' was added [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] uri_worker_map_add::jk_uri_worker_map.c (379): wildchar rule '/examples/*=worker1' source 'JkMount' was added [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] do_shm_open::jk_shm.c (402): Truncated shared memory to 28800 [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] do_shm_open::jk_shm.c (447): Initialized shared memory size=28800 free=28672 addr=0x40f99000 [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] do_shm_open_lock::jk_shm.c (321): Opened shared memory lock /var/log/httpd/mod_jk.shm.17274.lock [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] init_jk::mod_jk.c (2775): Initialized shm:/var/log/httpd/mod_jk.shm.17274 (28672 bytes) [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] init_jk::mod_jk.c (2792): Setting default connection pool max size to 1 [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] jk_map_read_property::jk_map.c (492): Adding property 'worker.list' with value 'worker1, englishdemo, dev' to map. [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] jk_map_read_property::jk_map.c (492): Adding property 'worker.worker1.type' with value 'ajp13' to map. [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] jk_map_read_property::jk_map.c (492): Adding property 'worker.worker1.host' with value 'localhost' to map. [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug] jk_map_read_property::jk_map.c (492): Adding property 'worker.worker1.port' with value '8009' to map. [Thu Oct 16 22:30:52 2008] [17274:1081287232] [debug]
Re: mod_jk configuration woes
I have the following configuration (config files below) and am encountering the error “ajp_connection_tcp_get_message::jk_ajp_common.c (1033): wrong message format 0x4854 from 127.0.0.1:8082” when attempting to access a URL that matches one of my JKMounted entries. My versions are listed below, my workers.properties entries are supplied, my relevant http.conf entries are supplied, and the debug log from mod_jk.log is supplied. mod_jk was built from source because of the known issue of the latest mod_jk builds not working properly with the 2.2.3 version of Apache httpd. Can anyone provide some insight as to why I’m getting this error message? Is it my combination of Tomcat, Apache, mod_jk? Is there something that mod_jk is expecting but not getting from Tomcat? Mod_Jk needs to talk to tomcat via the ajp protocol. You need to define an ajp connector and point mod_jk at that port. Regards, Al
Re: mod_jk configuration woes
[EMAIL PROTECTED] schrieb: I have the following configuration (config files below) and am encountering the error “ajp_connection_tcp_get_message::jk_ajp_common.c (1033): wrong message format 0x4854 from 127.0.0.1:8082” when attempting to access a URL that matches one of my JKMounted entries. My versions are listed below, my workers.properties entries are supplied, my relevant http.conf entries are supplied, and the debug log from mod_jk.log is supplied. mod_jk was built from source because of the known issue of the latest mod_jk builds not working properly with the 2.2.3 version of Apache httpd. Can anyone provide some insight as to why I’m getting this error message? Is it my combination of Tomcat, Apache, mod_jk? Is there something that mod_jk is expecting but not getting from Tomcat? Mod_Jk needs to talk to tomcat via the ajp protocol. You need to define an ajp connector and point mod_jk at that port. The connectors are defined in server.xml of Tomcat. 4.1.31 has by default two types of ajp13 connectors to choose from. The more modern one is the one with className=org.apache.coyote.tomcat4.CoyoteConnector. The attribute protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler is important. You need one Connector per port you want to talk to via mod_jk. BTW: if you really still need to use Tomcat 4.1, consider upgrading to 4.1.37. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration woes
I have the following configuration (config files below) and am encountering the error âajp_connection_tcp_get_message::jk_ajp_common.c (1033): wrong message format 0x4854 from 127.0.0.1:8082â when attempting to access a URL that matches one of my JKMounted entries. My versions are listed below, my workers.properties entries are supplied, my relevant http.conf entries are supplied, and the debug log from mod_jk.log is supplied. mod_jk was built from source because of the known issue of the latest mod_jk builds not working properly with the 2.2.3 version of Apache httpd. Can anyone provide some insight as to why Iâm getting this error message? Is it my combination of Tomcat, Apache, mod_jk? Is there something that mod_jk is expecting but not getting from Tomcat? Mod_Jk needs to talk to tomcat via the ajp protocol. You need to define an ajp connector and point mod_jk at that port. Thanks. It all makes sense now. The Tomcat Connector documentation assumes that you have a default Tomcat config which includes ajp by default. I happen to be using a custom Tomcat config file produced by someone else. I didn't recognize the significance of the use of port 8009 in the examples. Not being familiar with ajp and not seeing anything in the mod_jk or JK documentation that reminds you that this assumption exists (or suggests that you ensure an ajp connector is defined), I missed the tomcat side of the configuration. - Virgil - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk configuration issue
Hi, I am kind of new to tomcat and apache. I have configured Apache2 ( on port 80) and Tomcat 6 (on port 8080) on my linux machine (ubuntu 8.04) and both work fine on its own. I am trying to get the Apache forward the jsp requests to tomcat and get it serviced by tomcat. I just went through the steps from the below link: http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html#s72 The option to create the mod_jk.conf file by *starting the tomcat with jkconf option* doesn't work for me. It doesn't display anything in the error log. Can anyone help me get through this. Thanks, Vinod
Re: mod_jk configuration issue
On 16 Jul 2008 at 13:41, Vinod Nagarajan wrote: Date sent: Wed, 16 Jul 2008 13:41:09 -0700 From: Vinod Nagarajan [EMAIL PROTECTED] Subject:mod_jk configuration issue To: users@tomcat.apache.org Send reply to: Tomcat Users List users@tomcat.apache.org Hi, I am kind of new to tomcat and apache. I have configured Apache2 ( on port 80) and Tomcat 6 (on port 8080) on my linux machine (ubuntu 8.04) and both work fine on its own. I am trying to get the Apache forward the jsp requests to tomcat and get it serviced by tomcat. I just went through the steps from the below link: http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html#s72 Those docs are ancient, they are for tomcat 3.3. Try using this: http://tomcat.apache.org/connectors-doc/generic_howto/quick.html and http://tomcat.apache.org/connectors-doc/ you will also need a jkmount for jsps like so: JkMount /*.jsp worker1 -Steve O. The option to create the mod_jk.conf file by *starting the tomcat with jkconf option* doesn't work for me. It doesn't display anything in the error log. Can anyone help me get through this. Thanks, Vinod - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat6, Apache, and mod_jk configuration
Hard to tell, without any version, plattform, configuration and log file content information... Usually, if it's mod_jk 1.2.26: Don't forget to put your JkMount into the VirtualHost (or use JkMountCopy). Regards, Rainer Da Rock wrote: I'm trying to get all of the above working together peacefully with no success whatsoever. I've got Tomcat working, and Apache has always worked as per usual, but mod_jk will simply not work. I'm running all this on freebsd server, and when I navigate to /webapps on the server I get a 404 error- but from the Tomcat server! Yet navigating directly on the Tomcat server works fine. Am I missing something? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat6, Apache, and mod_jk configuration
Yep, something is not right with the Apache config. You need to monitor some logs somewhere. Turn on more logging level before you start i.e. level=Debug or some such value. HTH. Da Rock wrote .. I'm trying to get all of the above working together peacefully with no success whatsoever. I've got Tomcat working, and Apache has always worked as per usual, but mod_jk will simply not work. I'm running all this on freebsd server, and when I navigate to /webapps on the server I get a 404 error- but from the Tomcat server! Yet navigating directly on the Tomcat server works fine. Am I missing something? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat6, Apache, and mod_jk configuration
Is it the Apache? Or is it the Tomcat? All the logs say ok... so As I mentioned this is a FreeBSD server- 6.2, Apache2.2, Tomcat 6.0, mod_jk? (latest from FreeBSD ports 1.2.26?). My httpd.conf includes a mod_jk.conf file and the mod_jk.conf calls a workers.properties file. So do I need to put a reference in virtualhosts, or can I use it globally? mod_jk.conf: IfModule mod_jk.c JkWorkersFile /usr/local/etc/apache22/extra/workers.properties JkLogFile /var/log/jk.log JkShmFile /var/log/jk-runtime-status JkLogLevel error # Sample JkMounts. Replace these with the paths you would # like to mount from your JSP server. JkMount /*.jsp localhost JkMount /servlet/* localhost JkMount /examples/* localhost JkMount /login/j_security_check localhost /IfModule # Map encoded urls Location *;jsessionid= SetHandler jakarta-servlet /Location # Map subdirectory Location /webapps/ SetHandler jakarta-servlet /Location workers.properties: worker.worker1.port=8009 worker.worker1.host=127.0.0.1 worker.worker1.type=ajp13 worker.worker1.lbfactor=1 In the mod_jk.conf file I changed the JkMount entries to occur outside the IfModule directive, and ran apachectl -k graceful but still no change. I then navigated to /servlets (in httpd.conf there is a Directory directive for /webapps only, referencing the tomcat web directory) and a 404 error from Apache saying /servlets not found. On Tue, 2008-02-19 at 05:01 -0600, David Brown wrote: Yep, something is not right with the Apache config. You need to monitor some logs somewhere. Turn on more logging level before you start i.e. level=Debug or some such value. HTH. Da Rock wrote .. I'm trying to get all of the above working together peacefully with no success whatsoever. I've got Tomcat working, and Apache has always worked as per usual, but mod_jk will simply not work. I'm running all this on freebsd server, and when I navigate to /webapps on the server I get a 404 error- but from the Tomcat server! Yet navigating directly on the Tomcat server works fine. Am I missing something? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat6, Apache, and mod_jk configuration
Since you defined worker1 in you worker.properties, you should use worker1 in the JkMount section of your httpd.conf instead of using localhost below is an example of my configuration which works: LoadModule jk_module modules/mod_jk.so JkWorkersFile /etc/httpd/conf/workers.properties JkLogFile /etc/httpd/logs/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkMount /*.jsp wrkr JkMount /servlet/* wrkr in workers.properties # workers.properties - ajp13 # # List workers worker.list=wrkr # # Define wrkr worker.wrkr.port=8009 worker.wrkr.host=localhost worker.wrkr.type=ajp13 worker.wrkr.cachesize=10 worker.wrkr.cache_timeout=600 worker.wrkr.socket_timeout=300 Jiansen On Feb 19, 2008 8:43 AM, Da Rock [EMAIL PROTECTED] wrote: Is it the Apache? Or is it the Tomcat? All the logs say ok... so As I mentioned this is a FreeBSD server- 6.2, Apache2.2, Tomcat 6.0, mod_jk? (latest from FreeBSD ports 1.2.26?). My httpd.conf includes a mod_jk.conf file and the mod_jk.conf calls a workers.properties file. So do I need to put a reference in virtualhosts, or can I use it globally? mod_jk.conf: IfModule mod_jk.c JkWorkersFile /usr/local/etc/apache22/extra/workers.properties JkLogFile /var/log/jk.log JkShmFile /var/log/jk-runtime-status JkLogLevel error # Sample JkMounts. Replace these with the paths you would # like to mount from your JSP server. JkMount /*.jsp localhost JkMount /servlet/* localhost JkMount /examples/* localhost JkMount /login/j_security_check localhost /IfModule # Map encoded urls Location *;jsessionid= SetHandler jakarta-servlet /Location # Map subdirectory Location /webapps/ SetHandler jakarta-servlet /Location workers.properties: worker.worker1.port=8009 worker.worker1.host=127.0.0.1 worker.worker1.type=ajp13 worker.worker1.lbfactor=1 In the mod_jk.conf file I changed the JkMount entries to occur outside the IfModule directive, and ran apachectl -k graceful but still no change. I then navigated to /servlets (in httpd.conf there is a Directory directive for /webapps only, referencing the tomcat web directory) and a 404 error from Apache saying /servlets not found. On Tue, 2008-02-19 at 05:01 -0600, David Brown wrote: Yep, something is not right with the Apache config. You need to monitor some logs somewhere. Turn on more logging level before you start i.e. level=Debug or some such value. HTH. Da Rock wrote .. I'm trying to get all of the above working together peacefully with no success whatsoever. I've got Tomcat working, and Apache has always worked as per usual, but mod_jk will simply not work. I'm running all this on freebsd server, and when I navigate to /webapps on the server I get a 404 error- but from the Tomcat server! Yet navigating directly on the Tomcat server works fine. Am I missing something? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat6, Apache, and mod_jk configuration
I'm trying to get all of the above working together peacefully with no success whatsoever. I've got Tomcat working, and Apache has always worked as per usual, but mod_jk will simply not work. I'm running all this on freebsd server, and when I navigate to /webapps on the server I get a 404 error- but from the Tomcat server! Yet navigating directly on the Tomcat server works fine. Am I missing something? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] mod_jk configuration for production
I've read the documentation and my question is : - socket_timeout = 2s but reply_timeout is 0 meaning that the webserver is waiting forever. Which of them is used for timeout ajp connection? nuka wrote: Hello, I am facing to a problem concerning apache-tomcat configuration via mod_jk for our production environment. We are using Apache: 2.0.55, Tomcat 5.0, mod_jk 1.2.15. Our first problem has been raised some weeks ago when the clients received http 404 errors. mod_jk logs have shown errors such as: [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1178): Socket 14 is not connected any more (errno=-1) [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1202): Error sending request. Will try another pooled connection [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1225): All endpoints are disconnected or dead [Tue Feb 13 08:36:03 2007][info] ajp_service::jk_ajp_common.c (1749): Sending request to tomcat failed, recoverable operation attempt=1 After that, we changed the timeout for tomcat ajp connector (initially = 1) to 6ms. Now we get other errors: - a lot of Error decoding request in the JBoss logs at the same times where mod_jk is showing [Mon Feb 19 13:25:50 2007][info] ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a connection close for socket 14 [Mon Feb 19 13:25:50 2007][error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Mon Feb 19 13:25:50 2007][info] ajp_service::jk_ajp_common.c (1721): Receiving from tomcat failed, recoverable operation attempt=0 Bellow is our configuration: !-- A AJP 1.3 Connector on port 8009 -- Connector port=8009 address=${jboss.bind.address} enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 connectionTimeout=6/ workers.properties: # Define list of workers that will be used # for mapping requests worker.list=loadbalancer, loadbalancer2, status worker.xxxNode1.port=8109 worker.xxxNode1.host= worker.xxxNode1.type=ajp13 worker.xxxNode1.socket_keepalive=True worker.xxxNode1.socket_timeout=2 worker.xxxNode1.recycle_timeout=300 worker.xxxNode1.recovery_options=0 worker.xxxNode2.port=8209 worker.xxxNode2.host=xxx.xx.xx.xx worker.xxxNode2.type=ajp13 worker.xxxNode2.socket_keepalive=True worker.xxxNode2.socket_timeout=2 worker.xxxNode2.recycle_timeout=300 worker.xxx2.recovery_options=0 Do you have any idea which parameters do we need to change in this configuration? thanks rgds Nuka -- View this message in context: http://www.nabble.com/mod_jk-configuration-for-production-tf3260752.html#a9080605 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] mod_jk configuration for production
I've read the documentation and my question is : - socket_timeout = 2s but reply_timeout is 0 meaning that the webserver is waiting forever. Which of them is used for timeout ajp connection? Rainer Jung-3 wrote: Then start reading on http://tomcat.apache.org/connectors-doc/reference/workers.html what your configuration means. You will notice, that a value of 2 for the socket_timeout does not really make any sense. Regards, Rainer nuka schrieb: This configuration was done some time ago by someone else. I don't believe there is a specific reason for this parameter configuration. I believe that this should be a default dev configuration. Rainer Jung-3 wrote: What's your idea why you configured a socket timeout of 2? nuka schrieb: Hello, I am facing to a problem concerning apache-tomcat configuration via mod_jk for our production environment. We are using Apache: 2.0.55, Tomcat 5.0, mod_jk 1.2.15. Our first problem has been raised some weeks ago when the clients received http 404 errors. mod_jk logs have shown errors such as: [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1178): Socket 14 is not connected any more (errno=-1) [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1202): Error sending request. Will try another pooled connection [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1225): All endpoints are disconnected or dead [Tue Feb 13 08:36:03 2007][info] ajp_service::jk_ajp_common.c (1749): Sending request to tomcat failed, recoverable operation attempt=1 After that, we changed the timeout for tomcat ajp connector (initially = 1) to 6ms. Now we get other errors: - a lot of Error decoding request in the JBoss logs at the same times where mod_jk is showing [Mon Feb 19 13:25:50 2007][info] ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a connection close for socket 14 [Mon Feb 19 13:25:50 2007][error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Mon Feb 19 13:25:50 2007][info] ajp_service::jk_ajp_common.c (1721): Receiving from tomcat failed, recoverable operation attempt=0 Bellow is our configuration: !-- A AJP 1.3 Connector on port 8009 -- Connector port=8009 address=${jboss.bind.address} enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 connectionTimeout=6/ workers.properties: # Define list of workers that will be used # for mapping requests worker.list=loadbalancer, loadbalancer2, status worker.xxxNode1.port=8109 worker.xxxNode1.host= worker.xxxNode1.type=ajp13 worker.xxxNode1.socket_keepalive=True worker.xxxNode1.socket_timeout=2 worker.xxxNode1.recycle_timeout=300 worker.xxxNode1.recovery_options=0 worker.xxxNode2.port=8209 worker.xxxNode2.host=xxx.xx.xx.xx worker.xxxNode2.type=ajp13 worker.xxxNode2.socket_keepalive=True worker.xxxNode2.socket_timeout=2 worker.xxxNode2.recycle_timeout=300 worker.xxx2.recovery_options=0 Do you have any idea which parameters do we need to change in this configuration? thanks rgds Nuka - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/mod_jk-configuration-for-production-tf3260752.html#a9080778 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk configuration for production
Hello, I am facing to a problem concerning apache-tomcat configuration via mod_jk for our production environment. We are usingApache: 2.0.55, Tomcat 5.0, mod_jk 1.2.15. Our first problem has been raised some weeks ago when the clients received http 404 errors. mod_jk logs have shown errors such as: [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1178): Socket 14 is not connected any more (errno=-1) [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1202): Error sending request. Will try another pooled connection [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1225): All endpoints are disconnected or dead [Tue Feb 13 08:36:03 2007][info] ajp_service::jk_ajp_common.c (1749): Sending request to tomcat failed, recoverable operation attempt=1 After that, we changed the timeout for tomcat ajp connector (initially = 1) to 6ms. Now we get other errors: - a lot of Error decoding request in the JBoss logs at the same times where mod_jk is showing [Mon Feb 19 13:25:50 2007][info] ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a connection close for socket 14 [Mon Feb 19 13:25:50 2007][error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Mon Feb 19 13:25:50 2007][info] ajp_service::jk_ajp_common.c (1721): Receiving from tomcat failed, recoverable operation attempt=0 Bellow is our configuration: !-- A AJP 1.3 Connector on port 8009 -- Connector port=8009 address=${jboss.bind.address} enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 connectionTimeout=6/ workers.properties: # Define list of workers that will be used # for mapping requests worker.list=loadbalancer, loadbalancer2, status worker.xxxNode1.port=8109 worker.xxxNode1.host= worker.xxxNode1.type=ajp13 worker.xxxNode1.socket_keepalive=True worker.xxxNode1.socket_timeout=2 worker.xxxNode1.recycle_timeout=300 worker.xxxNode1.recovery_options=0 worker.xxxNode2.port=8209 worker.xxxNode2.host=xxx.xx.xx.xx worker.xxxNode2.type=ajp13 worker.xxxNode2.socket_keepalive=True worker.xxxNode2.socket_timeout=2 worker.xxxNode2.recycle_timeout=300 worker.xxx2.recovery_options=0 Do you have any idea which parameters do we need to change in this configuration? thanks rgds Nuka -- View this message in context: http://www.nabble.com/mod_jk-configuration-for-production-tf3260752.html#a9062426 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration for production
What's your idea why you configured a socket timeout of 2? nuka schrieb: Hello, I am facing to a problem concerning apache-tomcat configuration via mod_jk for our production environment. We are using Apache: 2.0.55, Tomcat 5.0, mod_jk 1.2.15. Our first problem has been raised some weeks ago when the clients received http 404 errors. mod_jk logs have shown errors such as: [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1178): Socket 14 is not connected any more (errno=-1) [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1202): Error sending request. Will try another pooled connection [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1225): All endpoints are disconnected or dead [Tue Feb 13 08:36:03 2007][info] ajp_service::jk_ajp_common.c (1749): Sending request to tomcat failed, recoverable operation attempt=1 After that, we changed the timeout for tomcat ajp connector (initially = 1) to 6ms. Now we get other errors: - a lot of Error decoding request in the JBoss logs at the same times where mod_jk is showing [Mon Feb 19 13:25:50 2007][info] ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a connection close for socket 14 [Mon Feb 19 13:25:50 2007][error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Mon Feb 19 13:25:50 2007][info] ajp_service::jk_ajp_common.c (1721): Receiving from tomcat failed, recoverable operation attempt=0 Bellow is our configuration: !-- A AJP 1.3 Connector on port 8009 -- Connector port=8009 address=${jboss.bind.address} enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 connectionTimeout=6/ workers.properties: # Define list of workers that will be used # for mapping requests worker.list=loadbalancer, loadbalancer2, status worker.xxxNode1.port=8109 worker.xxxNode1.host= worker.xxxNode1.type=ajp13 worker.xxxNode1.socket_keepalive=True worker.xxxNode1.socket_timeout=2 worker.xxxNode1.recycle_timeout=300 worker.xxxNode1.recovery_options=0 worker.xxxNode2.port=8209 worker.xxxNode2.host=xxx.xx.xx.xx worker.xxxNode2.type=ajp13 worker.xxxNode2.socket_keepalive=True worker.xxxNode2.socket_timeout=2 worker.xxxNode2.recycle_timeout=300 worker.xxx2.recovery_options=0 Do you have any idea which parameters do we need to change in this configuration? thanks rgds Nuka - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] mod_jk configuration for production
This configuration was done some time ago by someone else. I don't believe there is a specific reason for this parameter configuration. I believe that this should be a default dev configuration. Rainer Jung-3 wrote: What's your idea why you configured a socket timeout of 2? nuka schrieb: Hello, I am facing to a problem concerning apache-tomcat configuration via mod_jk for our production environment. We are using Apache: 2.0.55, Tomcat 5.0, mod_jk 1.2.15. Our first problem has been raised some weeks ago when the clients received http 404 errors. mod_jk logs have shown errors such as: [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1178): Socket 14 is not connected any more (errno=-1) [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1202): Error sending request. Will try another pooled connection [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1225): All endpoints are disconnected or dead [Tue Feb 13 08:36:03 2007][info] ajp_service::jk_ajp_common.c (1749): Sending request to tomcat failed, recoverable operation attempt=1 After that, we changed the timeout for tomcat ajp connector (initially = 1) to 6ms. Now we get other errors: - a lot of Error decoding request in the JBoss logs at the same times where mod_jk is showing [Mon Feb 19 13:25:50 2007][info] ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a connection close for socket 14 [Mon Feb 19 13:25:50 2007][error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Mon Feb 19 13:25:50 2007][info] ajp_service::jk_ajp_common.c (1721): Receiving from tomcat failed, recoverable operation attempt=0 Bellow is our configuration: !-- A AJP 1.3 Connector on port 8009 -- Connector port=8009 address=${jboss.bind.address} enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 connectionTimeout=6/ workers.properties: # Define list of workers that will be used # for mapping requests worker.list=loadbalancer, loadbalancer2, status worker.xxxNode1.port=8109 worker.xxxNode1.host= worker.xxxNode1.type=ajp13 worker.xxxNode1.socket_keepalive=True worker.xxxNode1.socket_timeout=2 worker.xxxNode1.recycle_timeout=300 worker.xxxNode1.recovery_options=0 worker.xxxNode2.port=8209 worker.xxxNode2.host=xxx.xx.xx.xx worker.xxxNode2.type=ajp13 worker.xxxNode2.socket_keepalive=True worker.xxxNode2.socket_timeout=2 worker.xxxNode2.recycle_timeout=300 worker.xxx2.recovery_options=0 Do you have any idea which parameters do we need to change in this configuration? thanks rgds Nuka - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/mod_jk-configuration-for-production-tf3260752.html#a9071060 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] mod_jk configuration for production
Then start reading on http://tomcat.apache.org/connectors-doc/reference/workers.html what your configuration means. You will notice, that a value of 2 for the socket_timeout does not really make any sense. Regards, Rainer nuka schrieb: This configuration was done some time ago by someone else. I don't believe there is a specific reason for this parameter configuration. I believe that this should be a default dev configuration. Rainer Jung-3 wrote: What's your idea why you configured a socket timeout of 2? nuka schrieb: Hello, I am facing to a problem concerning apache-tomcat configuration via mod_jk for our production environment. We are usingApache: 2.0.55, Tomcat 5.0, mod_jk 1.2.15. Our first problem has been raised some weeks ago when the clients received http 404 errors. mod_jk logs have shown errors such as: [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1178): Socket 14 is not connected any more (errno=-1) [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1202): Error sending request. Will try another pooled connection [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1225): All endpoints are disconnected or dead [Tue Feb 13 08:36:03 2007][info] ajp_service::jk_ajp_common.c (1749): Sending request to tomcat failed, recoverable operation attempt=1 After that, we changed the timeout for tomcat ajp connector (initially = 1) to 6ms. Now we get other errors: - a lot of Error decoding request in the JBoss logs at the same times where mod_jk is showing [Mon Feb 19 13:25:50 2007][info] ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a connection close for socket 14 [Mon Feb 19 13:25:50 2007][error] ajp_get_reply::jk_ajp_common.c (1503): Tomcat is down or refused connection. No response has been sent to the client (yet) [Mon Feb 19 13:25:50 2007][info] ajp_service::jk_ajp_common.c (1721): Receiving from tomcat failed, recoverable operation attempt=0 Bellow is our configuration: !-- A AJP 1.3 Connector on port 8009 -- Connector port=8009 address=${jboss.bind.address} enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 connectionTimeout=6/ workers.properties: # Define list of workers that will be used # for mapping requests worker.list=loadbalancer, loadbalancer2, status worker.xxxNode1.port=8109 worker.xxxNode1.host= worker.xxxNode1.type=ajp13 worker.xxxNode1.socket_keepalive=True worker.xxxNode1.socket_timeout=2 worker.xxxNode1.recycle_timeout=300 worker.xxxNode1.recovery_options=0 worker.xxxNode2.port=8209 worker.xxxNode2.host=xxx.xx.xx.xx worker.xxxNode2.type=ajp13 worker.xxxNode2.socket_keepalive=True worker.xxxNode2.socket_timeout=2 worker.xxxNode2.recycle_timeout=300 worker.xxx2.recovery_options=0 Do you have any idea which parameters do we need to change in this configuration? thanks rgds Nuka - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Christopher Schultz-2 wrote: Bruno, Alias /jsp-examples /srv/www/tomcat5/base/webapps/jsp-examples JkMount /jsp-examples/*.jsp ajp13 JkMount /jsp-examples/j_security_check ajp13 These three ought to do the trick. Which files aren't being served by Apache httpd? Well I add the line: JkMount /jsp-examples ajp13 I now I can get http://localhost/jsp-examples http://localhost/jsp-examples to work also... Thanks -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7091265 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Now I have an even stranger behavior... I can only JkMount /jsp-examples, I did the same to /tomcat-docs, /servlets-examples and /cocoon and I get : Forbidden You don't have permission to access /tomcat-docs/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. Here's my /etc/apache2/conf.d/jk.conf: http://www.nabble.com/file/3921/jk.conf jk.conf My httpd.conf comes with SuSE and has several include options... -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7091397 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno, Now I have an even stranger behavior... I can only JkMount /jsp-examples, I did the same to /tomcat-docs, /servlets-examples and /cocoon and I get : Forbidden You don't have permission to access /tomcat-docs/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. Tomcat is probably redirecting (302) /tomcat-docs to /tomcat-docs/ (note the trailing slash). Then, Apache httpd gets the new request and refuses to serve it for whatever reason (probably a missing Allow directive). You probably need to have: JkMount /tomcat-docs ajp13 JkMount /tomcat-docs/ ajp13 Here's my /etc/apache2/conf.d/jk.conf: http://www.nabble.com/file/3921/jk.conf jk.conf (These are never coming through. How are you trying to attach files?) -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration
Christopher Schultz-2 wrote: Here's my /etc/apache2/conf.d/jk.conf: http://www.nabble.com/file/3921/jk.conf jk.conf (These are never coming through. How are you trying to attach files?) I'm using Upload File... option. Here's a copy/paste: # simple configuration for apache (for AJP connector, modul mod_jk.so) IfModule mod_jk.c # workers file JkWorkersFile /etc/tomcat5/base/workers.properties # log file JkLogFile /usr/share/tomcat5/logs/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevelinfo # Select the log format JkLogStampFormat [%a %b %d %H:%M:%S %Y] # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat %w %V %T ### servlets-examples Alias /servlets-examples /srv/www/tomcat5/base/webapps/servlets-examples JkMount /servlets-examples ajp13 JkMount /servlets-examples/* ajp13 #JkMount /servlets-examples/j_security_check ajp13 ### jps-examples ## Alias /jsp-examples /srv/www/tomcat5/base/webapps/jsp-examples JkMount /jsp-examples ajp13 JkMount /jsp-examples/*.jsp ajp13 JkMount /jsp-examples/j_security_check ajp13 ### cocoon Alias /cocoon /srv/www/tomcat5/base/webapps/cocoon JkMount /cocoon ajp13 JkMount /cocoon/* ajp13 #JkMount /cocoon/j_security_check ajp13 tomcat-docs ## Alias /tomcat-docs /srv/www/tomcat5/base/webapps/tomcat-docs JkMount /tomcat-docs ajp13 JkMount /tomcat-docs/* ajp13 #JkMount /tomcat-docs/j_security_check ajp13 security ## # The following line prohibits users from directly accessing WEB-INF Location /jsp-examples/WEB-INF/ AllowOverride None deny from all /Location Location /servlets-examples/WEB-INF/ AllowOverride None deny from all /Location /IfModule -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7096982 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno, bcochofel wrote: Christopher Schultz-2 wrote: Here's my /etc/apache2/conf.d/jk.conf: http://www.nabble.com/file/3921/jk.conf jk.conf (These are never coming through. How are you trying to attach files?) I'm using Upload File... option. Hmm... I didn't know that one could upload file to an email... consider using copy/paste in the future. It seems to have worked, here. ### jps-examples ## Alias /jsp-examples /srv/www/tomcat5/base/webapps/jsp-examples JkMount /jsp-examples ajp13 JkMount /jsp-examples/*.jsp ajp13 JkMount /jsp-examples/j_security_check ajp13 Note that the URI /jsp-examples/ is not covered by these mappings. Apache httpd (and Tomcat) will do exactly what you ask of them, but no more. If the URI is off by a single character (in this case, a trailing '/'), then the request won't be forwarded to Tomcat. ### cocoon Alias /cocoon /srv/www/tomcat5/base/webapps/cocoon JkMount /cocoon ajp13 JkMount /cocoon/* ajp13 No, this one ought to work with a trailing /, since you have a mapping for /cocoon/*. This includes /cocoon/. You seem to be missing this mapping for the jsp-examples webapp, but the others have it. Just be careful about what you do and do not map. You can usually find the problem by reading your own configuration closely. Hope that helps, -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration
Christopher Schultz-2 wrote: Hmm... I didn't know that one could upload file to an email... consider using copy/paste in the future. It seems to have worked, here. I'm using www.nabble.com... Christopher Schultz-2 wrote: ### jps-examples ## Alias /jsp-examples /srv/www/tomcat5/base/webapps/jsp-examples JkMount /jsp-examples ajp13 JkMount /jsp-examples/*.jsp ajp13 JkMount /jsp-examples/j_security_check ajp13 Note that the URI /jsp-examples/ is not covered by these mappings. Apache httpd (and Tomcat) will do exactly what you ask of them, but no more. If the URI is off by a single character (in this case, a trailing '/'), then the request won't be forwarded to Tomcat. Well, this one works great, with or without the trailing /... Christopher Schultz-2 wrote: ### cocoon Alias /cocoon /srv/www/tomcat5/base/webapps/cocoon JkMount /cocoon ajp13 JkMount /cocoon/* ajp13 No, this one ought to work with a trailing /, since you have a mapping for /cocoon/*. This includes /cocoon/. This one works and all the others but tomcat does the job for all the files (static content and all) What I wan't to do is let Apache serve static content and tomcat serve dynamic one... In the /jsp-examples everything works fine... I have images, index.html and I can run .jsp... This is the strange problem I've mentioned. -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7098777 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno, Hmm... I didn't know that one could upload file to an email... consider using copy/paste in the future. It seems to have worked, here. I'm using www.nabble.com... Ah. I think the list will clip-out attachments. I'm not sure of the rules, but copy/paste pretty much always works. JkMount /cocoon/* ajp13 This one works and all the others but tomcat does the job for all the files (static content and all) That's because you said anything that starts with /cocoon/ should go to Tomcat. If you don't want Tomcat to serve those files, then don't use that kind of JkMount directive. What I wan't to do is let Apache serve static content and tomcat serve dynamic one... Apache httpd can only test based upon URI... it has no idea if a resource will be static or dynamic. You have to map your URIs appropriately. In the /jsp-examples everything works fine... I have images, index.html and I can run .jsp... This is the strange problem I've mentioned. It's not strange at all: you told Tomcat to handle everything (for example) for /cocoon/*. That's /everything/, regardless of it's static-ness. If you know that cocoon is required for 25 different URIs, then simply list them all. Or, if you know that cocoon only serves content for URIs more like this: /cocoon/a/b/c/*.html ...then only map that portion of the URI space into Tomcat. Apache httpd is doing /exactly/ what you've asked it to do. You just need to configure it to do what you want it to do. -chris signature.asc Description: OpenPGP digital signature
mod_jk configuration
I'm new to tomcat and mod_jk and I have a question abou the configuration... I can access http://localhost:8080/jsp-examples http://localhost:8080/jsp-examples and http://localhost/jsp-examples/ http://localhost/jsp-examples/ but when I try http://localhost/jsp-examples http://localhost/jsp-examples (without the /) I get this error: Forbidden You don't have permission to access /jsp-examples on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. Here's my jk.conf (/etc/apache2/conf.d/jk.conf): http://www.nabble.com/file/3907/jk.conf jk.conf Can someone help me on this? Thanks, Bruno -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7074844 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno, when I try http://localhost/jsp-examples http://localhost/jsp-examples (without the /) I get this error: Forbidden You don't have permission to access /jsp-examples on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. It looks like you have Indexes turned off for this directory/location in httpd.conf, or you don't have an index.html (or whatever) file there to display. In that case, it's not surprising that Apache httpd is generating this error (note that it's httpd, not Tomcat, that is generating the error). If you want Tomcat to respond to requests for the URI with no trailing slash, you'll have to map that explicitly. Here's my jk.conf (/etc/apache2/conf.d/jk.conf): http://www.nabble.com/file/3907/jk.conf jk.conf I'm guessing that was a copy/paste error. Let me guess what you have in jk.conf: JkMount /jsp-examples/* worker1 and/or JkMount /jsp-examples/*.jsp worker1 Since /jsp-examples does not match /jsp-examples/*, your mappings are failing. You'll need to add something like: JkMount /jsp-examples worker1 Hope that helps, -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration
Hi, Christopher Schultz wrote: Bruno, when I try http://localhost/jsp-examples http://localhost/jsp-examples (without the /) I get this error: Forbidden You don't have permission to access /jsp-examples on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. That happened to me once and the problem was in Apache's configuration. I had to specify a directory for jsp-examples and set the correct permissions with AllowOverride. It looks like you have Indexes turned off for this directory/location in httpd.conf, or you don't have an index.html (or whatever) file there to display. In that case, it's not surprising that Apache httpd is generating this error (note that it's httpd, not Tomcat, that is generating the error). If you want Tomcat to respond to requests for the URI with no trailing slash, you'll have to map that explicitly. Here's my jk.conf (/etc/apache2/conf.d/jk.conf): http://www.nabble.com/file/3907/jk.conf jk.conf I'm guessing that was a copy/paste error. Let me guess what you have in jk.conf: JkMount /jsp-examples/* worker1 and/or JkMount /jsp-examples/*.jsp worker1 Since /jsp-examples does not match /jsp-examples/*, your mappings are failing. You'll need to add something like: JkMount /jsp-examples worker1 Hope that helps, -chris Hope this helps, if you need the specific lines in Apache tell me and I'll send them. -- Jorge Cabrera Consultor técnico Ándago Ingeniería - www.andago.com Teléfono: +34 912 732 228 Móvil: +34 637 741 034 e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Well I've tried adding DirectoryIndex index.html index.htm index.jsp but no good... My Apache configuration has this and all the links work with or without the / Does jk.cong overrides my apache conf? Christopher Schultz-2 wrote: Bruno, when I try http://localhost/jsp-examples http://localhost/jsp-examples (without the /) I get this error: Forbidden You don't have permission to access /jsp-examples on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. It looks like you have Indexes turned off for this directory/location in httpd.conf, or you don't have an index.html (or whatever) file there to display. In that case, it's not surprising that Apache httpd is generating this error (note that it's httpd, not Tomcat, that is generating the error). If you want Tomcat to respond to requests for the URI with no trailing slash, you'll have to map that explicitly. Here's my jk.conf (/etc/apache2/conf.d/jk.conf): http://www.nabble.com/file/3907/jk.conf jk.conf I'm guessing that was a copy/paste error. Let me guess what you have in jk.conf: JkMount /jsp-examples/* worker1 and/or JkMount /jsp-examples/*.jsp worker1 Since /jsp-examples does not match /jsp-examples/*, your mappings are failing. You'll need to add something like: JkMount /jsp-examples worker1 Hope that helps, -chris -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7076449 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Well I would appreciated... Jorge Cabrera wrote: Hi, Christopher Schultz wrote: Bruno, when I try http://localhost/jsp-examples http://localhost/jsp-examples (without the /) I get this error: Forbidden You don't have permission to access /jsp-examples on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. That happened to me once and the problem was in Apache's configuration. I had to specify a directory for jsp-examples and set the correct permissions with AllowOverride. It looks like you have Indexes turned off for this directory/location in httpd.conf, or you don't have an index.html (or whatever) file there to display. In that case, it's not surprising that Apache httpd is generating this error (note that it's httpd, not Tomcat, that is generating the error). If you want Tomcat to respond to requests for the URI with no trailing slash, you'll have to map that explicitly. Here's my jk.conf (/etc/apache2/conf.d/jk.conf): http://www.nabble.com/file/3907/jk.conf jk.conf I'm guessing that was a copy/paste error. Let me guess what you have in jk.conf: JkMount /jsp-examples/* worker1 and/or JkMount /jsp-examples/*.jsp worker1 Since /jsp-examples does not match /jsp-examples/*, your mappings are failing. You'll need to add something like: JkMount /jsp-examples worker1 Hope that helps, -chris Hope this helps, if you need the specific lines in Apache tell me and I'll send them. -- Jorge Cabrera Consultor técnico Ándago Ingeniería - www.andago.com Teléfono: +34 912 732 228 Móvil: +34 637 741 034 e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7076457 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno- box: login as root to the box tomcat: login with tomcat-user (such as admin or manager) that already has admin,manager privs M- This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents - Original Message - From: bcochofel [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Monday, October 30, 2006 10:19 AM Subject: Re: mod_jk configuration Well I've tried adding DirectoryIndex index.html index.htm index.jsp but no good... My Apache configuration has this and all the links work with or without the / Does jk.cong overrides my apache conf? Christopher Schultz-2 wrote: Bruno, when I try http://localhost/jsp-examples http://localhost/jsp-examples (without the /) I get this error: Forbidden You don't have permission to access /jsp-examples on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. It looks like you have Indexes turned off for this directory/location in httpd.conf, or you don't have an index.html (or whatever) file there to display. In that case, it's not surprising that Apache httpd is generating this error (note that it's httpd, not Tomcat, that is generating the error). If you want Tomcat to respond to requests for the URI with no trailing slash, you'll have to map that explicitly. Here's my jk.conf (/etc/apache2/conf.d/jk.conf): http://www.nabble.com/file/3907/jk.conf jk.conf I'm guessing that was a copy/paste error. Let me guess what you have in jk.conf: JkMount /jsp-examples/* worker1 and/or JkMount /jsp-examples/*.jsp worker1 Since /jsp-examples does not match /jsp-examples/*, your mappings are failing. You'll need to add something like: JkMount /jsp-examples worker1 Hope that helps, -chris -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7076449 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
I had JkMount /jsp-examples worker1 and now the problem is gone... Thanks I have one more question, let's take /jsp-examples to explain... I want *.jsp send to tomcat for processing but all static contents processed by apache, how can I do this? Sorry for all the question but I'm new to all this tomcat configuration and I don't have much time to read all the docs... I need to get this to work by Wednesday... So, once more, thanks for the solutions... Christopher Schultz-2 wrote: Bruno, when I try http://localhost/jsp-examples http://localhost/jsp-examples (without the /) I get this error: Forbidden You don't have permission to access /jsp-examples on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. It looks like you have Indexes turned off for this directory/location in httpd.conf, or you don't have an index.html (or whatever) file there to display. In that case, it's not surprising that Apache httpd is generating this error (note that it's httpd, not Tomcat, that is generating the error). If you want Tomcat to respond to requests for the URI with no trailing slash, you'll have to map that explicitly. Here's my jk.conf (/etc/apache2/conf.d/jk.conf): http://www.nabble.com/file/3907/jk.conf jk.conf I'm guessing that was a copy/paste error. Let me guess what you have in jk.conf: JkMount /jsp-examples/* worker1 and/or JkMount /jsp-examples/*.jsp worker1 Since /jsp-examples does not match /jsp-examples/*, your mappings are failing. You'll need to add something like: JkMount /jsp-examples worker1 Hope that helps, -chris -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7077657 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno, Well I've tried adding DirectoryIndex index.html index.htm index.jsp but no good... Can you post the relevant portions of your httpd.conf? Does jk.cong overrides my apache conf? jk.conf is just included in httpd.conf (right?), so it can certainly override your httpd.conf. -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration
Bruno, I have one more question, let's take /jsp-examples to explain... I want *.jsp send to tomcat for processing but all static contents processed by apache, how can I do this? This should be the default. Anything for which you do not explicitly have a JkMount directive will be served by Apache httpd and not Tomcat. -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration
But when I use JkMount /jsp-examples ajp13 doesn't this tell Apache that everything inside /jsp-examples goes to Tomcat? Christopher Schultz-2 wrote: Bruno, I have one more question, let's take /jsp-examples to explain... I want *.jsp send to tomcat for processing but all static contents processed by apache, how can I do this? This should be the default. Anything for which you do not explicitly have a JkMount directive will be served by Apache httpd and not Tomcat. -chris -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7078655 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno, But when I use JkMount /jsp-examples ajp13 doesn't this tell Apache that everything inside /jsp-examples goes to Tomcat? No, it doesn't. JkMount does two kinds of matching: exact and wildcard. Exact: JkMount /jsp-examples ajp13 This will map the URI /jsp-examples to Tomcat, and NO OTHERS AT ALL. Wildcard: JkMount /jsp-examples/*.jsp ajp13 This will map any URI that looks like /jsp-examples/ . .jsp. Note that the first example and the second example are completely separate. If you want Tomcat to handle /jsp-examples and everything inside that URI space, you need to do this: JkMount /jsp-examplesajp13 JkMount /jsp-examples/* ajp13 But, since you want Apache httpd to handle all the static content, you'll have to decide what Tomcat /should/ handle. I would usually have something like this for each of my webapps: JkMount /webappName/*.jsp ajp13 JkMount /webappName/j_security_check ajp13 This covers all JSPs as well as the built-in J2EE authentication system supported by Tomcat. If you have other URIs as well, then you should define them. There's nothing wrong with having a lot of JkMount directives: JkMount /webappName/servlet/* ajp13 JkMount /webappName/some/specific/servlet ajp13 JkMount /webappName/another/servlet/name ajp13 . . . Just list everything that you want Tomcat to handle, and everything else will be served by Apache httpd. -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration
Well I tried that but no good... I'vre tried this and still nothing: # The following line makes apache aware of the location of # the /jsp-examples context Alias /jsp-examples /srv/www/tomcat5/base/webapps/jsp-examples Directory /srv/www/tomcat5/base/webapps/jsp-examples Options Indexes FollowSymLinks AllowOverride AuthConfig DirectoryIndex index.html index.htm index.jsp Order allow,deny Allow from all /Directory # Mount 'jsp-examples' directory inside webapps #JkMount /jsp-examples/* ajp13 #JkMount /jsp-examples ajp13 JkMount /jsp-examples/*.jsp ajp13 JkMount /jsp-examples/j_security_check ajp13 I guess I have to tell tomcat to process all the things for now... Christopher Schultz-2 wrote: But, since you want Apache httpd to handle all the static content, you'll have to decide what Tomcat /should/ handle. I would usually have something like this for each of my webapps: JkMount /webappName/*.jsp ajp13 JkMount /webappName/j_security_check ajp13 This covers all JSPs as well as the built-in J2EE authentication system supported by Tomcat. If you have other URIs as well, then you should define them. There's nothing wrong with having a lot of JkMount directives: -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7079096 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno, Alias /jsp-examples /srv/www/tomcat5/base/webapps/jsp-examples JkMount /jsp-examples/*.jsp ajp13 JkMount /jsp-examples/j_security_check ajp13 These three ought to do the trick. Which files aren't being served by Apache httpd? Can you give an example of a URI that should map successfully to a file on the disk, but doesn't appear to do so? Can you confirm that it is Tomcat or httpd that can't find the file? -chris signature.asc Description: OpenPGP digital signature
RE: Tomcat, Apache and mod_jk configuration
I'm trying to do a similar setup as well and I'm using just about the same configuration as shown below (I've attached my configs). But I'm having one big issue: when I try to do a hot redeploy of my webapp, I do not see the changes at http://rtv.myhost.com unless I restart Tomcat. BUT, I do see the changes immediately, if I go to http://10.2.1.100:8080/rtv. Any advice as to what I'm doing wrong would be very much appreciated as I've been banging my head on the desk for some time about this issue. The only big difference I see in the configs is that I'm pointing my apache virtual host's documentRoot to the same path as the webapp. If I don't do that, none of my static pages (.css, .js) get served properly, so I don't think that it's the problem. Thanks, Josh Apache config: VirtualHost *:80 ServerName rtv.myhost.com ServerAlias www.rtv.myhost.com DocumentRoot /usr/local/tomcat/webapps/rtv DirectoryIndex index.jsp index.html ErrorLog logs/rtv. myhost.com-errorlog CustomLog logs/rtv. myhost.com-accesslog common Directory /usr/local/tomcat/webapps/rtv Options +FollowSymLinks Order allow,deny Allow from all /Directory #DENY ACCESS TO WEB-INF and META-INF Location /WEB-INF/* AllowOverride None deny from all /Location Location /META-INF/* AllowOverride None deny from all /Location #ROUTE ALL JSP AND SERVLETS TO THE mod_jk WORKER #These extensions are specified in /etc/httpd/conf.d/jk.conf file JkMount /*.do router JkMount /*.jsp router /VirtualHost Tomcat config: Host name=rtv.myhost.com appBase=/usr/local/tomcat/webapps/rtv unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase= debug= / Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=rtv.myhost.com_log / /Host -Original Message- From: Michael Courcy [mailto:[EMAIL PROTECTED] Sent: Thursday, October 19, 2006 3:07 PM To: Tomcat Users List Subject: Re: Tomcat, Apache and mod_jk configuration Yes it's what I mean, in your JkMount declaration change jkMount /struts-dev-1/*.do ajp13 jkMount /struts-dev-1/*.jsp ajp13 By jkMount /*.do ajp13 jkMount /*.jsp ajp13 And your server.xml fragment should look this way Host name=preprod.skyce.net appBase= unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=/var/tomcat/webapps/struts-dev-1/ debug=0 / /Host It should works. DE VINZELLES, Guillaume (ext.) a écrit : In fact, I've already put the jkMount directive in the VirtualHost conf. It looks like: VirtualHost 88.191.24.6:80 DocumentRoot /var/www/preprod.skyce.net/htdocs Directory /var/www/preprod.skyce.net/htdocs Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all /Directory ServerName preprod.skyce.net ErrorLog /var/www/preprod.skyce.net/log/error_log CustomLog /var/www/preprod.skyce.net/log/access_log common jkMount /struts-dev-1/*.do ajp13 jkMount /struts-dev-1/*.jsp ajp13 /VirtualHost And I'd like to have my webapp accessible through http://preprod.skyce.net/ instead of http://preprod.skyce.net/struts-dev-1/. The pertinent fragment of my server.xml is: Host name=preprod.skyce.net appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false My webapps are located in /var/tomcat/webapps, and I got: CATALINA_BASE: /var/tomcat and CATALINA_HOME: /opt/tomcat5 Thanks ! Guillaume de Vinzelles DSI/PFS Neuf Cegetel Altran Technologies [EMAIL PROTECTED] 01 70 18 21 64 -Message d'origine- De : Michael Courcy [mailto:[EMAIL PROTECTED] Envoyé : jeudi 19 octobre 2006 14:51 À : Tomcat Users List Objet : Re: Tomcat, Apache and mod_jk configuration Hello Here is a fragment of my server.xml Host name=www.verlina.com appBase= unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Aliasverlina.com/Alias Aliastique-et-puce.fr/Alias Aliaswww.tique-et-puce.fr/Alias Aliasshampooing-chien.fr/Alias Aliaswww.shampooing-chien.fr/Alias Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=verlina.com_access_log. suffix=.txt pattern=common resolveHosts=false/ Valve className=org.apache.catalina.valves.FastCommonAccessLogValve directory=logs prefix=verlina.com_access_log. suffix=.txt pattern=common resolveHosts=false/ Context path= docBase=/home/verlina/www/ debug=0 Resource name=jdbc/verlina auth=Container type
Tomcat, Apache and mod_jk configuration
Hi there, Here is my problem. I got a working Tomcat 5.5.20 handling 4 webapps in /var/tomcat/webapps. I got a working Apache 2, configured with several virtualhosts. I managed to connect the Apache to the Tomcat using an AJP13 connector, and everything is working fine. Now, I'd like to map each one of my webapps to a different virtualhost. For instance, I'd like that my webapp example1, which is in /var/tomcat/webapps/example1, should be accessible through www.example1.com (and NOT www.example1.com/example1 - I've already that working). How do you achieve this using the jkMount directives? I've tried with jkMount /example1/* ajp13 and my webapp is accessible only through www.example1.com/example1. Thanks in advance for your answers! Guillaume de Vinzelles DSI/PFS Neuf Cegetel Altran Technologies [EMAIL PROTECTED] 01 70 18 21 64 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat, Apache and mod_jk configuration
Hello Here is a fragment of my server.xml Host name=www.verlina.com appBase= unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Aliasverlina.com/Alias Aliastique-et-puce.fr/Alias Aliaswww.tique-et-puce.fr/Alias Aliasshampooing-chien.fr/Alias Aliaswww.shampooing-chien.fr/Alias Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=verlina.com_access_log. suffix=.txt pattern=common resolveHosts=false/ Valve className=org.apache.catalina.valves.FastCommonAccessLogValve directory=logs prefix=verlina.com_access_log. suffix=.txt pattern=common resolveHosts=false/ Context path= docBase=/home/verlina/www/ debug=0 Resource name=jdbc/verlina auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true username=*** password= driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/verlina_com?autoReconnect=true/ /Context /Host And here is a fragment of my httpd.conf VirtualHost 87.98.218.193 ServerName www.verlina.com ServerAlias verlina.com ServerAlias tique-et-puce.fr ServerAlias www.tique-et-puce.fr ServerAlias shampooing-chien.fr ServerAlias www.shampooing-chien.fr JkMount /* ajp13 ServerAdmin [EMAIL PROTECTED] #DocumentRoot /home/verlina/www User verlina Group users CustomLog logs/verlina-access_log combined ScriptAlias /cgi-bin/ /home/verlina/cgi-bin/ /VirtualHost The idea is to put the JkMount inside the virtualHost of Apache. But discussing with Mr Caldarale, this layout is weak, even if it works. Because if you make any change to the context, you're forced to restart tomcat instead of just redeploying your context. There should be a way for your app to programatticly communicate to tomcat the list of domain the app should handle, but I don't know how to do that. Cheers. DE VINZELLES, Guillaume (ext.) a écrit : Hi there, Here is my problem. I got a working Tomcat 5.5.20 handling 4 webapps in /var/tomcat/webapps. I got a working Apache 2, configured with several virtualhosts. I managed to connect the Apache to the Tomcat using an AJP13 connector, and everything is working fine. Now, I'd like to map each one of my webapps to a different virtualhost. For instance, I'd like that my webapp example1, which is in /var/tomcat/webapps/example1, should be accessible through www.example1.com (and NOT www.example1.com/example1 - I've already that working). How do you achieve this using the jkMount directives? I've tried with jkMount /example1/* ajp13 and my webapp is accessible only through www.example1.com/example1. Thanks in advance for your answers! Guillaume de Vinzelles DSI/PFS Neuf Cegetel Altran Technologies [EMAIL PROTECTED] 01 70 18 21 64 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat, Apache and mod_jk configuration
In fact, I've already put the jkMount directive in the VirtualHost conf. It looks like: VirtualHost 88.191.24.6:80 DocumentRoot /var/www/preprod.skyce.net/htdocs Directory /var/www/preprod.skyce.net/htdocs Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all /Directory ServerName preprod.skyce.net ErrorLog /var/www/preprod.skyce.net/log/error_log CustomLog /var/www/preprod.skyce.net/log/access_log common jkMount /struts-dev-1/*.do ajp13 jkMount /struts-dev-1/*.jsp ajp13 /VirtualHost And I'd like to have my webapp accessible through http://preprod.skyce.net/ instead of http://preprod.skyce.net/struts-dev-1/. The pertinent fragment of my server.xml is: Host name=preprod.skyce.net appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false My webapps are located in /var/tomcat/webapps, and I got: CATALINA_BASE: /var/tomcat and CATALINA_HOME: /opt/tomcat5 Thanks ! Guillaume de Vinzelles DSI/PFS Neuf Cegetel Altran Technologies [EMAIL PROTECTED] 01 70 18 21 64 -Message d'origine- De : Michael Courcy [mailto:[EMAIL PROTECTED] Envoyé : jeudi 19 octobre 2006 14:51 À : Tomcat Users List Objet : Re: Tomcat, Apache and mod_jk configuration Hello Here is a fragment of my server.xml Host name=www.verlina.com appBase= unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Aliasverlina.com/Alias Aliastique-et-puce.fr/Alias Aliaswww.tique-et-puce.fr/Alias Aliasshampooing-chien.fr/Alias Aliaswww.shampooing-chien.fr/Alias Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=verlina.com_access_log. suffix=.txt pattern=common resolveHosts=false/ Valve className=org.apache.catalina.valves.FastCommonAccessLogValve directory=logs prefix=verlina.com_access_log. suffix=.txt pattern=common resolveHosts=false/ Context path= docBase=/home/verlina/www/ debug=0 Resource name=jdbc/verlina auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true username=*** password= driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/verlina_com?autoReconnect=true/ /Context /Host And here is a fragment of my httpd.conf VirtualHost 87.98.218.193 ServerName www.verlina.com ServerAlias verlina.com ServerAlias tique-et-puce.fr ServerAlias www.tique-et-puce.fr ServerAlias shampooing-chien.fr ServerAlias www.shampooing-chien.fr JkMount /* ajp13 ServerAdmin [EMAIL PROTECTED] #DocumentRoot /home/verlina/www User verlina Group users CustomLog logs/verlina-access_log combined ScriptAlias /cgi-bin/ /home/verlina/cgi-bin/ /VirtualHost The idea is to put the JkMount inside the virtualHost of Apache. But discussing with Mr Caldarale, this layout is weak, even if it works. Because if you make any change to the context, you're forced to restart tomcat instead of just redeploying your context. There should be a way for your app to programatticly communicate to tomcat the list of domain the app should handle, but I don't know how to do that. Cheers. DE VINZELLES, Guillaume (ext.) a écrit : Hi there, Here is my problem. I got a working Tomcat 5.5.20 handling 4 webapps in /var/tomcat/webapps. I got a working Apache 2, configured with several virtualhosts. I managed to connect the Apache to the Tomcat using an AJP13 connector, and everything is working fine. Now, I'd like to map each one of my webapps to a different virtualhost. For instance, I'd like that my webapp example1, which is in /var/tomcat/webapps/example1, should be accessible through www.example1.com (and NOT www.example1.com/example1 - I've already that working). How do you achieve this using the jkMount directives? I've tried with jkMount /example1/* ajp13 and my webapp is accessible only through www.example1.com/example1. Thanks in advance for your answers! Guillaume de Vinzelles DSI/PFS Neuf Cegetel Altran Technologies [EMAIL PROTECTED] 01 70 18 21 64 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users
Re: Tomcat, Apache and mod_jk configuration
Yes it's what I mean, in your JkMount declaration change jkMount /struts-dev-1/*.do ajp13 jkMount /struts-dev-1/*.jsp ajp13 By jkMount /*.do ajp13 jkMount /*.jsp ajp13 And your server.xml fragment should look this way Host name=preprod.skyce.net appBase= unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=/var/tomcat/webapps/struts-dev-1/ debug=0 / /Host It should works. DE VINZELLES, Guillaume (ext.) a écrit : In fact, I've already put the jkMount directive in the VirtualHost conf. It looks like: VirtualHost 88.191.24.6:80 DocumentRoot /var/www/preprod.skyce.net/htdocs Directory /var/www/preprod.skyce.net/htdocs Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all /Directory ServerName preprod.skyce.net ErrorLog /var/www/preprod.skyce.net/log/error_log CustomLog /var/www/preprod.skyce.net/log/access_log common jkMount /struts-dev-1/*.do ajp13 jkMount /struts-dev-1/*.jsp ajp13 /VirtualHost And I'd like to have my webapp accessible through http://preprod.skyce.net/ instead of http://preprod.skyce.net/struts-dev-1/. The pertinent fragment of my server.xml is: Host name=preprod.skyce.net appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false My webapps are located in /var/tomcat/webapps, and I got: CATALINA_BASE: /var/tomcat and CATALINA_HOME: /opt/tomcat5 Thanks ! Guillaume de Vinzelles DSI/PFS Neuf Cegetel Altran Technologies [EMAIL PROTECTED] 01 70 18 21 64 -Message d'origine- De : Michael Courcy [mailto:[EMAIL PROTECTED] Envoyé : jeudi 19 octobre 2006 14:51 À : Tomcat Users List Objet : Re: Tomcat, Apache and mod_jk configuration Hello Here is a fragment of my server.xml Host name=www.verlina.com appBase= unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Aliasverlina.com/Alias Aliastique-et-puce.fr/Alias Aliaswww.tique-et-puce.fr/Alias Aliasshampooing-chien.fr/Alias Aliaswww.shampooing-chien.fr/Alias Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=verlina.com_access_log. suffix=.txt pattern=common resolveHosts=false/ Valve className=org.apache.catalina.valves.FastCommonAccessLogValve directory=logs prefix=verlina.com_access_log. suffix=.txt pattern=common resolveHosts=false/ Context path= docBase=/home/verlina/www/ debug=0 Resource name=jdbc/verlina auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true username=*** password= driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/verlina_com?autoReconnect=true/ /Context /Host And here is a fragment of my httpd.conf VirtualHost 87.98.218.193 ServerName www.verlina.com ServerAlias verlina.com ServerAlias tique-et-puce.fr ServerAlias www.tique-et-puce.fr ServerAlias shampooing-chien.fr ServerAlias www.shampooing-chien.fr JkMount /* ajp13 ServerAdmin [EMAIL PROTECTED] #DocumentRoot /home/verlina/www User verlina Group users CustomLog logs/verlina-access_log combined ScriptAlias /cgi-bin/ /home/verlina/cgi-bin/ /VirtualHost The idea is to put the JkMount inside the virtualHost of Apache. But discussing with Mr Caldarale, this layout is weak, even if it works. Because if you make any change to the context, you're forced to restart tomcat instead of just redeploying your context. There should be a way for your app to programatticly communicate to tomcat the list of domain the app should handle, but I don't know how to do that. Cheers. DE VINZELLES, Guillaume (ext.) a écrit : Hi there, Here is my problem. I got a working Tomcat 5.5.20 handling 4 webapps in /var/tomcat/webapps. I got a working Apache 2, configured with several virtualhosts. I managed to connect the Apache to the Tomcat using an AJP13 connector, and everything is working fine. Now, I'd like to map each one of my webapps to a different virtualhost. For instance, I'd like that my webapp example1, which is in /var/tomcat/webapps/example1, should be accessible through www.example1.com (and NOT www.example1.com/example1 - I've already that working). How do you achieve this using the jkMount directives? I've tried with jkMount /example1/* ajp13 and my webapp is accessible only through www.example1.com/example1. Thanks in advance for your answers! Guillaume de Vinzelles DSI/PFS Neuf Cegetel Altran Technologies [EMAIL PROTECTED] 01 70 18 21 64
Re: Tomcat, Apache and mod_jk configuration
Guillaume, In fact, I've already put the jkMount directive in the VirtualHost conf. [snip] And I'd like to have my webapp accessible through http://preprod.skyce.net/ instead of http://preprod.skyce.net/struts-dev-1/. It looks like what to have more than one webapp as the root webapp. My suggestion would be to run each webapp in a different instance of Tomcat. It's much easier than you think is it to do this. I use Tomcat 4.1.x, but I'm sure the same is possible with very few changes on 5.5.x: 1. Create a directory structure for each webapp (outside of Tomcat's installation directory) like this: struts-dev-1/ struts-dev-1/conf struts-dev-1/conf/server.xml struts-dev-1/conf/web.xml struts-dev-1/webapps struts-dev-1/logs struts-dev-1/temp ** Make sure to set your port numbers for your shutdown and connector ports to something unique among your webapps. I usually use 8x85 for the ajp13 connector port and 8x86 for the shutdown port. 2. Install your webapp to the directory struts-dev-1/webapps/struts-dev-1 3. Configure Tomcat to use struts-dev-1 as your root webapp (usually by specifying that the path is instead of /struts-dev-1). 4. Start each Tomcat instance like this: $ export JAVA_HOME=... $ export CATALINA_HOME=/path/to/full/tomcat/install $ export CATALINA_BASE=/path/to/struts-dev-1 $ export CATALINA_TMPDIR=/path/th/struts-dev-1/temp $ /path/to/full/tomcat/install/bin/startup.sh This setup allows you to have separate root webapps (or any other kind of setup). You also have the benefit (I choose to see it as a benefit) of separate JVMs and Tomcat instances. You can take one down without bothering the others. Hope that helps, -chris signature.asc Description: OpenPGP digital signature
RE: Tomcat, Apache and mod_jk configuration
Michael and Chris, thanks a lot for your valuable help. I'm going to try this ASAP. The multi instance Tomcat seems really interesting. Thanks again! Regards Guillaume de Vinzelles DSI/PFS Neuf Cegetel Altran Technologies [EMAIL PROTECTED] 01 70 18 21 64 -Message d'origine- De : Christopher Schultz [mailto:[EMAIL PROTECTED] Envoyé : jeudi 19 octobre 2006 15:39 À : Tomcat Users List Objet : Re: Tomcat, Apache and mod_jk configuration Guillaume, In fact, I've already put the jkMount directive in the VirtualHost conf. [snip] And I'd like to have my webapp accessible through http://preprod.skyce.net/ instead of http://preprod.skyce.net/struts-dev-1/. It looks like what to have more than one webapp as the root webapp. My suggestion would be to run each webapp in a different instance of Tomcat. It's much easier than you think is it to do this. I use Tomcat 4.1.x, but I'm sure the same is possible with very few changes on 5.5.x: 1. Create a directory structure for each webapp (outside of Tomcat's installation directory) like this: struts-dev-1/ struts-dev-1/conf struts-dev-1/conf/server.xml struts-dev-1/conf/web.xml struts-dev-1/webapps struts-dev-1/logs struts-dev-1/temp ** Make sure to set your port numbers for your shutdown and connector ports to something unique among your webapps. I usually use 8x85 for the ajp13 connector port and 8x86 for the shutdown port. 2. Install your webapp to the directory struts-dev-1/webapps/struts-dev-1 3. Configure Tomcat to use struts-dev-1 as your root webapp (usually by specifying that the path is instead of /struts-dev-1). 4. Start each Tomcat instance like this: $ export JAVA_HOME=... $ export CATALINA_HOME=/path/to/full/tomcat/install $ export CATALINA_BASE=/path/to/struts-dev-1 $ export CATALINA_TMPDIR=/path/th/struts-dev-1/temp $ /path/to/full/tomcat/install/bin/startup.sh This setup allows you to have separate root webapps (or any other kind of setup). You also have the benefit (I choose to see it as a benefit) of separate JVMs and Tomcat instances. You can take one down without bothering the others. Hope that helps, -chris - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat, Apache and mod_jk configuration
Yes it's what I mean, in your JkMount declaration change jkMount /struts-dev-1/*.do ajp13 jkMount /struts-dev-1/*.jsp ajp13 By jkMount /*.do ajp13 jkMount /*.jsp ajp13 And your server.xml fragment should look this way Host name=preprod.skyce.net appBase= unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=/var/tomcat/webapps/struts-dev-1/ debug=0 / /Host It should works. DE VINZELLES, Guillaume (ext.) a écrit : In fact, I've already put the jkMount directive in the VirtualHost conf. It looks like: VirtualHost 88.191.24.6:80 DocumentRoot /var/www/preprod.skyce.net/htdocs Directory /var/www/preprod.skyce.net/htdocs Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all /Directory ServerName preprod.skyce.net ErrorLog /var/www/preprod.skyce.net/log/error_log CustomLog /var/www/preprod.skyce.net/log/access_log common jkMount /struts-dev-1/*.do ajp13 jkMount /struts-dev-1/*.jsp ajp13 /VirtualHost And I'd like to have my webapp accessible through http://preprod.skyce.net/ instead of http://preprod.skyce.net/struts-dev-1/. The pertinent fragment of my server.xml is: Host name=preprod.skyce.net appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false My webapps are located in /var/tomcat/webapps, and I got: CATALINA_BASE: /var/tomcat and CATALINA_HOME: /opt/tomcat5 Thanks ! Guillaume de Vinzelles DSI/PFS Neuf Cegetel Altran Technologies [EMAIL PROTECTED] 01 70 18 21 64 -Message d'origine- De : Michael Courcy [mailto:[EMAIL PROTECTED] Envoyé : jeudi 19 octobre 2006 14:51 À : Tomcat Users List Objet : Re: Tomcat, Apache and mod_jk configuration Hello Here is a fragment of my server.xml Host name=www.verlina.com appBase= unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Aliasverlina.com/Alias Aliastique-et-puce.fr/Alias Aliaswww.tique-et-puce.fr/Alias Aliasshampooing-chien.fr/Alias Aliaswww.shampooing-chien.fr/Alias Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=verlina.com_access_log. suffix=.txt pattern=common resolveHosts=false/ Valve className=org.apache.catalina.valves.FastCommonAccessLogValve directory=logs prefix=verlina.com_access_log. suffix=.txt pattern=common resolveHosts=false/ Context path= docBase=/home/verlina/www/ debug=0 Resource name=jdbc/verlina auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true username=*** password= driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/verlina_com?autoReconnect=true/ /Context /Host And here is a fragment of my httpd.conf VirtualHost 87.98.218.193 ServerName www.verlina.com ServerAlias verlina.com ServerAlias tique-et-puce.fr ServerAlias www.tique-et-puce.fr ServerAlias shampooing-chien.fr ServerAlias www.shampooing-chien.fr JkMount /* ajp13 ServerAdmin [EMAIL PROTECTED] #DocumentRoot /home/verlina/www User verlina Group users CustomLog logs/verlina-access_log combined ScriptAlias /cgi-bin/ /home/verlina/cgi-bin/ /VirtualHost The idea is to put the JkMount inside the virtualHost of Apache. But discussing with Mr Caldarale, this layout is weak, even if it works. Because if you make any change to the context, you're forced to restart tomcat instead of just redeploying your context. There should be a way for your app to programatticly communicate to tomcat the list of domain the app should handle, but I don't know how to do that. Cheers. DE VINZELLES, Guillaume (ext.) a écrit : Hi there, Here is my problem. I got a working Tomcat 5.5.20 handling 4 webapps in /var/tomcat/webapps. I got a working Apache 2, configured with several virtualhosts. I managed to connect the Apache to the Tomcat using an AJP13 connector, and everything is working fine. Now, I'd like to map each one of my webapps to a different virtualhost. For instance, I'd like that my webapp example1, which is in /var/tomcat/webapps/example1, should be accessible through www.example1.com (and NOT www.example1.com/example1 - I've already that working). How do you achieve this using the jkMount directives? I've tried with jkMount /example1/* ajp13 and my webapp is accessible only through www.example1.com/example1. Thanks in advance for your answers! Guillaume de Vinzelles DSI/PFS Neuf Cegetel Altran Technologies [EMAIL PROTECTED] 01 70 18 21 64
Re: Tomcat, Apache and mod_jk configuration
Yes it looks much more powerful than my solution. Especially if you want to guarantee a minimum JVM heap size for each app. Thanks a lot. JVM It looks like what to have more than one webapp as the root webapp. My suggestion would be to run each webapp in a different instance of Tomcat. It's much easier than you think is it to do this. I use Tomcat 4.1.x, but I'm sure the same is possible with very few changes on 5.5.x: 1. Create a directory structure for each webapp (outside of Tomcat's installation directory) like this: struts-dev-1/ struts-dev-1/conf struts-dev-1/conf/server.xml struts-dev-1/conf/web.xml struts-dev-1/webapps struts-dev-1/logs struts-dev-1/temp ** Make sure to set your port numbers for your shutdown and connector ports to something unique among your webapps. I usually use 8x85 for the ajp13 connector port and 8x86 for the shutdown port. 2. Install your webapp to the directory struts-dev-1/webapps/struts-dev-1 3. Configure Tomcat to use struts-dev-1 as your root webapp (usually by specifying that the path is instead of /struts-dev-1). 4. Start each Tomcat instance like this: $ export JAVA_HOME=... $ export CATALINA_HOME=/path/to/full/tomcat/install $ export CATALINA_BASE=/path/to/struts-dev-1 $ export CATALINA_TMPDIR=/path/th/struts-dev-1/temp $ /path/to/full/tomcat/install/bin/startup.sh This setup allows you to have separate root webapps (or any other kind of setup). You also have the benefit (I choose to see it as a benefit) of separate JVMs and Tomcat instances. You can take one down without bothering the others. Hope that helps, -chris
ANSWER: mod_jk configuration directives in VirtualHost sections
I've sorted my problem out. It appears that at least for Apache 1.3.x, you cannot have the JkWorkersFile directive in a VirtualHost section; it has to be in the main server section. If it isn't, then mod_jk doesn't seem to be able to find the worker in the workers map. Other directives - e.g. JkLogFile etc - can be invoked per VirtualHost. Maybe this could be documented in the future... Jon -Original Message- From: Jonathan Woods [mailto:[EMAIL PROTECTED] Sent: 26 January 2006 22:11 To: 'Tomcat Users List' Subject: RE: mod_jk configuration directives in VirtualHost sections Dan - Thanks very much for all this - looks like it should work with mod_jk too! I'll let you know how I get on. Jon -Original Message- From: Didier McGillis [mailto:[EMAIL PROTECTED] Sent: 26 January 2006 19:32 To: users@tomcat.apache.org Subject: RE: mod_jk configuration directives in VirtualHost sections I did mod_jk2 with Virtual Host, and while its not the same I think that doing VH will not be a problem once you get an idea of how it should/can be setup. THIS IS PSEUDO, DO NOT TAKE AS GOSPEL TRUTH !!! NO SUPPORT! :p -- workers.properties file -- # Setting Tomcat Java Home workers.tomcat_home=/usr/local/tomcat55 workers.java_home=/usr/local/java ps=/ worker.list=host1 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 ps=/ worker.list=host2 worker.ajp13.port=9009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 ps=/ worker.list=host3 worker.ajp13.port=10009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 -- workers.properties file -- -- httpd.conf file -- VirtualHost _default_:80 ServerName host1:8009 DocumentRoot /usr/local/tomcat55/webapps/host1 DirectoryIndex index.html index.jsp ... IfModule !mod_jk.c LoadModule jk_module /usr/lib64/httpd/modules/mod_jk.so JkWorkersFile /usr/local/tomcat55/conf/jk/host1-workers.properties JkLogFile /usr/local/tomcat55/logs/host1-mod_jk.log JkLogLevel debug Alias / /usr/local/tomcat55/webapps/host1 Directory /usr/local/tomcat55/webapps/host1 Options Indexes +FollowSymLinks /Directory JkMount /* host1 /IfModule ... /VirtualHost VirtualHost _default_:80 ServerName host1:9009 DocumentRoot /usr/local/tomcat55/webapps/host2 DirectoryIndex index.html index.jsp ... IfModule !mod_jk.c LoadModule jk_module /usr/lib64/httpd/modules/mod_jk.so JkWorkersFile /usr/local/tomcat55/conf/jk/host2-workers.properties JkLogFile /usr/local/tomcat55/logs/host2-mod_jk.log JkLogLevel debug Alias / /usr/local/tomcat55/webapps/host2 Directory /usr/local/tomcat55/webapps/host2 Options Indexes +FollowSymLinks /Directory JkMount /* host2 /IfModule ... /VirtualHost -- httpd.conf file -- -- server.xml file -- Host name=host1 debug=0 appBase=webapps/host1 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false ... /Host -- server.xml file -- Try that and see how it works, again I did something similar with mod_jk2, I havent done this yet in mod_jk that is coming next. If you have different paths and arent putting the code in webapps, I currently have different paths for the different code, then the big change will be in the Server.xml where the appbase will need to be the full path to the code. Let me know if this works or if you did any tweeks. HTH Dan From: Jonathan Woods [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: users@tomcat.apache.org Subject: mod_jk configuration directives in VirtualHost sections Date: Wed, 25 Jan 2006 21:55:55 - Hello, list. I have Apache 1.3.33 running on Linux and talking successfully to Tomcat 5.5.15 through mod_jk. I'd now like to host multiple instances of Tomcat (or maybe just multiple Tomcat connectors within one instance) to receive requests dispatched at multiple VirtualHosts on the same server. Is it possible to have more than one workers.properties file, and therefore more than one JkWorkersFile directive, per Apache? Ideally, I'd like one workers.properties file per VirtualHost just to make app-building easier. The documentation says that certain directives may be repeated in VirtualHost sections - e.g. JkLogFile - but doesn't mention JkWorkersFile. Thanks in advance - Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
RE: mod_jk configuration directives in VirtualHost sections
I did mod_jk2 with Virtual Host, and while its not the same I think that doing VH will not be a problem once you get an idea of how it should/can be setup. THIS IS PSEUDO, DO NOT TAKE AS GOSPEL TRUTH !!! NO SUPPORT! :p -- workers.properties file -- # Setting Tomcat Java Home workers.tomcat_home=/usr/local/tomcat55 workers.java_home=/usr/local/java ps=/ worker.list=host1 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 ps=/ worker.list=host2 worker.ajp13.port=9009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 ps=/ worker.list=host3 worker.ajp13.port=10009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 -- workers.properties file -- -- httpd.conf file -- VirtualHost _default_:80 ServerName host1:8009 DocumentRoot /usr/local/tomcat55/webapps/host1 DirectoryIndex index.html index.jsp ... IfModule !mod_jk.c LoadModule jk_module /usr/lib64/httpd/modules/mod_jk.so JkWorkersFile /usr/local/tomcat55/conf/jk/host1-workers.properties JkLogFile /usr/local/tomcat55/logs/host1-mod_jk.log JkLogLevel debug Alias / /usr/local/tomcat55/webapps/host1 Directory /usr/local/tomcat55/webapps/host1 Options Indexes +FollowSymLinks /Directory JkMount /* host1 /IfModule ... /VirtualHost VirtualHost _default_:80 ServerName host1:9009 DocumentRoot /usr/local/tomcat55/webapps/host2 DirectoryIndex index.html index.jsp ... IfModule !mod_jk.c LoadModule jk_module /usr/lib64/httpd/modules/mod_jk.so JkWorkersFile /usr/local/tomcat55/conf/jk/host2-workers.properties JkLogFile /usr/local/tomcat55/logs/host2-mod_jk.log JkLogLevel debug Alias / /usr/local/tomcat55/webapps/host2 Directory /usr/local/tomcat55/webapps/host2 Options Indexes +FollowSymLinks /Directory JkMount /* host2 /IfModule ... /VirtualHost -- httpd.conf file -- -- server.xml file -- Host name=host1 debug=0 appBase=webapps/host1 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false ... /Host -- server.xml file -- Try that and see how it works, again I did something similar with mod_jk2, I havent done this yet in mod_jk that is coming next. If you have different paths and arent putting the code in webapps, I currently have different paths for the different code, then the big change will be in the Server.xml where the appbase will need to be the full path to the code. Let me know if this works or if you did any tweeks. HTH Dan From: Jonathan Woods [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: users@tomcat.apache.org Subject: mod_jk configuration directives in VirtualHost sections Date: Wed, 25 Jan 2006 21:55:55 - Hello, list. I have Apache 1.3.33 running on Linux and talking successfully to Tomcat 5.5.15 through mod_jk. I'd now like to host multiple instances of Tomcat (or maybe just multiple Tomcat connectors within one instance) to receive requests dispatched at multiple VirtualHosts on the same server. Is it possible to have more than one workers.properties file, and therefore more than one JkWorkersFile directive, per Apache? Ideally, I'd like one workers.properties file per VirtualHost just to make app-building easier. The documentation says that certain directives may be repeated in VirtualHost sections - e.g. JkLogFile - but doesn't mention JkWorkersFile. Thanks in advance - Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk configuration directives in VirtualHost sections
Dan - Thanks very much for all this - looks like it should work with mod_jk too! I'll let you know how I get on. Jon -Original Message- From: Didier McGillis [mailto:[EMAIL PROTECTED] Sent: 26 January 2006 19:32 To: users@tomcat.apache.org Subject: RE: mod_jk configuration directives in VirtualHost sections I did mod_jk2 with Virtual Host, and while its not the same I think that doing VH will not be a problem once you get an idea of how it should/can be setup. THIS IS PSEUDO, DO NOT TAKE AS GOSPEL TRUTH !!! NO SUPPORT! :p -- workers.properties file -- # Setting Tomcat Java Home workers.tomcat_home=/usr/local/tomcat55 workers.java_home=/usr/local/java ps=/ worker.list=host1 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 ps=/ worker.list=host2 worker.ajp13.port=9009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 ps=/ worker.list=host3 worker.ajp13.port=10009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 -- workers.properties file -- -- httpd.conf file -- VirtualHost _default_:80 ServerName host1:8009 DocumentRoot /usr/local/tomcat55/webapps/host1 DirectoryIndex index.html index.jsp ... IfModule !mod_jk.c LoadModule jk_module /usr/lib64/httpd/modules/mod_jk.so JkWorkersFile /usr/local/tomcat55/conf/jk/host1-workers.properties JkLogFile /usr/local/tomcat55/logs/host1-mod_jk.log JkLogLevel debug Alias / /usr/local/tomcat55/webapps/host1 Directory /usr/local/tomcat55/webapps/host1 Options Indexes +FollowSymLinks /Directory JkMount /* host1 /IfModule ... /VirtualHost VirtualHost _default_:80 ServerName host1:9009 DocumentRoot /usr/local/tomcat55/webapps/host2 DirectoryIndex index.html index.jsp ... IfModule !mod_jk.c LoadModule jk_module /usr/lib64/httpd/modules/mod_jk.so JkWorkersFile /usr/local/tomcat55/conf/jk/host2-workers.properties JkLogFile /usr/local/tomcat55/logs/host2-mod_jk.log JkLogLevel debug Alias / /usr/local/tomcat55/webapps/host2 Directory /usr/local/tomcat55/webapps/host2 Options Indexes +FollowSymLinks /Directory JkMount /* host2 /IfModule ... /VirtualHost -- httpd.conf file -- -- server.xml file -- Host name=host1 debug=0 appBase=webapps/host1 unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false ... /Host -- server.xml file -- Try that and see how it works, again I did something similar with mod_jk2, I havent done this yet in mod_jk that is coming next. If you have different paths and arent putting the code in webapps, I currently have different paths for the different code, then the big change will be in the Server.xml where the appbase will need to be the full path to the code. Let me know if this works or if you did any tweeks. HTH Dan From: Jonathan Woods [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: users@tomcat.apache.org Subject: mod_jk configuration directives in VirtualHost sections Date: Wed, 25 Jan 2006 21:55:55 - Hello, list. I have Apache 1.3.33 running on Linux and talking successfully to Tomcat 5.5.15 through mod_jk. I'd now like to host multiple instances of Tomcat (or maybe just multiple Tomcat connectors within one instance) to receive requests dispatched at multiple VirtualHosts on the same server. Is it possible to have more than one workers.properties file, and therefore more than one JkWorkersFile directive, per Apache? Ideally, I'd like one workers.properties file per VirtualHost just to make app-building easier. The documentation says that certain directives may be repeated in VirtualHost sections - e.g. JkLogFile - but doesn't mention JkWorkersFile. Thanks in advance - Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk configuration directives in VirtualHost sections
Hello, list. I have Apache 1.3.33 running on Linux and talking successfully to Tomcat 5.5.15 through mod_jk. I'd now like to host multiple instances of Tomcat (or maybe just multiple Tomcat connectors within one instance) to receive requests dispatched at multiple VirtualHosts on the same server. Is it possible to have more than one workers.properties file, and therefore more than one JkWorkersFile directive, per Apache? Ideally, I'd like one workers.properties file per VirtualHost just to make app-building easier. The documentation says that certain directives may be repeated in VirtualHost sections - e.g. JkLogFile - but doesn't mention JkWorkersFile. Thanks in advance - Jon