Re: apache -- tomcat (mod_jk) works on localhost but not other hosts
On Mon, 10 Oct 2005 09:01:04 -0700 (PDT) tomcat-user@jakarta.apache.org wrote: I'm very new to tomcat and apache. I've set up apache to forward to tomcat using mod_jk. It works fine on the localhost, but if I try to connect through to tomcat from any other host I get 404 file not found, Please send us your workers.properties and httpd.conf. -- Lyndon Tiu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: apache -- tomcat (mod_jk) works on localhost but not other hosts
--- Lyndon Tiu [EMAIL PROTECTED] wrote: On Mon, 10 Oct 2005 09:01:04 -0700 (PDT) tomcat-user@jakarta.apache.org wrote: I'm very new to tomcat and apache. I've set up apache to forward to tomcat using mod_jk. It works fine on the localhost, but if I try to connect through to tomcat from any other host I get 404 file not found, Please send us your workers.properties and httpd.conf. attached, tia, scott __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: apache -- tomcat (mod_jk) works on localhost but not other hosts
Thanks for the tip Lyndon. It took a few tries, but I finally got it right, I think! __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Apache + Tomcat + Mod_JK + SSL How to?
Hi, I've been following this thread for a bit and can offer some of my painfully gained insights. I have Apache, tomcat 5.0.28, mod_jk and SSL. This is not a real fix, just my workarounds. It drove me nuts forever until I figured out that Apache webserver does not successful apply rewrite rules to the JkMount directive. In my httpd.conf: #tomcat worker JkWorkersFile conf/workers.properties JkLogFile logs/jk.log JkLogLevel info JkMount /*.jsp jkworker Under my virtual host port 80 I tested a few rewrite rules(the first was to the 'admin' directory, the second was for all requests): RewriteRule ^/admin/(.*)$ https://server.name.com/$1 [R] RewriteRule ^.*$ https://server.name.com%{REQUEST_URI} [R] The rewrite would work for non JkMount items, but the behavior seemed to show apache just handing off the transaction to tomcat via the mount BEFORE applying the rewrite. (please check this for yourself, if you use a rewrite rule to a non JkMount directory Apache should redirect it successfully) Tomcat would not bounce it to port 443 because the rewrite rule was not in the tomcat layer. Our java programer ended up writing a custom jsp that redirected the transaction to a SSL port. I then made the redirect directory forbidden under non-SSL. I suspect there maybe a more graceful way to do this please let me know if you find it. -Kiarna
Re: Apache + Tomcat + Mod_JK + SSL How to?
Well, maybe I've just make a mistake somewhere. I looked at my jsp-examples/ url work with ssl and without in mod_jk. Where should I look to see why this one works but my app doesn't? Stanczak Group wrote: I know this has been asked, but the all the emails and on-line docs don't seem to make sense to me. What I have is this. Apache, Tomcat, Mod_JK all running and working on my server. The SSL on Apache is working as well. All I want to do is have certain urls use SSL on Apache. So when you go to /site it's non-ssl, which works now, but when you access /admin it redirects to SSL, this is not working now. How do I get this working? -- Justin Stanczak Stanczak Group 812-735-3600 All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke .....__. ./ _/....._/..|_..... /...\../.__.\./\...__\/.._.\./._..\ \\_\..\..___/|...|..\..|.(.._.|._..) .\__../\___.._\__|../__|..\/.\/.. \/.\/.\/.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat + Mod_JK + SSL How to?
Stanczak Group wrote: Well, maybe I've just make a mistake somewhere. I looked at my jsp-examples/ url work with ssl and without in mod_jk. Where should I look to see why this one works but my app doesn't? Stanczak Group wrote: I know this has been asked, but the all the emails and on-line docs don't seem to make sense to me. What I have is this. Apache, Tomcat, Mod_JK all running and working on my server. The SSL on Apache is working as well. All I want to do is have certain urls use SSL on Apache. So when you go to /site it's non-ssl, which works now, but when you access /admin it redirects to SSL, this is not working now. How do I get this working? Hi, Your question is a little bit unclear. If you need a redirection from http://site/admin/ to https://site/admin/ look at the mod_rewrite, or simply make a absolute link to https page. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat + Mod_JK + SSL How to?
I'm not familiar with mod_jk, but in Tomcat when using SSL I can put in a security constraint and it will redirect to a secure connection, so that's why I'm making it sound like a redirect. But the real issue is when I access the url for example http://www.myapp.com/thisapp it works, but when I add https://www.myapp.com/thisapp it fails saying The requested URL /MemCarQue/cars was not found on this server.. But the default jsp-examples/ url works with SSL and without. Once this works then I'll want to make it so the /thisapp/secure part works like Tomcat stand alone and redirects based on the security constraint in web.xml of the app. I'm guessing this can be done by setting the Tomcat to redirect to SSL port. Mladen Turk wrote: Stanczak Group wrote: Well, maybe I've just make a mistake somewhere. I looked at my jsp-examples/ url work with ssl and without in mod_jk. Where should I look to see why this one works but my app doesn't? Stanczak Group wrote: I know this has been asked, but the all the emails and on-line docs don't seem to make sense to me. What I have is this. Apache, Tomcat, Mod_JK all running and working on my server. The SSL on Apache is working as well. All I want to do is have certain urls use SSL on Apache. So when you go to /site it's non-ssl, which works now, but when you access /admin it redirects to SSL, this is not working now. How do I get this working? Hi, Your question is a little bit unclear. If you need a redirection from http://site/admin/ to https://site/admin/ look at the mod_rewrite, or simply make a absolute link to https page. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Justin Stanczak Stanczak Group 812-735-3600 All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke .....__. ./ _/....._/..|_..... /...\../.__.\./\...__\/.._.\./._..\ \\_\..\..___/|...|..\..|.(.._.|._..) .\__../\___.._\__|../__|..\/.\/.. \/.\/.\/.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat + Mod_JK + SSL How to?
Stanczak Group wrote: I'm not familiar with mod_jk, but in Tomcat when using SSL I can put in a security constraint and it will redirect to a secure connection, so that's why I'm making it sound like a redirect. Hmm. You are still unclear. Seems to me that you are saying that you can access your application with http via mod_jk but not via https, and you can access jsp-examples both with http and https? Is this correct? Also, adjust your clock. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat + Mod_JK + SSL How to?
Mladen Turk wrote: Stanczak Group wrote: I'm not familiar with mod_jk, but in Tomcat when using SSL I can put in a security constraint and it will redirect to a secure connection, so that's why I'm making it sound like a redirect. Hmm. You are still unclear. Seems to me that you are saying that you can access your application with http via mod_jk but not via https, and you can access jsp-examples both with http and https? Is this correct? yes that is correct. Also, adjust your clock. ? What do you mean? Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Justin Stanczak Stanczak Group 812-735-3600 All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke .....__. ./ _/....._/..|_..... /...\../.__.\./\...__\/.._.\./._..\ \\_\..\..___/|...|..\..|.(.._.|._..) .\__../\___.._\__|../__|..\/.\/.. \/.\/.\/.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat + Mod_JK + SSL How to?
test time Stanczak Group wrote: Mladen Turk wrote: Stanczak Group wrote: I'm not familiar with mod_jk, but in Tomcat when using SSL I can put in a security constraint and it will redirect to a secure connection, so that's why I'm making it sound like a redirect. Hmm. You are still unclear. Seems to me that you are saying that you can access your application with http via mod_jk but not via https, and you can access jsp-examples both with http and https? Is this correct? yes that is correct. Also, adjust your clock. ? What do you mean? Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Justin Stanczak Stanczak Group 812-735-3600 All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke .....__. ./ _/....._/..|_..... /...\../.__.\./\...__\/.._.\./._..\ \\_\..\..___/|...|..\..|.(.._.|._..) .\__../\___.._\__|../__|..\/.\/.. \/.\/.\/.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat + Mod_JK + SSL How to?
Mladen Turk wrote: Stanczak Group wrote: I'm not familiar with mod_jk, but in Tomcat when using SSL I can put in a security constraint and it will redirect to a secure connection, so that's why I'm making it sound like a redirect. Hmm. You are still unclear. Seems to me that you are saying that you can access your application with http via mod_jk but not via https, and you can access jsp-examples both with http and https? Is this correct? Also, adjust your clock. That fix it? I didn't even see it was off. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Justin Stanczak Stanczak Group 812-735-3600 All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke .....__. ./ _/....._/..|_..... /...\../.__.\./\...__\/.._.\./._..\ \\_\..\..___/|...|..\..|.(.._.|._..) .\__../\___.._\__|../__|..\/.\/.. \/.\/.\/.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat + Mod_JK + SSL How to? Got it.
It was something simple. I didn't have to mod_jk directive setup on the virtual host with ssl. Stanczak Group wrote: Mladen Turk wrote: Stanczak Group wrote: I'm not familiar with mod_jk, but in Tomcat when using SSL I can put in a security constraint and it will redirect to a secure connection, so that's why I'm making it sound like a redirect. Hmm. You are still unclear. Seems to me that you are saying that you can access your application with http via mod_jk but not via https, and you can access jsp-examples both with http and https? Is this correct? Also, adjust your clock. That fix it? I didn't even see it was off. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Justin Stanczak Stanczak Group 812-735-3600 All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke .....__. ./ _/....._/..|_..... /...\../.__.\./\...__\/.._.\./._..\ \\_\..\..___/|...|..\..|.(.._.|._..) .\__../\___.._\__|../__|..\/.\/.. \/.\/.\/.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: apache-tomcat-mod_jk-ssl
I have Tomcat 5.5.9 and Apache 2.0.54 running on Windows 2000, connecting them with mod_jk (not jk2). The only thing I want to do now is have Apache run Tomcat in-process like I did with jk2, is this possible? And if it is, what files do I need to update and configure? Thanks. Tom faisal wrote: hi guyz i ve just configured to use my tomcat 5.5.x running on win2k machine with apache web server 2.0.49 running on fedora core 2 machine. my application are running perfectly well. infact i m noticing a certain level of increase in performance. however, i get into troubles as soon as i take my login page to SSL. i get the error The connection was refused when attempting to contact myserver:8443. i will appreciate any help or any pointer to any thread. P.S. i did try to search through those hundreds of threads. Thanx in advance - 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: apache tomcat mod_jk index.jsp
On Tue, Apr 13, 2004 at 01:05:20PM -0400, James Kessler wrote: Hello, I'm having trouble loading index.jsp from the root directory. If i browse to www.foo.com/test/ everything works. If I browse to www.foo.com (which points to the same directory) it shows the jsp tags. I'm running apache 1.3, tomcat 4.1 and mod_jk 1.2 using ApacheConfig to auto-create mod_jk.conf. I can't see anything wrong with the fragments of the httpd.conf you posted, but post all of it and the contents of this file: Include /usr/local/tomcat/conf/auto/mod_jk.conf G -- One of my most productive days was throwing away 1000 lines of code. -- Ken Thompson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache+Tomcat + MOD_JK on different machine
Hi Randall, I WOULD LIKE TO THANK YOU. My Apache and Tomcat on different machine are working great now. THANK YOU AGAIN for your time and input. The problem was that in my SERVER.XML File I was referring to LOCALHOST instaed of having of actual HOSTNAME. THANKS AGAIN! HARI OM From: Randall Svancara [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Wed, 24 Mar 2004 15:26:09 -0700 From what I can see, it should work. So you can browse http://someserver:8080/examples on the server where Tomcat is installed, right? Also, there just to be on the safe side, your network allows communication from one machine to another on port 8009. Try using telnet to access the server running tomcat from a seperate computer to see if the port is even accessible. Or if you have nmap, scan the tomcat box to see what ports are open or accessible. I performed a similar setup on a couple of test servers and it worked. One machine was running apache on linux and the other was running tomcat on windows. I am running out of things to tell ya. Anyone else want to take a stab at this??? Of course looking at your logs more closely, these lines here would assume that you are connecting the examples context?? [jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (477)]: Attempting to map URI '/examples' [jk_uri_worker_map.c (491)]: jk_uri_worker_map_t::map_uri_to_worker, Found an exact match ajp13 - /examples Randall -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 3:15 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine NO...I am still strugllingwonder why. Please check the logs 3 files ERROR_LOG [Tue Mar 23 15:50:39 2004] [notice] Apache/2.0.47 (Unix) mod_jk/1.2.2 configured -- resuming normal operations - ACCESS_LOG - [23/Mar/2004:15:51:33 -0700] GET / HTTP/1.1 200 1456 [23/Mar/2004:15:51:40 -0700] GET /examples HTTP/1.1 400 0 --- MOD_JK.LOG --- [jk_uri_worker_map.c (172)]: Into jk_uri_worker_map_t::uri_worker_map_alloc [jk_uri_worker_map.c (375)]: Into jk_uri_worker_map_t::uri_worker_map_open [jk_uri_worker_map.c (396)]: jk_uri_worker_map_t::uri_worker_map_open, rule map size is 4 [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::uri_worker_map_open, exact rule /examples=ajp13 was added [jk_uri_worker_map.c (321)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /examples/=ajp13 was added [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::uri_worker_map_open, exact rule /abc=ajp13 was added [jk_uri_worker_map.c (321)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /abc/=ajp13 was added [jk_uri_worker_map.c (408)]: Into jk_uri_worker_map_t::uri_worker_map_open, there are 4 rules [jk_uri_worker_map.c (422)]: jk_uri_worker_map_t::uri_worker_map_open, done [jk_worker.c (88)]: Into wc_open [jk_worker.c (222)]: Into build_worker_map, creating 1 workers [jk_worker.c (228)]: build_worker_map, creating worker ajp13 [jk_worker.c (148)]: Into wc_create_worker [jk_worker.c (162)]: wc_create_worker, about to create instance ajp13 of ajp13 [jk_ajp13_worker.c (108)]: Into ajp13_worker_factory [jk_worker.c (171)]: wc_create_worker, about to validate and init ajp13 [jk_ajp_common.c (1219)]: Into jk_worker_t::validate [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker ajp13 contact is utahdiseasereport.utah.gov:8009 [jk_ajp_common.c (1267)]: Into jk_worker_t::init [jk_ajp_common.c (1287)]: In jk_worker_t::init, setting socket timeout to 0 [jk_worker.c (187)]: wc_create_worker, done [jk_worker.c (238)]: build_worker_map, removing old ajp13 worker [jk_worker.c (250)]: build_worker_map, done [jk_worker.c (111)]: wc_open, done 1 [jk_worker.c (118)]: Into wc_close [jk_worker.c (199)]: close_workers got 1 workers to destroy [jk_worker.c (206)]: close_workers will destroy worker ajp13 [jk_ajp_common.c (1324)]: Into jk_worker_t::destroy [jk_ajp_common.c (1331)]: Into jk_worker_t::destroy up to 1 endpoint to close [jk_worker.c (120)]: wc_close, done [jk_uri_worker_map.c (190)]: Into jk_uri_worker_map_t::uri_worker_map_free [jk_uri_worker_map.c (441)]: Into jk_uri_worker_map_t::uri_worker_map_close [jk_uri_worker_map.c (172)]: Into jk_uri_worker_map_t::uri_worker_map_alloc [jk_uri_worker_map.c (375)]: Into jk_uri_worker_map_t::uri_worker_map_open [jk_uri_worker_map.c (396)]: jk_uri_worker_map_t::uri_worker_map_open, rule map size is 4 [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::uri_worker_map_open, exact rule /examples=ajp13 was added [jk_uri_worker_map.c (321)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /examples/=ajp13 was added [jk_uri_worker_map.c (345
RE: Apache+Tomcat + MOD_JK on different machine
No problem. Good luck. -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 9:08 AM To: [EMAIL PROTECTED]; Randall Svancara Cc: [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Hi Randall, I WOULD LIKE TO THANK YOU. My Apache and Tomcat on different machine are working great now. THANK YOU AGAIN for your time and input. The problem was that in my SERVER.XML File I was referring to LOCALHOST instaed of having of actual HOSTNAME. THANKS AGAIN! HARI OM From: Randall Svancara [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Wed, 24 Mar 2004 15:26:09 -0700 From what I can see, it should work. So you can browse http://someserver:8080/examples on the server where Tomcat is installed, right? Also, there just to be on the safe side, your network allows communication from one machine to another on port 8009. Try using telnet to access the server running tomcat from a seperate computer to see if the port is even accessible. Or if you have nmap, scan the tomcat box to see what ports are open or accessible. I performed a similar setup on a couple of test servers and it worked. One machine was running apache on linux and the other was running tomcat on windows. I am running out of things to tell ya. Anyone else want to take a stab at this??? Of course looking at your logs more closely, these lines here would assume that you are connecting the examples context?? [jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (477)]: Attempting to map URI '/examples' [jk_uri_worker_map.c (491)]: jk_uri_worker_map_t::map_uri_to_worker, Found an exact match ajp13 - /examples Randall -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 3:15 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine NO...I am still strugllingwonder why. Please check the logs 3 files ERROR_LOG [Tue Mar 23 15:50:39 2004] [notice] Apache/2.0.47 (Unix) mod_jk/1.2.2 configured -- resuming normal operations - ACCESS_LOG - [23/Mar/2004:15:51:33 -0700] GET / HTTP/1.1 200 1456 [23/Mar/2004:15:51:40 -0700] GET /examples HTTP/1.1 400 0 --- MOD_JK.LOG --- [jk_uri_worker_map.c (172)]: Into jk_uri_worker_map_t::uri_worker_map_alloc [jk_uri_worker_map.c (375)]: Into jk_uri_worker_map_t::uri_worker_map_open [jk_uri_worker_map.c (396)]: jk_uri_worker_map_t::uri_worker_map_open, rule map size is 4 [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::uri_worker_map_open, exact rule /examples=ajp13 was added [jk_uri_worker_map.c (321)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /examples/=ajp13 was added [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::uri_worker_map_open, exact rule /abc=ajp13 was added [jk_uri_worker_map.c (321)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /abc/=ajp13 was added [jk_uri_worker_map.c (408)]: Into jk_uri_worker_map_t::uri_worker_map_open, there are 4 rules [jk_uri_worker_map.c (422)]: jk_uri_worker_map_t::uri_worker_map_open, done [jk_worker.c (88)]: Into wc_open [jk_worker.c (222)]: Into build_worker_map, creating 1 workers [jk_worker.c (228)]: build_worker_map, creating worker ajp13 [jk_worker.c (148)]: Into wc_create_worker [jk_worker.c (162)]: wc_create_worker, about to create instance ajp13 of ajp13 [jk_ajp13_worker.c (108)]: Into ajp13_worker_factory [jk_worker.c (171)]: wc_create_worker, about to validate and init ajp13 [jk_ajp_common.c (1219)]: Into jk_worker_t::validate [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker ajp13 contact is utahdiseasereport.utah.gov:8009 [jk_ajp_common.c (1267)]: Into jk_worker_t::init [jk_ajp_common.c (1287)]: In jk_worker_t::init, setting socket timeout to 0 [jk_worker.c (187)]: wc_create_worker, done [jk_worker.c (238)]: build_worker_map, removing old ajp13 worker [jk_worker.c (250)]: build_worker_map, done [jk_worker.c (111)]: wc_open, done 1 [jk_worker.c (118)]: Into wc_close [jk_worker.c (199)]: close_workers got 1 workers to destroy [jk_worker.c (206)]: close_workers will destroy worker ajp13 [jk_ajp_common.c (1324)]: Into jk_worker_t::destroy [jk_ajp_common.c (1331)]: Into jk_worker_t::destroy up to 1 endpoint to close [jk_worker.c (120)]: wc_close, done [jk_uri_worker_map.c (190)]: Into jk_uri_worker_map_t::uri_worker_map_free [jk_uri_worker_map.c (441)]: Into jk_uri_worker_map_t::uri_worker_map_close [jk_uri_worker_map.c (172)]: Into jk_uri_worker_map_t::uri_worker_map_alloc [jk_uri_worker_map.c (375)]: Into jk_uri_worker_map_t::uri_worker_map_open [jk_uri_worker_map.c (396)]: jk_uri_worker_map_t::uri_worker_map_open, rule map size is 4
RE: Apache+Tomcat + MOD_JK on different machine
Thanks again Randall and Henry for your reply... appreciate that! When I try http://my_web_server/abc, it shows HTTP 400-Bad Request BUT when I try http://my_web_server/pqr, it shows HTTP 404 - File Not Found BUT when I try http://my_web_server, it works fine...which means that APACHE IS NOT SENDING THE REQUEST to TOMCATwonder why. I've added workers.properties in my conf directory on Web Server. I also have MOD_JK.CONF file there. WORKERS.PROPERTIES worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=102.103.103.1 #the above is IP of my App Server worker.ajp13.type=ajp13 mod_jk.conf Include conf/mod_jk.conf JkWorkersFile conf/workers.properties Include conf/mod_jk.conf JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 HTTPD.CONF JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 From: Randall Svancara [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 09:21:36 -0700 Your workers.properties should be on your webserver where apache is located. I typically place the workers.properties in the same directory where httpd.conf is located. workers.properties is needed for mod_jk so it makes sense that it needs to be in the same machine where mod_jk and apache are installed. At least far as I know anyways. Sometimes apache has a difficult time finding it. I have used this line to tell apache where to find the workers.properties. You might try including a line like this in your apache configuration file: IfModule mod_jk.c JkSet config.file /etc/apache2/conf/workers.properties Include /etc/apache2/conf/mod_jk2.conf /IfModule If anyone else has anything to add to this or correct me on, please feel free because I am still learning to, but then again who isn't?? I hope that helps. -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 8:56 AM To: [EMAIL PROTECTED] Cc: Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine Thanks Randall for your reply... appreciate that! My MOD_JK.CONF file is AUTOGENERATED on my AppServer. I start my App Server FIRST which AUTOGENERATES mod_jk.conf file. So, how can I reference this file on my HTTPD.CONF (Include conf/mod_jk.conf) - which is indeed located on a different machine? Where should I place my workers.properties? should it be on App Server or Web Server? Should I first start App Server or Web Server or it does'nt matter? In my HTTPD.CONF I have different mount points (example 'abc') so when I type http://IPADDRESS/abc it shows HTTP 400 Bad Request on my browser Howevere, when I type http://IPADDRESS/lmn it shows HTTP 404 Page Not Found (Note: lmn is not added a JKMount in my Httpd.conf) My MOD_JK.log file shows it added all the JKMounts. My ACCESS_LOG file shows: [23/Mar/2004:08:44:05 -0700] GET /abc HTTP/1.1 400 0 [23/Mar/2004:08:50:24 -0700] GET /lmn HTTP/1.1 404 301 My ERROR_LOG file shows: [Tue Mar 23 08:41:46 2004] [notice] Apache/2.0.47 (Unix) mod_jk/1.2.2 configured -- resuming normal operations Any related information on above is appreciated. THANKS again! HARI OM From: Randall Svancara [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 08:15:40 -0700 I would leave your httpd.conf file the same as you have it shown below. I would also confirm in you logs that everything is working ok. However, Apache should not even startup if the included configuration file, mod_jk.conf is not present. -- httpd.conf (on Web Server) -- LoadModule jk_module modules/mod_jk.so ServerName xyz.com Include conf/mod_jk.conf JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 The trick here is to make some changes to your workers.properties in order to connect to another box. It looks as if your are trying to configure a load balancer. If you are connecting to only one instance of tomcat this is not necessary. Also you need to look in your server.xml and see that you have the coyote connector running on port 8009. I would exclude the line: worker.ajp13.lbfactor=5 from this configuration. Besides, you have not defined a worker for load balancer, so i believe this line is not necessary. I would probably write your workers.properties files the following way: workers.properties (on Web Server
RE: Apache+Tomcat + MOD_JK on different machine
So, did you ever get this working then?? -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 7:52 AM To: [EMAIL PROTECTED]; Randall Svancara; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Thanks again Randall and Henry for your reply... appreciate that! When I try http://my_web_server/abc, it shows HTTP 400-Bad Request BUT when I try http://my_web_server/pqr, it shows HTTP 404 - File Not Found BUT when I try http://my_web_server, it works fine...which means that APACHE IS NOT SENDING THE REQUEST to TOMCATwonder why. I've added workers.properties in my conf directory on Web Server. I also have MOD_JK.CONF file there. WORKERS.PROPERTIES worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=102.103.103.1 #the above is IP of my App Server worker.ajp13.type=ajp13 mod_jk.conf Include conf/mod_jk.conf JkWorkersFile conf/workers.properties Include conf/mod_jk.conf JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 HTTPD.CONF JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 From: Randall Svancara [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 09:21:36 -0700 Your workers.properties should be on your webserver where apache is located. I typically place the workers.properties in the same directory where httpd.conf is located. workers.properties is needed for mod_jk so it makes sense that it needs to be in the same machine where mod_jk and apache are installed. At least far as I know anyways. Sometimes apache has a difficult time finding it. I have used this line to tell apache where to find the workers.properties. You might try including a line like this in your apache configuration file: IfModule mod_jk.c JkSet config.file /etc/apache2/conf/workers.properties Include /etc/apache2/conf/mod_jk2.conf /IfModule If anyone else has anything to add to this or correct me on, please feel free because I am still learning to, but then again who isn't?? I hope that helps. -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 8:56 AM To: [EMAIL PROTECTED] Cc: Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine Thanks Randall for your reply... appreciate that! My MOD_JK.CONF file is AUTOGENERATED on my AppServer. I start my App Server FIRST which AUTOGENERATES mod_jk.conf file. So, how can I reference this file on my HTTPD.CONF (Include conf/mod_jk.conf) - which is indeed located on a different machine? Where should I place my workers.properties? should it be on App Server or Web Server? Should I first start App Server or Web Server or it does'nt matter? In my HTTPD.CONF I have different mount points (example 'abc') so when I type http://IPADDRESS/abc it shows HTTP 400 Bad Request on my browser Howevere, when I type http://IPADDRESS/lmn it shows HTTP 404 Page Not Found (Note: lmn is not added a JKMount in my Httpd.conf) My MOD_JK.log file shows it added all the JKMounts. My ACCESS_LOG file shows: [23/Mar/2004:08:44:05 -0700] GET /abc HTTP/1.1 400 0 [23/Mar/2004:08:50:24 -0700] GET /lmn HTTP/1.1 404 301 My ERROR_LOG file shows: [Tue Mar 23 08:41:46 2004] [notice] Apache/2.0.47 (Unix) mod_jk/1.2.2 configured -- resuming normal operations Any related information on above is appreciated. THANKS again! HARI OM From: Randall Svancara [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 08:15:40 -0700 I would leave your httpd.conf file the same as you have it shown below. I would also confirm in you logs that everything is working ok. However, Apache should not even startup if the included configuration file, mod_jk.conf is not present. -- httpd.conf (on Web Server) -- LoadModule jk_module modules/mod_jk.so ServerName xyz.com Include conf/mod_jk.conf JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 The trick here is to make some changes to your workers.properties in order to connect to another box. It looks as if your are trying to configure a load balancer. If you are connecting to only one instance of tomcat this is not necessary. Also you need to look in your server.xml and see that you have the coyote connector running on port 8009. I would exclude
RE: Apache+Tomcat + MOD_JK on different machine
' [jk_uri_worker_map.c (599)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match [jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (477)]: Attempting to map URI '/index.html.en' [jk_uri_worker_map.c (599)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match [jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (477)]: Attempting to map URI '/examples' [jk_uri_worker_map.c (491)]: jk_uri_worker_map_t::map_uri_to_worker, Found an exact match ajp13 - /examples [mod_jk.c (1671)]: Into handler r-proxyreq=0 r-handler=jakarta-servlet r-notes=269677136 worker=ajp13 [jk_worker.c (132)]: Into wc_get_worker_for_name ajp13 [jk_worker.c (136)]: wc_get_worker_for_name, donefound a worker [mod_jk.c (488)]: agsp=80 agsn=serph.health.utah.gov hostn=serph.health.utah.gov shostn=serph.health.utah.gov cbsport=80 sport=80 [jk_ajp_common.c (1404)]: Into jk_worker_t::get_endpoint [jk_ajp_common.c (1116)]: Into jk_endpoint_t::service [jk_ajp_common.c (295)]: Into ajp_marshal_into_msgb [jk_ajp_common.c (432)]: ajp_marshal_into_msgb - Done [jk_connect.c (158)]: Into jk_open_socket [jk_connect.c (165)]: jk_open_socket, try to connect socket = 10 [jk_connect.c (174)]: jk_open_socket, after connect ret = 0 [jk_connect.c (183)]: jk_open_socket, set TCP_NODELAY to on [jk_connect.c (200)]: jk_open_socket, return, sd = 10 [jk_ajp_common.c (614)]: In jk_endpoint_t::ajp_connect_to_endpoint, connected sd = 10 [jk_ajp_common.c (642)]: sending to ajp13 #465 [jk_ajp_common.c (884)]: ajp_send_request 2: request body to send 0 - request body to resend 0 [jk_ajp_common.c (729)]: received from ajp13 #33 [jk_ajp_common.c (483)]: ajp_unmarshal_response: status = 400 [jk_ajp_common.c (488)]: ajp_unmarshal_response: Number of headers is = 1 [jk_ajp_common.c (532)]: ajp_unmarshal_response: Header[0] [Content-Type] = [text/html] [jk_ajp_common.c (729)]: received from ajp13 #2 [jk_ajp_common.c (1382)]: Into jk_endpoint_t::done, recycling connection From: Randall Svancara [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Wed, 24 Mar 2004 13:41:46 -0700 So, did you ever get this working then?? -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 7:52 AM To: [EMAIL PROTECTED]; Randall Svancara; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Thanks again Randall and Henry for your reply... appreciate that! When I try http://my_web_server/abc, it shows HTTP 400-Bad Request BUT when I try http://my_web_server/pqr, it shows HTTP 404 - File Not Found BUT when I try http://my_web_server, it works fine...which means that APACHE IS NOT SENDING THE REQUEST to TOMCATwonder why. I've added workers.properties in my conf directory on Web Server. I also have MOD_JK.CONF file there. WORKERS.PROPERTIES worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=102.103.103.1 #the above is IP of my App Server worker.ajp13.type=ajp13 mod_jk.conf Include conf/mod_jk.conf JkWorkersFile conf/workers.properties Include conf/mod_jk.conf JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 HTTPD.CONF JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 From: Randall Svancara [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 09:21:36 -0700 Your workers.properties should be on your webserver where apache is located. I typically place the workers.properties in the same directory where httpd.conf is located. workers.properties is needed for mod_jk so it makes sense that it needs to be in the same machine where mod_jk and apache are installed. At least far as I know anyways. Sometimes apache has a difficult time finding it. I have used this line to tell apache where to find the workers.properties. You might try including a line like this in your apache configuration file: IfModule mod_jk.c JkSet config.file /etc/apache2/conf/workers.properties Include /etc/apache2/conf/mod_jk2.conf /IfModule If anyone else has anything to add to this or correct me on, please feel free because I am still learning to, but then again who isn't?? I hope that helps. -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 8:56 AM To: [EMAIL PROTECTED] Cc: Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK
RE: Apache+Tomcat + MOD_JK on different machine
From what I can see, it should work. So you can browse http://someserver:8080/examples on the server where Tomcat is installed, right? Also, there just to be on the safe side, your network allows communication from one machine to another on port 8009. Try using telnet to access the server running tomcat from a seperate computer to see if the port is even accessible. Or if you have nmap, scan the tomcat box to see what ports are open or accessible. I performed a similar setup on a couple of test servers and it worked. One machine was running apache on linux and the other was running tomcat on windows. I am running out of things to tell ya. Anyone else want to take a stab at this??? Of course looking at your logs more closely, these lines here would assume that you are connecting the examples context?? [jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (477)]: Attempting to map URI '/examples' [jk_uri_worker_map.c (491)]: jk_uri_worker_map_t::map_uri_to_worker, Found an exact match ajp13 - /examples Randall -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 3:15 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine NO...I am still strugllingwonder why. Please check the logs 3 files ERROR_LOG [Tue Mar 23 15:50:39 2004] [notice] Apache/2.0.47 (Unix) mod_jk/1.2.2 configured -- resuming normal operations - ACCESS_LOG - [23/Mar/2004:15:51:33 -0700] GET / HTTP/1.1 200 1456 [23/Mar/2004:15:51:40 -0700] GET /examples HTTP/1.1 400 0 --- MOD_JK.LOG --- [jk_uri_worker_map.c (172)]: Into jk_uri_worker_map_t::uri_worker_map_alloc [jk_uri_worker_map.c (375)]: Into jk_uri_worker_map_t::uri_worker_map_open [jk_uri_worker_map.c (396)]: jk_uri_worker_map_t::uri_worker_map_open, rule map size is 4 [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::uri_worker_map_open, exact rule /examples=ajp13 was added [jk_uri_worker_map.c (321)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /examples/=ajp13 was added [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::uri_worker_map_open, exact rule /abc=ajp13 was added [jk_uri_worker_map.c (321)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /abc/=ajp13 was added [jk_uri_worker_map.c (408)]: Into jk_uri_worker_map_t::uri_worker_map_open, there are 4 rules [jk_uri_worker_map.c (422)]: jk_uri_worker_map_t::uri_worker_map_open, done [jk_worker.c (88)]: Into wc_open [jk_worker.c (222)]: Into build_worker_map, creating 1 workers [jk_worker.c (228)]: build_worker_map, creating worker ajp13 [jk_worker.c (148)]: Into wc_create_worker [jk_worker.c (162)]: wc_create_worker, about to create instance ajp13 of ajp13 [jk_ajp13_worker.c (108)]: Into ajp13_worker_factory [jk_worker.c (171)]: wc_create_worker, about to validate and init ajp13 [jk_ajp_common.c (1219)]: Into jk_worker_t::validate [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker ajp13 contact is utahdiseasereport.utah.gov:8009 [jk_ajp_common.c (1267)]: Into jk_worker_t::init [jk_ajp_common.c (1287)]: In jk_worker_t::init, setting socket timeout to 0 [jk_worker.c (187)]: wc_create_worker, done [jk_worker.c (238)]: build_worker_map, removing old ajp13 worker [jk_worker.c (250)]: build_worker_map, done [jk_worker.c (111)]: wc_open, done 1 [jk_worker.c (118)]: Into wc_close [jk_worker.c (199)]: close_workers got 1 workers to destroy [jk_worker.c (206)]: close_workers will destroy worker ajp13 [jk_ajp_common.c (1324)]: Into jk_worker_t::destroy [jk_ajp_common.c (1331)]: Into jk_worker_t::destroy up to 1 endpoint to close [jk_worker.c (120)]: wc_close, done [jk_uri_worker_map.c (190)]: Into jk_uri_worker_map_t::uri_worker_map_free [jk_uri_worker_map.c (441)]: Into jk_uri_worker_map_t::uri_worker_map_close [jk_uri_worker_map.c (172)]: Into jk_uri_worker_map_t::uri_worker_map_alloc [jk_uri_worker_map.c (375)]: Into jk_uri_worker_map_t::uri_worker_map_open [jk_uri_worker_map.c (396)]: jk_uri_worker_map_t::uri_worker_map_open, rule map size is 4 [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::uri_worker_map_open, exact rule /examples=ajp13 was added [jk_uri_worker_map.c (321)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /examples/=ajp13 was added [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::uri_worker_map_open, exact rule /abc=ajp13 was added [jk_uri_worker_map.c (321)]: Into jk_uri_worker_map_t::uri_worker_map_open, match rule /abc/=ajp13 was added [jk_uri_worker_map.c (408)]: Into jk_uri_worker_map_t::uri_worker_map_open, there are 4 rules [jk_uri_worker_map.c (422)]: jk_uri_worker_map_t::uri_worker_map_open, done [jk_worker.c (88)]: Into wc_open [jk_worker.c (222)]: Into build_worker_map, creating 1 workers [jk_worker.c (228)]: build_worker_map, creating worker
RE: Apache+Tomcat + MOD_JK on different machine
I would leave your httpd.conf file the same as you have it shown below. I would also confirm in you logs that everything is working ok. However, Apache should not even startup if the included configuration file, mod_jk.conf is not present. -- httpd.conf (on Web Server) -- LoadModule jk_module modules/mod_jk.so ServerName xyz.com Include conf/mod_jk.conf JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 The trick here is to make some changes to your workers.properties in order to connect to another box. It looks as if your are trying to configure a load balancer. If you are connecting to only one instance of tomcat this is not necessary. Also you need to look in your server.xml and see that you have the coyote connector running on port 8009. I would exclude the line: worker.ajp13.lbfactor=5 from this configuration. Besides, you have not defined a worker for load balancer, so i believe this line is not necessary. I would probably write your workers.properties files the following way: workers.properties (on Web Server) workers.CATALINA_HOME=/usr/local/tomcat4 workers.java_home=$(JAVA_HOME) ps=/ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=101.102.103.104 #above is IP address of abc.com worker.ajp13.type=ajp13 #Remove the following line. #worker.ajp13.lbfactor=5 I am going to send you my workers.properties for reference. IF AND ONLY IF you do configure a load balancer, then make sure in your server.xml to change following line from: Engine name=Standalone defaultHost=localhost debug=0 to Engine name=Standalone defaultHost=localhost debug=0 jvmRoute=worker2 This is necessary for load balancing. The value of jvmRoute should be equal to the worker that you want to connect to that particular instance of tomcat. #*Begin worker.properties* # worker.worker2.type=ajp13 worker.worker1.type=ajp13 # #Specifies the load balance factor when used with a load balancing worker. #Note: #- lbfactor must be 0 #- Low lbfactor means less work done by the worker. # worker.worker1.lbfactor=1 worker.worker2.lbfactor=10 # #Specify the size of the open connection cache. #worker.ajp13.cachesize # #--DEFAULT LOAD BALANCER WORKER DEFINITION--- # #The loadbalancer (type lb) worker perform weighted round-robin #load balancing with sticky sessions. #Note: #--- If a worker dies, the load balancer will check its state once #in a while. Until then all work is redirected to peer worker. # worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=worker2,worker1 # #worker.tomcat_home should point to the location where you installed #tomcat. This is where you have your conf, webapps and lib directories. #Note: Please make sure to enter the appropriate path from your machine. # worker.tomcat_home=/usr/local/tomcat # #worker.java_home should point to your Java installation. #Normally you should have a bin and lib directories beneath it. #Note: Please make sure to enter the appropriate path from your machine. # worker.java_home=/usr/local/java # #You should configure your environment slash...ps=\on NT and / on UNIX #and may be different elsewhere. # ps=/ #---ADVANCED MODE--- #-- # # #---DEFAULT worker list-- #-- # #The worker that your plugins should create and work with # worker.list=worker2,loadbalancer, worker1 # #DEFAULT ajp13 WORKER DEFINITION- # #Defining a worker named ajp13 and of type ajp13 #Note that the name and the type do not have to match. # worker.worker2.port=8009 worker.worker2.host=localhost worker.worker2.cachesize=100 worker.worker2.cache_timeout=1000 worker.worker2.socket_keepalive=3 worker.worker2.socket_timeout=1000 worker.worker1.port=8019 worker.worker1.host=216.222.102.252 worker.worker1.cachesize=100 worker.worker1.cache_timeout=1000 worker.worker1.socket_keepalive=3 worker.worker1.socket_timeout=1000 # #*End worker.properties* workers.properties (on Web Server) workers.CATALINA_HOME=/usr/local/tomcat4 workers.java_home=$(JAVA_HOME) ps=/ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=101.102.103.104 #above is IP address of abc.com worker.ajp13.type=ajp13 worker.ajp13.lbfactor=5 -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 7:58 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Apache+Tomcat + MOD_JK on different machine SUBJECT: Apache+Tomcat + MOD_JK on different machine I am using Apache 2.0.47 and Tomcat 4.1.27 on my SuSE Linux. I had configured my mod_jk and it works just great! (My Web and App Server were on same box) Now I have a Web Server and App Server on a
RE: Apache+Tomcat + MOD_JK on different machine
Thanks Randall for your reply... appreciate that! My MOD_JK.CONF file is AUTOGENERATED on my AppServer. I start my App Server FIRST which AUTOGENERATES mod_jk.conf file. So, how can I reference this file on my HTTPD.CONF (Include conf/mod_jk.conf) - which is indeed located on a different machine? Where should I place my workers.properties? should it be on App Server or Web Server? Should I first start App Server or Web Server or it does'nt matter? In my HTTPD.CONF I have different mount points (example 'abc') so when I type http://IPADDRESS/abc it shows HTTP 400 Bad Request on my browser Howevere, when I type http://IPADDRESS/lmn it shows HTTP 404 Page Not Found (Note: lmn is not added a JKMount in my Httpd.conf) My MOD_JK.log file shows it added all the JKMounts. My ACCESS_LOG file shows: [23/Mar/2004:08:44:05 -0700] GET /abc HTTP/1.1 400 0 [23/Mar/2004:08:50:24 -0700] GET /lmn HTTP/1.1 404 301 My ERROR_LOG file shows: [Tue Mar 23 08:41:46 2004] [notice] Apache/2.0.47 (Unix) mod_jk/1.2.2 configured -- resuming normal operations Any related information on above is appreciated. THANKS again! HARI OM From: Randall Svancara [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 08:15:40 -0700 I would leave your httpd.conf file the same as you have it shown below. I would also confirm in you logs that everything is working ok. However, Apache should not even startup if the included configuration file, mod_jk.conf is not present. -- httpd.conf (on Web Server) -- LoadModule jk_module modules/mod_jk.so ServerName xyz.com Include conf/mod_jk.conf JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 The trick here is to make some changes to your workers.properties in order to connect to another box. It looks as if your are trying to configure a load balancer. If you are connecting to only one instance of tomcat this is not necessary. Also you need to look in your server.xml and see that you have the coyote connector running on port 8009. I would exclude the line: worker.ajp13.lbfactor=5 from this configuration. Besides, you have not defined a worker for load balancer, so i believe this line is not necessary. I would probably write your workers.properties files the following way: workers.properties (on Web Server) workers.CATALINA_HOME=/usr/local/tomcat4 workers.java_home=$(JAVA_HOME) ps=/ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=101.102.103.104 #above is IP address of abc.com worker.ajp13.type=ajp13 #Remove the following line. #worker.ajp13.lbfactor=5 I am going to send you my workers.properties for reference. IF AND ONLY IF you do configure a load balancer, then make sure in your server.xml to change following line from: Engine name=Standalone defaultHost=localhost debug=0 to Engine name=Standalone defaultHost=localhost debug=0 jvmRoute=worker2 This is necessary for load balancing. The value of jvmRoute should be equal to the worker that you want to connect to that particular instance of tomcat. #*Begin worker.properties* # worker.worker2.type=ajp13 worker.worker1.type=ajp13 # #Specifies the load balance factor when used with a load balancing worker. #Note: #- lbfactor must be 0 #- Low lbfactor means less work done by the worker. # worker.worker1.lbfactor=1 worker.worker2.lbfactor=10 # #Specify the size of the open connection cache. #worker.ajp13.cachesize # #--DEFAULT LOAD BALANCER WORKER DEFINITION--- # #The loadbalancer (type lb) worker perform weighted round-robin #load balancing with sticky sessions. #Note: #--- If a worker dies, the load balancer will check its state once #in a while. Until then all work is redirected to peer worker. # worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=worker2,worker1 # #worker.tomcat_home should point to the location where you installed #tomcat. This is where you have your conf, webapps and lib directories. #Note: Please make sure to enter the appropriate path from your machine. # worker.tomcat_home=/usr/local/tomcat # #worker.java_home should point to your Java installation. #Normally you should have a bin and lib directories beneath it. #Note: Please make sure to enter the appropriate path from your machine. # worker.java_home=/usr/local/java # #You should configure your environment slash...ps=\on NT and / on UNIX #and may be different elsewhere. # ps=/ #---ADVANCED MODE--- #-- # # #---DEFAULT worker list-- #-- # #The worker that your plugins should create and work with # worker.list=worker2,loadbalancer, worker1 # #DEFAULT ajp13 WORKER DEFINITION
Re: Apache+Tomcat + MOD_JK on different machine
On Tuesday, March 23, 2004, at 09:55 AM, Hari Om wrote: My MOD_JK.CONF file is AUTOGENERATED on my AppServer. I start my App Server FIRST which AUTOGENERATES mod_jk.conf file. So, how can I reference this file on my HTTPD.CONF (Include conf/mod_jk.conf) - which is indeed located on a different machine? I am still new to Tomcat and learning way too much every day. I have spent a lot of time studying the documentation recently. I don't know how to do all the setup, but remembered that the documentation says you cannot use auto configuration when the web server and app server are on different machines. In tomcat-docs/jk2/jk/aphowto.html: Custom mod_jk configuration You should use custom configuration when : You couldn't use mod_jk.conf-auto since Tomcat engine isn't on the same machine that your Apache WebServer, ie when you have an Apache in front of a Tomcat Farm. Another case for custom configuration is when your Apache is in front of many differents Tomcat engines, each one having it's own configuration, a general case in ISP hosting Henry Martin Little Planet Learning, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache+Tomcat + MOD_JK on different machine
Your workers.properties should be on your webserver where apache is located. I typically place the workers.properties in the same directory where httpd.conf is located. workers.properties is needed for mod_jk so it makes sense that it needs to be in the same machine where mod_jk and apache are installed. At least far as I know anyways. Sometimes apache has a difficult time finding it. I have used this line to tell apache where to find the workers.properties. You might try including a line like this in your apache configuration file: IfModule mod_jk.c JkSet config.file /etc/apache2/conf/workers.properties Include /etc/apache2/conf/mod_jk2.conf /IfModule If anyone else has anything to add to this or correct me on, please feel free because I am still learning to, but then again who isn't?? I hope that helps. -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 8:56 AM To: [EMAIL PROTECTED] Cc: Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine Thanks Randall for your reply... appreciate that! My MOD_JK.CONF file is AUTOGENERATED on my AppServer. I start my App Server FIRST which AUTOGENERATES mod_jk.conf file. So, how can I reference this file on my HTTPD.CONF (Include conf/mod_jk.conf) - which is indeed located on a different machine? Where should I place my workers.properties? should it be on App Server or Web Server? Should I first start App Server or Web Server or it does'nt matter? In my HTTPD.CONF I have different mount points (example 'abc') so when I type http://IPADDRESS/abc it shows HTTP 400 Bad Request on my browser Howevere, when I type http://IPADDRESS/lmn it shows HTTP 404 Page Not Found (Note: lmn is not added a JKMount in my Httpd.conf) My MOD_JK.log file shows it added all the JKMounts. My ACCESS_LOG file shows: [23/Mar/2004:08:44:05 -0700] GET /abc HTTP/1.1 400 0 [23/Mar/2004:08:50:24 -0700] GET /lmn HTTP/1.1 404 301 My ERROR_LOG file shows: [Tue Mar 23 08:41:46 2004] [notice] Apache/2.0.47 (Unix) mod_jk/1.2.2 configured -- resuming normal operations Any related information on above is appreciated. THANKS again! HARI OM From: Randall Svancara [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 08:15:40 -0700 I would leave your httpd.conf file the same as you have it shown below. I would also confirm in you logs that everything is working ok. However, Apache should not even startup if the included configuration file, mod_jk.conf is not present. -- httpd.conf (on Web Server) -- LoadModule jk_module modules/mod_jk.so ServerName xyz.com Include conf/mod_jk.conf JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 The trick here is to make some changes to your workers.properties in order to connect to another box. It looks as if your are trying to configure a load balancer. If you are connecting to only one instance of tomcat this is not necessary. Also you need to look in your server.xml and see that you have the coyote connector running on port 8009. I would exclude the line: worker.ajp13.lbfactor=5 from this configuration. Besides, you have not defined a worker for load balancer, so i believe this line is not necessary. I would probably write your workers.properties files the following way: workers.properties (on Web Server) workers.CATALINA_HOME=/usr/local/tomcat4 workers.java_home=$(JAVA_HOME) ps=/ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=101.102.103.104 #above is IP address of abc.com worker.ajp13.type=ajp13 #Remove the following line. #worker.ajp13.lbfactor=5 I am going to send you my workers.properties for reference. IF AND ONLY IF you do configure a load balancer, then make sure in your server.xml to change following line from: Engine name=Standalone defaultHost=localhost debug=0 to Engine name=Standalone defaultHost=localhost debug=0 jvmRoute=worker2 This is necessary for load balancing. The value of jvmRoute should be equal to the worker that you want to connect to that particular instance of tomcat. #*Begin worker.properties* # worker.worker2.type=ajp13 worker.worker1.type=ajp13 # #Specifies the load balance factor when used with a load balancing worker. #Note: #- lbfactor must be 0 #- Low lbfactor means less work done by the worker. # worker.worker1.lbfactor=1 worker.worker2.lbfactor=10 # #Specify the size of the open connection cache. #worker.ajp13.cachesize # #--DEFAULT LOAD BALANCER WORKER DEFINITION--- # #The loadbalancer (type lb) worker perform weighted round-robin #load balancing with sticky sessions. #Note: #--- If a worker dies, the load
RE: Apache+Tomcat + MOD_JK on different machine
Thanks again Randall and Henry for your reply... appreciate that! When I try http://my_web_server/abc, it shows HTTP 400-Bad Request BUT when I try http://my_web_server/pqr, it shows HTTP 404 - File Not Found BUT when I try http://my_web_server, it works fine...which means that APACHE IS NOT SENDING THE REQUEST to TOMCATwonder why. I've added workers.properties in my conf directory on Web Server. I also have MOD_JK.CONF file there. WORKERS.PROPERTIES worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=102.103.103.1 #the above is IP of my App Server worker.ajp13.type=ajp13 mod_jk.conf Include conf/mod_jk.conf JkWorkersFile conf/workers.properties Include conf/mod_jk.conf JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 HTTPD.CONF JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 From: Randall Svancara [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 09:21:36 -0700 Your workers.properties should be on your webserver where apache is located. I typically place the workers.properties in the same directory where httpd.conf is located. workers.properties is needed for mod_jk so it makes sense that it needs to be in the same machine where mod_jk and apache are installed. At least far as I know anyways. Sometimes apache has a difficult time finding it. I have used this line to tell apache where to find the workers.properties. You might try including a line like this in your apache configuration file: IfModule mod_jk.c JkSet config.file /etc/apache2/conf/workers.properties Include /etc/apache2/conf/mod_jk2.conf /IfModule If anyone else has anything to add to this or correct me on, please feel free because I am still learning to, but then again who isn't?? I hope that helps. -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 8:56 AM To: [EMAIL PROTECTED] Cc: Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine Thanks Randall for your reply... appreciate that! My MOD_JK.CONF file is AUTOGENERATED on my AppServer. I start my App Server FIRST which AUTOGENERATES mod_jk.conf file. So, how can I reference this file on my HTTPD.CONF (Include conf/mod_jk.conf) - which is indeed located on a different machine? Where should I place my workers.properties? should it be on App Server or Web Server? Should I first start App Server or Web Server or it does'nt matter? In my HTTPD.CONF I have different mount points (example 'abc') so when I type http://IPADDRESS/abc it shows HTTP 400 Bad Request on my browser Howevere, when I type http://IPADDRESS/lmn it shows HTTP 404 Page Not Found (Note: lmn is not added a JKMount in my Httpd.conf) My MOD_JK.log file shows it added all the JKMounts. My ACCESS_LOG file shows: [23/Mar/2004:08:44:05 -0700] GET /abc HTTP/1.1 400 0 [23/Mar/2004:08:50:24 -0700] GET /lmn HTTP/1.1 404 301 My ERROR_LOG file shows: [Tue Mar 23 08:41:46 2004] [notice] Apache/2.0.47 (Unix) mod_jk/1.2.2 configured -- resuming normal operations Any related information on above is appreciated. THANKS again! HARI OM From: Randall Svancara [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 08:15:40 -0700 I would leave your httpd.conf file the same as you have it shown below. I would also confirm in you logs that everything is working ok. However, Apache should not even startup if the included configuration file, mod_jk.conf is not present. -- httpd.conf (on Web Server) -- LoadModule jk_module modules/mod_jk.so ServerName xyz.com Include conf/mod_jk.conf JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 The trick here is to make some changes to your workers.properties in order to connect to another box. It looks as if your are trying to configure a load balancer. If you are connecting to only one instance of tomcat this is not necessary. Also you need to look in your server.xml and see that you have the coyote connector running on port 8009. I would exclude the line: worker.ajp13.lbfactor=5 from this configuration. Besides, you have not defined a worker for load balancer, so i believe this line is not necessary. I would probably write your workers.properties files the following way: workers.properties (on Web Server
RE: Apache+Tomcat + MOD_JK on different machine
Sorry about the blank reply. Ok, I tried to mock up your configuration as best I could with the examples webapp of tomocat. So here are the configuration files that I am using. --- httpd.conf -- very last line add this: --- #This line includes the configuration file mod_jk.conf into your httpd.conf configuration #It is a great way to seperate out parts of the httpd.conf file Include /etc/httpd/conf/mod_jk.conf Ok, in your conf directory for apache which I am assuming is /etc/httpd/conf, add your mod_jk.conf file. --- mod_jk.conf --- #If mod_jk exists, load it. IfModule !mod_jk.c LoadModule jk_module modules/mod_jk.so /IfModule #Location of the workers.properties, I hate using relative paths as you never #know what you are getting sometimes!!! JkWorkersFile /etc/httpd/conf/workers.properties #Ok path to logging directory JkLogFile /var/log/httpd/mod_jk.log #Lets debug so we can find problems JkLogLevel debug #Ok, mount the examples webapp JkMount /examples ajp13 JkMount /examples/* ajp13 Now, lets create your workers.properties file in /etc/httpd/conf directory - Workers.properties - worker.list=ajp13 worker.ajp13.port=8019 worker.ajp13.host=192.168.0.200 #the above is IP of my App Server worker.ajp13.type=ajp13 Now, try to browse to the examples webapp on through apache like this http://someservername_OR_IP/examples If you can browse to this directory, then you should be up and going. I hope this helps. This is about as basic as it gets...I think. -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 2:59 PM To: Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine Hi Randall, the reply u sent was blankwondering if u replied my last query? THANKS a LOT From: Randall Svancara [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 14:49:24 -0700 -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 2:42 PM To: Randall Svancara; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Thanks again Randall and Henry for your reply... appreciate that! When I try http://my_web_server/abc, it shows HTTP 400-Bad Request BUT when I try http://my_web_server/pqr, it shows HTTP 404 - File Not Found BUT when I try http://my_web_server, it works fine...which means that APACHE IS NOT SENDING THE REQUEST to TOMCATwonder why. I've added workers.properties in my conf directory on Web Server. I also have MOD_JK.CONF file there. WORKERS.PROPERTIES worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=102.103.103.1 #the above is IP of my App Server worker.ajp13.type=ajp13 mod_jk.conf Include conf/mod_jk.conf JkWorkersFile conf/workers.properties Include conf/mod_jk.conf JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 HTTPD.CONF JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 From: Randall Svancara [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 09:21:36 -0700 Your workers.properties should be on your webserver where apache is located. I typically place the workers.properties in the same directory where httpd.conf is located. workers.properties is needed for mod_jk so it makes sense that it needs to be in the same machine where mod_jk and apache are installed. At least far as I know anyways. Sometimes apache has a difficult time finding it. I have used this line to tell apache where to find the workers.properties. You might try including a line like this in your apache configuration file: IfModule mod_jk.c JkSet config.file /etc/apache2/conf/workers.properties Include /etc/apache2/conf/mod_jk2.conf /IfModule If anyone else has anything to add to this or correct me on, please feel free because I am still learning to, but then again who isn't?? I hope that helps. -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 8:56 AM To: [EMAIL PROTECTED] Cc: Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine Thanks Randall for your reply... appreciate that! My MOD_JK.CONF file
RE: Apache+Tomcat + MOD_JK on different machine
Oh, one other thing, make sure your workers.properties file, your ajp13.port is pointing to port 8009. -Original Message- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 3:23 PM To: Hari Om; Tomcat Users List Subject: RE: Apache+Tomcat + MOD_JK on different machine Sorry about the blank reply. Ok, I tried to mock up your configuration as best I could with the examples webapp of tomocat. So here are the configuration files that I am using. --- httpd.conf -- very last line add this: --- #This line includes the configuration file mod_jk.conf into your httpd.conf configuration #It is a great way to seperate out parts of the httpd.conf file Include /etc/httpd/conf/mod_jk.conf Ok, in your conf directory for apache which I am assuming is /etc/httpd/conf, add your mod_jk.conf file. --- mod_jk.conf --- #If mod_jk exists, load it. IfModule !mod_jk.c LoadModule jk_module modules/mod_jk.so /IfModule #Location of the workers.properties, I hate using relative paths as you never #know what you are getting sometimes!!! JkWorkersFile /etc/httpd/conf/workers.properties #Ok path to logging directory JkLogFile /var/log/httpd/mod_jk.log #Lets debug so we can find problems JkLogLevel debug #Ok, mount the examples webapp JkMount /examples ajp13 JkMount /examples/* ajp13 Now, lets create your workers.properties file in /etc/httpd/conf directory - Workers.properties - worker.list=ajp13 worker.ajp13.port=8019 worker.ajp13.host=192.168.0.200 #the above is IP of my App Server worker.ajp13.type=ajp13 Now, try to browse to the examples webapp on through apache like this http://someservername_OR_IP/examples If you can browse to this directory, then you should be up and going. I hope this helps. This is about as basic as it gets...I think. -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 2:59 PM To: Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine Hi Randall, the reply u sent was blankwondering if u replied my last query? THANKS a LOT From: Randall Svancara [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 14:49:24 -0700 -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 2:42 PM To: Randall Svancara; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Thanks again Randall and Henry for your reply... appreciate that! When I try http://my_web_server/abc, it shows HTTP 400-Bad Request BUT when I try http://my_web_server/pqr, it shows HTTP 404 - File Not Found BUT when I try http://my_web_server, it works fine...which means that APACHE IS NOT SENDING THE REQUEST to TOMCATwonder why. I've added workers.properties in my conf directory on Web Server. I also have MOD_JK.CONF file there. WORKERS.PROPERTIES worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=102.103.103.1 #the above is IP of my App Server worker.ajp13.type=ajp13 mod_jk.conf Include conf/mod_jk.conf JkWorkersFile conf/workers.properties Include conf/mod_jk.conf JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 HTTPD.CONF JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 From: Randall Svancara [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 09:21:36 -0700 Your workers.properties should be on your webserver where apache is located. I typically place the workers.properties in the same directory where httpd.conf is located. workers.properties is needed for mod_jk so it makes sense that it needs to be in the same machine where mod_jk and apache are installed. At least far as I know anyways. Sometimes apache has a difficult time finding it. I have used this line to tell apache where to find the workers.properties. You might try including a line like this in your apache configuration file: IfModule mod_jk.c JkSet config.file /etc/apache2/conf/workers.properties Include /etc/apache2/conf/mod_jk2.conf /IfModule If anyone else has anything to add to this or correct me on, please feel free because I am still learning to, but then again who isn't?? I hope
RE: Apache+Tomcat + MOD_JK on different machine
Thanks Randall again I tried that but in vain. I am still getting the same error... HTTP 400 Bad Request error...wonder why? It is even NOT working for examples application. Does is have to do something with Virtual Host? Thanks again! HARI OM From: Randall Svancara [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 15:23:13 -0700 Sorry about the blank reply. Ok, I tried to mock up your configuration as best I could with the examples webapp of tomocat. So here are the configuration files that I am using. --- httpd.conf -- very last line add this: --- #This line includes the configuration file mod_jk.conf into your httpd.conf configuration #It is a great way to seperate out parts of the httpd.conf file Include /etc/httpd/conf/mod_jk.conf Ok, in your conf directory for apache which I am assuming is /etc/httpd/conf, add your mod_jk.conf file. --- mod_jk.conf --- #If mod_jk exists, load it. IfModule !mod_jk.c LoadModule jk_module modules/mod_jk.so /IfModule #Location of the workers.properties, I hate using relative paths as you never #know what you are getting sometimes!!! JkWorkersFile /etc/httpd/conf/workers.properties #Ok path to logging directory JkLogFile /var/log/httpd/mod_jk.log #Lets debug so we can find problems JkLogLevel debug #Ok, mount the examples webapp JkMount /examples ajp13 JkMount /examples/* ajp13 Now, lets create your workers.properties file in /etc/httpd/conf directory - Workers.properties - worker.list=ajp13 worker.ajp13.port=8019 worker.ajp13.host=192.168.0.200 #the above is IP of my App Server worker.ajp13.type=ajp13 Now, try to browse to the examples webapp on through apache like this http://someservername_OR_IP/examples If you can browse to this directory, then you should be up and going. I hope this helps. This is about as basic as it gets...I think. -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 2:59 PM To: Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine Hi Randall, the reply u sent was blankwondering if u replied my last query? THANKS a LOT From: Randall Svancara [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 14:49:24 -0700 -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 2:42 PM To: Randall Svancara; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Thanks again Randall and Henry for your reply... appreciate that! When I try http://my_web_server/abc, it shows HTTP 400-Bad Request BUT when I try http://my_web_server/pqr, it shows HTTP 404 - File Not Found BUT when I try http://my_web_server, it works fine...which means that APACHE IS NOT SENDING THE REQUEST to TOMCATwonder why. I've added workers.properties in my conf directory on Web Server. I also have MOD_JK.CONF file there. WORKERS.PROPERTIES worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=102.103.103.1 #the above is IP of my App Server worker.ajp13.type=ajp13 mod_jk.conf Include conf/mod_jk.conf JkWorkersFile conf/workers.properties Include conf/mod_jk.conf JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 HTTPD.CONF JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 From: Randall Svancara [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 09:21:36 -0700 Your workers.properties should be on your webserver where apache is located. I typically place the workers.properties in the same directory where httpd.conf is located. workers.properties is needed for mod_jk so it makes sense that it needs to be in the same machine where mod_jk and apache are installed. At least far as I know anyways. Sometimes apache has a difficult time finding it. I have used this line to tell apache where to find the workers.properties. You might try including a line like this in your apache configuration file: IfModule mod_jk.c JkSet config.file /etc/apache2/conf/workers.properties Include /etc/apache2
RE: Apache+Tomcat + MOD_JK on different machine
Hmmm...I did not even configure any virtual hosts, although I know you can but I rarely do for my implementations. Look in your /var/log/httpd/ directory and send a snippet of your logs so we can see what apache is chocking on. Also might send a snippet of your mod_jk.log. I know it is just some little thing we have over looked. But then again it is always the little things that causes so many problems. Thanks, Randall -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 3:37 PM To: [EMAIL PROTECTED] Cc: Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine Thanks Randall again I tried that but in vain. I am still getting the same error... HTTP 400 Bad Request error...wonder why? It is even NOT working for examples application. Does is have to do something with Virtual Host? Thanks again! HARI OM From: Randall Svancara [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 15:23:13 -0700 Sorry about the blank reply. Ok, I tried to mock up your configuration as best I could with the examples webapp of tomocat. So here are the configuration files that I am using. --- httpd.conf -- very last line add this: --- #This line includes the configuration file mod_jk.conf into your httpd.conf configuration #It is a great way to seperate out parts of the httpd.conf file Include /etc/httpd/conf/mod_jk.conf Ok, in your conf directory for apache which I am assuming is /etc/httpd/conf, add your mod_jk.conf file. --- mod_jk.conf --- #If mod_jk exists, load it. IfModule !mod_jk.c LoadModule jk_module modules/mod_jk.so /IfModule #Location of the workers.properties, I hate using relative paths as you never #know what you are getting sometimes!!! JkWorkersFile /etc/httpd/conf/workers.properties #Ok path to logging directory JkLogFile /var/log/httpd/mod_jk.log #Lets debug so we can find problems JkLogLevel debug #Ok, mount the examples webapp JkMount /examples ajp13 JkMount /examples/* ajp13 Now, lets create your workers.properties file in /etc/httpd/conf directory - Workers.properties - worker.list=ajp13 worker.ajp13.port=8019 worker.ajp13.host=192.168.0.200 #the above is IP of my App Server worker.ajp13.type=ajp13 Now, try to browse to the examples webapp on through apache like this http://someservername_OR_IP/examples If you can browse to this directory, then you should be up and going. I hope this helps. This is about as basic as it gets...I think. -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 2:59 PM To: Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine Hi Randall, the reply u sent was blankwondering if u replied my last query? THANKS a LOT From: Randall Svancara [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 14:49:24 -0700 -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 2:42 PM To: Randall Svancara; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Thanks again Randall and Henry for your reply... appreciate that! When I try http://my_web_server/abc, it shows HTTP 400-Bad Request BUT when I try http://my_web_server/pqr, it shows HTTP 404 - File Not Found BUT when I try http://my_web_server, it works fine...which means that APACHE IS NOT SENDING THE REQUEST to TOMCATwonder why. I've added workers.properties in my conf directory on Web Server. I also have MOD_JK.CONF file there. WORKERS.PROPERTIES worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=102.103.103.1 #the above is IP of my App Server worker.ajp13.type=ajp13 mod_jk.conf Include conf/mod_jk.conf JkWorkersFile conf/workers.properties Include conf/mod_jk.conf JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 HTTPD.CONF JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel debug JkMount /examples ajp13 JkMount /examples/* ajp13 JkMount /abc ajp13 JkMount /abc/* ajp13 From: Randall Svancara [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK
RE: Apache+Tomcat + MOD_JK on different machine
::map_uri_to_worker, done without a match [jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (477)]: Attempting to map URI '/index.html.en' [jk_uri_worker_map.c (599)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match [jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (477)]: Attempting to map URI '/examples' [jk_uri_worker_map.c (491)]: jk_uri_worker_map_t::map_uri_to_worker, Found an exact match ajp13 - /examples [mod_jk.c (1671)]: Into handler r-proxyreq=0 r-handler=jakarta-servlet r-notes=269677136 worker=ajp13 [jk_worker.c (132)]: Into wc_get_worker_for_name ajp13 [jk_worker.c (136)]: wc_get_worker_for_name, donefound a worker [mod_jk.c (488)]: agsp=80 agsn=serph.health.utah.gov hostn=serph.health.utah.gov shostn=serph.health.utah.gov cbsport=80 sport=80 [jk_ajp_common.c (1404)]: Into jk_worker_t::get_endpoint [jk_ajp_common.c (1116)]: Into jk_endpoint_t::service [jk_ajp_common.c (295)]: Into ajp_marshal_into_msgb [jk_ajp_common.c (432)]: ajp_marshal_into_msgb - Done [jk_connect.c (158)]: Into jk_open_socket [jk_connect.c (165)]: jk_open_socket, try to connect socket = 10 [jk_connect.c (174)]: jk_open_socket, after connect ret = 0 [jk_connect.c (183)]: jk_open_socket, set TCP_NODELAY to on [jk_connect.c (200)]: jk_open_socket, return, sd = 10 [jk_ajp_common.c (614)]: In jk_endpoint_t::ajp_connect_to_endpoint, connected sd = 10 [jk_ajp_common.c (642)]: sending to ajp13 #465 [jk_ajp_common.c (884)]: ajp_send_request 2: request body to send 0 - request body to resend 0 [jk_ajp_common.c (729)]: received from ajp13 #33 [jk_ajp_common.c (483)]: ajp_unmarshal_response: status = 400 [jk_ajp_common.c (488)]: ajp_unmarshal_response: Number of headers is = 1 [jk_ajp_common.c (532)]: ajp_unmarshal_response: Header[0] [Content-Type] = [text/html] [jk_ajp_common.c (729)]: received from ajp13 #2 [jk_ajp_common.c (1382)]: Into jk_endpoint_t::done, recycling connection From: Randall Svancara [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 15:44:12 -0700 Hmmm...I did not even configure any virtual hosts, although I know you can but I rarely do for my implementations. Look in your /var/log/httpd/ directory and send a snippet of your logs so we can see what apache is chocking on. Also might send a snippet of your mod_jk.log. I know it is just some little thing we have over looked. But then again it is always the little things that causes so many problems. Thanks, Randall -Original Message- From: Hari Om [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 3:37 PM To: [EMAIL PROTECTED] Cc: Randall Svancara Subject: RE: Apache+Tomcat + MOD_JK on different machine Thanks Randall again I tried that but in vain. I am still getting the same error... HTTP 400 Bad Request error...wonder why? It is even NOT working for examples application. Does is have to do something with Virtual Host? Thanks again! HARI OM From: Randall Svancara [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Hari Om [EMAIL PROTECTED],Tomcat Users List [EMAIL PROTECTED] Subject: RE: Apache+Tomcat + MOD_JK on different machine Date: Tue, 23 Mar 2004 15:23:13 -0700 Sorry about the blank reply. Ok, I tried to mock up your configuration as best I could with the examples webapp of tomocat. So here are the configuration files that I am using. --- httpd.conf -- very last line add this: --- #This line includes the configuration file mod_jk.conf into your httpd.conf configuration #It is a great way to seperate out parts of the httpd.conf file Include /etc/httpd/conf/mod_jk.conf Ok, in your conf directory for apache which I am assuming is /etc/httpd/conf, add your mod_jk.conf file. --- mod_jk.conf --- #If mod_jk exists, load it. IfModule !mod_jk.c LoadModule jk_module modules/mod_jk.so /IfModule #Location of the workers.properties, I hate using relative paths as you never #know what you are getting sometimes!!! JkWorkersFile /etc/httpd/conf/workers.properties #Ok path to logging directory JkLogFile /var/log/httpd/mod_jk.log #Lets debug so we can find problems JkLogLevel debug #Ok, mount the examples webapp JkMount /examples ajp13 JkMount /examples/* ajp13 Now, lets create your workers.properties file in /etc/httpd/conf directory - Workers.properties - worker.list=ajp13 worker.ajp13.port=8019 worker.ajp13.host=192.168.0.200 #the above is IP of my App Server worker.ajp13.type=ajp13 Now, try to browse to the examples webapp on through apache like this http://someservername_OR_IP/examples If you can browse to this directory
Re: Apache + Tomcat + MOD_JK
On Wed, 2003-12-24 at 10:05, Hari Om wrote: Hello, I am using Apache 2.0.47 and Tomcat 4.1.27 on SuSE 8.0 box on same machine. I am trying to make use of MOD_JK.SO (jk connector)which I build it from source. I have 2 different Users to the system httpd and jakarta with respective directories as /usr/local/httpd and /usr/local/jakarta /usr/local/httpd has httpd:httpd as owner and group /usr/local/jakarta has jakarta:jakarta as owner and group I have following files: FILENAME OWNERGROUP DIRECTORY - workers.properties jakarta jakarta/usr/local/jakarta/conf/jk/ This needs to be accessible by http. i have mine in the $APACHE_HOME/conf directory. server.xml jakarta jakarta/usr/local/jakarta/conf/ mod_jk.so httpd httpd /usr/local/httpd/modules/ This is Ok. mod_jk.log jakarta jakarta/usr/local/jakarta/logs Needs to be in the $APACHE_HOME/logs directory, or a place that the httpd user can write to. Ben Ricker Wellinx, inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache Tomcat mod_jk 1.2.5 WSC configuration for Tomcat 5
At 23:04 12.10.2003 -0700, you wrote: Which changes has to be made in the Tomcat 5 server.xml to use the new Connector-Version 1.2.5? By default, Tomcat 5 is configured for JK2, or not? No changes are required in server.xml for any Tomcat versions 3.3.x-5.0.x. Just like with Tomcat 4.1.x, the Tomcat 5 JK2 Connector is fully compatible with mod_jk (assuming that you are using channelSocket, since channelJNI and channelUnix require mod_jk2). Yes, I'm using channelSocket, but not mod_jk, but isapi_redirect.dll, because I Connect the Tomcat to IIS 5. Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache Tomcat mod_jk 1.2.5 WSC configuration for Tomcat 5
At 18:34 12.10.2003 +0200, you wrote: Which changes has to be made in the Tomcat 5 server.xml to use the new Connector-Version 1.2.5? By default, Tomcat 5 is configured for JK2, or not? [...] In Tomcat 5 server.xml it's only the following JK Connector: !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 / For using the new JK1.2.5 I must comment this one out and have to add this one, which is not longer in server.xml automatically, or not? !-- Define an AJP 1.3 Connector on port 8009 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache Tomcat mod_jk 1.2.5 WSC configuration for Tomcat 5
At 17:04 +0200 2003/10/12, Thorsten Westmeier wrote: Hi, if I interpret the Version-Number correctly, then it is a follower of the old JK Connector and not of the new JK2. I can confirm that. Can I use my old uriworkermap.properties and workers.properties? I have just managed to build jk1.2.5 and jk2 on MacOSX (and am writing a page on that, plus make the modules available). I replaced my previous mod_jk with the 1.2.5 with no configuration changes (Apache2 + tomcat4.1). I cannot speak about tomcat 5 as I had many problems yesterday with it, so I reversed to the latest 4.1 instead. Which changes has to be made in the Tomcat 5 server.xml to use the new Connector-Version 1.2.5? By default, Tomcat 5 is configured for JK2, or not? [...] Giuliano -- H U M P H || ||| software Java C++ Server/Client/Human Interface applications on MacOS - MacOS X http://www.humph.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache Tomcat mod_jk 1.2.5 WSC configuration for Tomcat 5
Hello, I read once that tomcat 5 is designed to handle the static files. Is mod_jk still necessary then ? do you have any experience on that ? Regards, ERic - Original Message - From: Giuliano Gavazzi [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, October 12, 2003 6:34 PM Subject: Re: Apache Tomcat mod_jk 1.2.5 WSC configuration for Tomcat 5 At 17:04 +0200 2003/10/12, Thorsten Westmeier wrote: Hi, if I interpret the Version-Number correctly, then it is a follower of the old JK Connector and not of the new JK2. I can confirm that. Can I use my old uriworkermap.properties and workers.properties? I have just managed to build jk1.2.5 and jk2 on MacOSX (and am writing a page on that, plus make the modules available). I replaced my previous mod_jk with the 1.2.5 with no configuration changes (Apache2 + tomcat4.1). I cannot speak about tomcat 5 as I had many problems yesterday with it, so I reversed to the latest 4.1 instead. Which changes has to be made in the Tomcat 5 server.xml to use the new Connector-Version 1.2.5? By default, Tomcat 5 is configured for JK2, or not? [...] Giuliano -- H U M P H || ||| software Java C++ Server/Client/Human Interface applications on MacOS - MacOS X http://www.humph.com/ - 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: Apache Tomcat mod_jk 1.2.5 WSC configuration for Tomcat 5
Thorsten Westmeier [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, if I interpret the Version-Number correctly, then it is a follower of the old JK Connector and not of the new JK2. Yes. Can I use my old uriworkermap.properties and workers.properties? Yes. No changes have been made to the configuration code. Which changes has to be made in the Tomcat 5 server.xml to use the new Connector-Version 1.2.5? By default, Tomcat 5 is configured for JK2, or not? No changes are required in server.xml for any Tomcat versions 3.3.x-5.0.x. Just like with Tomcat 4.1.x, the Tomcat 5 JK2 Connector is fully compatible with mod_jk (assuming that you are using channelSocket, since channelJNI and channelUnix require mod_jk2). Thanks for your help, Thorsten At 12:52 11.10.2003 -0500, you wrote: The Tomcat team is pleased to announce the release of version 1.2.5 of the Apache Tomcat mod_jk web server connector. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat + mod_jk
Following are my config files (my new application is called geode): httpd.conf : - ServerRoot C:/Apache/Apache2 PidFile logs/httpd.pid Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 IfModule mpm_winnt.c ThreadsPerChild 250 MaxRequestsPerChild 0 /IfModule Listen 8081 LoadModule access_module modules/mod_access.so LoadModule actions_module modules/mod_actions.so LoadModule alias_module modules/mod_alias.so LoadModule asis_module modules/mod_asis.so LoadModule auth_module modules/mod_auth.so LoadModule autoindex_module modules/mod_autoindex.so LoadModule cgi_module modules/mod_cgi.so LoadModule dir_module modules/mod_dir.so LoadModule env_module modules/mod_env.so LoadModule imap_module modules/mod_imap.so LoadModule include_module modules/mod_include.so LoadModule isapi_module modules/mod_isapi.so LoadModule log_config_module modules/mod_log_config.so LoadModule mime_module modules/mod_mime.so LoadModule negotiation_module modules/mod_negotiation.so LoadModule setenvif_module modules/mod_setenvif.so LoadModule userdir_module modules/mod_userdir.so LoadModule jk_module modules/mod_jk-2.0.43.dll ServerAdmin [EMAIL PROTECTED] ServerName toto.tata.com:8081 UseCanonicalName Off DocumentRoot C:/Apache/Apache2/htdocs Directory / Options FollowSymLinks AllowOverride None /Directory Directory C:/Apache/Apache2/htdocs Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all /Directory UserDir My Documents/My Website DirectoryIndex index.html index.html.var AccessFileName .htaccess Files ~ ^\.ht Order allow,deny Deny from all /Files TypesConfig conf/mime.types DefaultType text/plain IfModule mod_mime_magic.c MIMEMagicFile conf/magic /IfModule HostnameLookups Off ... ServerTokens Full ServerSignature On Alias /icons/ C:/Apache/Apache2/icons/ Directory C:/Apache/Apache2/icons Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all /Directory AliasMatch ^/manual(?:/(?:de|en|fr|ja|ko|ru))?(/.*)?$ C:/Apache/Apache2/manual$1 Directory C:/Apache/Apache2/manual Options Indexes AllowOverride None Order allow,deny Allow from all Files *.html SetHandler type-map /Files SetEnvIf Request_URI ^/manual/de/ prefer-language=de SetEnvIf Request_URI ^/manual/en/ prefer-language=en SetEnvIf Request_URI ^/manual/fr/ prefer-language=fr SetEnvIf Request_URI ^/manual/ja/ prefer-language=ja SetEnvIf Request_URI ^/manual/ko/ prefer-language=ko SetEnvIf Request_URI ^/manual/ru/ prefer-language=ru RedirectMatch 301 ^/manual(?:/(de|en|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2 /Directory ScriptAlias /cgi-bin/ C:/Apache/Apache2/cgi-bin/ Directory C:/Apache/Apache2/cgi-bin AllowOverride None Options None Order allow,deny Allow from all /Directory IndexOptions FancyIndexing VersionSort AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip ... AddType application/x-tar .tgz AddType image/x-icon .ico AddHandler type-map var IfModule mod_ssl.c Include conf/ssl.conf /IfModule Include c:/jakarta-tomcat-4-1-24/conf/auto/mod_jk.conf server.xml : -- Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=c:/apache/Apache2/modules/mod_jk-2.0.43.dll / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener descriptors=/com/fnac/geode/mbeans/mbean-descriptor.xml debug=0 jsr77Names=false/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved/Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams Resource name=jdbc/RealmDatasource type=javax.sql.DataSource scope=Shareable/ ResourceParams name=jdbc/RealmDatasource parameter nameusername/name valueadmin/value /parameter parameter namepassword/name
Re: Apache + Tomcat + mod_jk
OK, but where's mod_jk.conf? That's the critical file! John v.siguier wrote: Following are my config files (my new application is called geode): httpd.conf : - ServerRoot C:/Apache/Apache2 PidFile logs/httpd.pid Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 IfModule mpm_winnt.c ThreadsPerChild 250 MaxRequestsPerChild 0 /IfModule Listen 8081 LoadModule access_module modules/mod_access.so LoadModule actions_module modules/mod_actions.so LoadModule alias_module modules/mod_alias.so LoadModule asis_module modules/mod_asis.so LoadModule auth_module modules/mod_auth.so LoadModule autoindex_module modules/mod_autoindex.so LoadModule cgi_module modules/mod_cgi.so LoadModule dir_module modules/mod_dir.so LoadModule env_module modules/mod_env.so LoadModule imap_module modules/mod_imap.so LoadModule include_module modules/mod_include.so LoadModule isapi_module modules/mod_isapi.so LoadModule log_config_module modules/mod_log_config.so LoadModule mime_module modules/mod_mime.so LoadModule negotiation_module modules/mod_negotiation.so LoadModule setenvif_module modules/mod_setenvif.so LoadModule userdir_module modules/mod_userdir.so LoadModule jk_module modules/mod_jk-2.0.43.dll ServerAdmin [EMAIL PROTECTED] ServerName toto.tata.com:8081 UseCanonicalName Off DocumentRoot C:/Apache/Apache2/htdocs Directory / Options FollowSymLinks AllowOverride None /Directory Directory C:/Apache/Apache2/htdocs Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all /Directory UserDir My Documents/My Website DirectoryIndex index.html index.html.var AccessFileName .htaccess Files ~ ^\.ht Order allow,deny Deny from all /Files TypesConfig conf/mime.types DefaultType text/plain IfModule mod_mime_magic.c MIMEMagicFile conf/magic /IfModule HostnameLookups Off ... ServerTokens Full ServerSignature On Alias /icons/ C:/Apache/Apache2/icons/ Directory C:/Apache/Apache2/icons Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all /Directory AliasMatch ^/manual(?:/(?:de|en|fr|ja|ko|ru))?(/.*)?$ C:/Apache/Apache2/manual$1 Directory C:/Apache/Apache2/manual Options Indexes AllowOverride None Order allow,deny Allow from all Files *.html SetHandler type-map /Files SetEnvIf Request_URI ^/manual/de/ prefer-language=de SetEnvIf Request_URI ^/manual/en/ prefer-language=en SetEnvIf Request_URI ^/manual/fr/ prefer-language=fr SetEnvIf Request_URI ^/manual/ja/ prefer-language=ja SetEnvIf Request_URI ^/manual/ko/ prefer-language=ko SetEnvIf Request_URI ^/manual/ru/ prefer-language=ru RedirectMatch 301 ^/manual(?:/(de|en|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2 /Directory ScriptAlias /cgi-bin/ C:/Apache/Apache2/cgi-bin/ Directory C:/Apache/Apache2/cgi-bin AllowOverride None Options None Order allow,deny Allow from all /Directory IndexOptions FancyIndexing VersionSort AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip ... AddType application/x-tar .tgz AddType image/x-icon .ico AddHandler type-map var IfModule mod_ssl.c Include conf/ssl.conf /IfModule Include c:/jakarta-tomcat-4-1-24/conf/auto/mod_jk.conf server.xml : -- Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=c:/apache/Apache2/modules/mod_jk-2.0.43.dll / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener descriptors=/com/fnac/geode/mbeans/mbean-descriptor.xml debug=0 jsr77Names=false/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved/Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams Resource name=jdbc/RealmDatasource type=javax.sql.DataSource scope=Shareable/ ResourceParams name=jdbc/RealmDatasource parameter nameusername/name valueadmin/value /parameter parameter namepassword/name
Re: Apache + Tomcat + mod_jk
The generated jakarta-tomcat-4-1-24\conf\auto\mod_jk.conf : ## Auto generated on Thu Jul 31 15:51:00 CEST 2003## IfModule !mod_jk.c LoadModule jk_module c:/apache/Apache2/modules/mod_jk-2.0.43.dll /IfModule JkWorkersFile C:/jakarta-tomcat-4-1-24/conf/jk/workers.properties JkLogFile C:/jakarta-tomcat-4-1-24/logs/mod_jk.log JkLogLevel emerg VirtualHost localhost ServerName localhost localhost:/examples # Static files Alias /examples C:/jakarta-tomcat-4-1-24/webapps/examples Directory C:/jakarta-tomcat-4-1-24/webapps/examples Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /examples/WEB-INF/* AllowOverride None deny from all /Location Location /examples/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/examples/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/examples/META-INF/ AllowOverride None deny from all /Directory JkMount /examples/jsp/security/protected/j_security_check ajp13 JkMount /examples/snoop ajp13 JkMount /examples/CompressionTest ajp13 JkMount /examples/servlet/* ajp13 JkMount /examples/*.jsp ajp13 JkMount /examples/servletToJsp ajp13 JkMount /examples/SendMailServlet ajp13 localhost:/webdav # Static files Alias /webdav C:/jakarta-tomcat-4-1-24/webapps/webdav Directory C:/jakarta-tomcat-4-1-24/webapps/webdav Options Indexes FollowSymLinks DirectoryIndex index.jsp index.html index.htm /Directory # Deny direct access to WEB-INF and META-INF # Location /webdav/WEB-INF/* AllowOverride None deny from all /Location Location /webdav/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/webdav/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/webdav/META-INF/ AllowOverride None deny from all /Directory JkMount /webdav/*.jsp ajp13 localhost:/tomcat-docs # Static files Alias /tomcat-docs C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs Directory C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /tomcat-docs/WEB-INF/* AllowOverride None deny from all /Location Location /tomcat-docs/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs/META-INF/ AllowOverride None deny from all /Directory JkMount /tomcat-docs/*.jsp ajp13 localhost:/manager # Static files Alias /manager C:/jakarta-tomcat-4-1-24/webapps/../server/webapps/manager Directory C:/jakarta-tomcat-4-1-24/webapps/../server/webapps/manager Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /manager/WEB-INF/* AllowOverride None deny from all /Location Location /manager/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/../server/webapps/manager/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/../server/webapps/manager/META-INF/ AllowOverride None deny from all /Directory JkMount /manager/html/* ajp13 JkMount /manager/resources ajp13 JkMount /manager/undeploy ajp13 JkMount /manager/sessions ajp13 JkMount /manager/serverinfo ajp13 JkMount /manager/reload ajp13 JkMount /manager/start ajp13 JkMount /manager/*.jsp ajp13 JkMount /manager/list ajp13 JkMount /manager/stop ajp13 JkMount /manager/deploy ajp13 JkMount /manager/roles ajp13 JkMount /manager/remove
Re: Apache + Tomcat + mod_jk
Forgive me, but I've lost track of what this thread is about. What is not happening that you want to see happen, given the configuration files you've posted? What is your question again? John v.siguier wrote: The generated jakarta-tomcat-4-1-24\conf\auto\mod_jk.conf : ## Auto generated on Thu Jul 31 15:51:00 CEST 2003## IfModule !mod_jk.c LoadModule jk_module c:/apache/Apache2/modules/mod_jk-2.0.43.dll /IfModule JkWorkersFile C:/jakarta-tomcat-4-1-24/conf/jk/workers.properties JkLogFile C:/jakarta-tomcat-4-1-24/logs/mod_jk.log JkLogLevel emerg VirtualHost localhost ServerName localhost localhost:/examples # Static files Alias /examples C:/jakarta-tomcat-4-1-24/webapps/examples Directory C:/jakarta-tomcat-4-1-24/webapps/examples Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /examples/WEB-INF/* AllowOverride None deny from all /Location Location /examples/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/examples/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/examples/META-INF/ AllowOverride None deny from all /Directory JkMount /examples/jsp/security/protected/j_security_check ajp13 JkMount /examples/snoop ajp13 JkMount /examples/CompressionTest ajp13 JkMount /examples/servlet/* ajp13 JkMount /examples/*.jsp ajp13 JkMount /examples/servletToJsp ajp13 JkMount /examples/SendMailServlet ajp13 localhost:/webdav # Static files Alias /webdav C:/jakarta-tomcat-4-1-24/webapps/webdav Directory C:/jakarta-tomcat-4-1-24/webapps/webdav Options Indexes FollowSymLinks DirectoryIndex index.jsp index.html index.htm /Directory # Deny direct access to WEB-INF and META-INF # Location /webdav/WEB-INF/* AllowOverride None deny from all /Location Location /webdav/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/webdav/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/webdav/META-INF/ AllowOverride None deny from all /Directory JkMount /webdav/*.jsp ajp13 localhost:/tomcat-docs # Static files Alias /tomcat-docs C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs Directory C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /tomcat-docs/WEB-INF/* AllowOverride None deny from all /Location Location /tomcat-docs/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs/META-INF/ AllowOverride None deny from all /Directory JkMount /tomcat-docs/*.jsp ajp13 localhost:/manager # Static files Alias /manager C:/jakarta-tomcat-4-1-24/webapps/../server/webapps/manager Directory C:/jakarta-tomcat-4-1-24/webapps/../server/webapps/manager Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /manager/WEB-INF/* AllowOverride None deny from all /Location Location /manager/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/../server/webapps/manager/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/../server/webapps/manager/META-INF/ AllowOverride None deny from all /Directory JkMount /manager/html/* ajp13 JkMount /manager/resources ajp13 JkMount /manager/undeploy ajp13 JkMount /manager/sessions ajp13 JkMount /manager/serverinfo ajp13 JkMount /manager/reload ajp13 JkMount /manager/start ajp13
Re: Apache + Tomcat + mod_jk
No problem, my question is : I have configured Apache and Tomcat with mod_jk in order to connect them together but now all ressources of my application must be located under Tomcat directory to be founded. As I want to put all static ressources directly under Apache, somebody can tell me what I have to configure in Apache or Tomcat to do this ? Forgive me, but I've lost track of what this thread is about. What is not happening that you want to see happen, given the configuration files you've posted? What is your question again? John v.siguier wrote: The generated jakarta-tomcat-4-1-24\conf\auto\mod_jk.conf : ## Auto generated on Thu Jul 31 15:51:00 CEST 2003## IfModule !mod_jk.c LoadModule jk_module c:/apache/Apache2/modules/mod_jk-2.0.43.dll /IfModule JkWorkersFile C:/jakarta-tomcat-4-1-24/conf/jk/workers.properties JkLogFile C:/jakarta-tomcat-4-1-24/logs/mod_jk.log JkLogLevel emerg VirtualHost localhost ServerName localhost localhost:/examples # Static files Alias /examples C:/jakarta-tomcat-4-1-24/webapps/examples Directory C:/jakarta-tomcat-4-1-24/webapps/examples Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /examples/WEB-INF/* AllowOverride None deny from all /Location Location /examples/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/examples/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/examples/META-INF/ AllowOverride None deny from all /Directory JkMount /examples/jsp/security/protected/j_security_check ajp13 JkMount /examples/snoop ajp13 JkMount /examples/CompressionTest ajp13 JkMount /examples/servlet/* ajp13 JkMount /examples/*.jsp ajp13 JkMount /examples/servletToJsp ajp13 JkMount /examples/SendMailServlet ajp13 localhost:/webdav # Static files Alias /webdav C:/jakarta-tomcat-4-1-24/webapps/webdav Directory C:/jakarta-tomcat-4-1-24/webapps/webdav Options Indexes FollowSymLinks DirectoryIndex index.jsp index.html index.htm /Directory # Deny direct access to WEB-INF and META-INF # Location /webdav/WEB-INF/* AllowOverride None deny from all /Location Location /webdav/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/webdav/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/webdav/META-INF/ AllowOverride None deny from all /Directory JkMount /webdav/*.jsp ajp13 localhost:/tomcat-docs # Static files Alias /tomcat-docs C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs Directory C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /tomcat-docs/WEB-INF/* AllowOverride None deny from all /Location Location /tomcat-docs/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs/META-INF/ AllowOverride None deny from all /Directory JkMount /tomcat-docs/*.jsp ajp13 localhost:/manager # Static files Alias /manager C:/jakarta-tomcat-4-1-24/webapps/../server/webapps/manager Directory C:/jakarta-tomcat-4-1-24/webapps/../server/webapps/manager Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /manager/WEB-INF/* AllowOverride None deny from all /Location Location /manager/META-INF/*
Re: Apache + Tomcat + mod_jk
DocumentRoot C:/jakarta-tomcat-4-1-24/webapps/geode You will need to copy the mod_jk.conf file to some other location and modify it manually. Change your Include line in httpd.conf to reflect the new location. I like to put mine in the Apache conf directory. I'm not sure what you mean exactly by directly under Apache...as Apache doesn't care where files are located as long as it has the appropriate permissions to access them and can find them. Your files do not have to be under any particular directory. I'd have to know more about where you want to put your static resources exactly. Another option is to do something like: Alias /static C:/path/to/static/stuff There are various ways to do it, without knowing exactly what your dir structure is, what URL you want to use, etc. it is hard to give you a specific answer. In any case, you will likely have to modify mod_jk.conf by hand, which means putting it in a location where it won't be overwritten each time you start Tomcat, otherwise you will have to make the same changes over and over again. The whole mod_jk.conf thing is a convenience. It doesn't scale very well at all. I don't use it for my production servers, I make my changes by hand. Its in my HOWTO because its the easiest way for a newbie to get up and running. For complex setups (especially multiple virtual hosts and multiple webapps) you will want to avoid relying on it. John v.siguier wrote: No problem, my question is : I have configured Apache and Tomcat with mod_jk in order to connect them together but now all ressources of my application must be located under Tomcat directory to be founded. As I want to put all static ressources directly under Apache, somebody can tell me what I have to configure in Apache or Tomcat to do this ? Forgive me, but I've lost track of what this thread is about. What is not happening that you want to see happen, given the configuration files you've posted? What is your question again? John v.siguier wrote: The generated jakarta-tomcat-4-1-24\conf\auto\mod_jk.conf : ## Auto generated on Thu Jul 31 15:51:00 CEST 2003## IfModule !mod_jk.c LoadModule jk_module c:/apache/Apache2/modules/mod_jk-2.0.43.dll /IfModule JkWorkersFile C:/jakarta-tomcat-4-1-24/conf/jk/workers.properties JkLogFile C:/jakarta-tomcat-4-1-24/logs/mod_jk.log JkLogLevel emerg VirtualHost localhost ServerName localhost localhost:/examples # Static files Alias /examples C:/jakarta-tomcat-4-1-24/webapps/examples Directory C:/jakarta-tomcat-4-1-24/webapps/examples Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /examples/WEB-INF/* AllowOverride None deny from all /Location Location /examples/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/examples/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/examples/META-INF/ AllowOverride None deny from all /Directory JkMount /examples/jsp/security/protected/j_security_check ajp13 JkMount /examples/snoop ajp13 JkMount /examples/CompressionTest ajp13 JkMount /examples/servlet/* ajp13 JkMount /examples/*.jsp ajp13 JkMount /examples/servletToJsp ajp13 JkMount /examples/SendMailServlet ajp13 localhost:/webdav # Static files Alias /webdav C:/jakarta-tomcat-4-1-24/webapps/webdav Directory C:/jakarta-tomcat-4-1-24/webapps/webdav Options Indexes FollowSymLinks DirectoryIndex index.jsp index.html index.htm /Directory # Deny direct access to WEB-INF and META-INF # Location /webdav/WEB-INF/* AllowOverride None deny from all /Location Location /webdav/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/webdav/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/webdav/META-INF/ AllowOverride None deny from all /Directory JkMount /webdav/*.jsp ajp13 localhost:/tomcat-docs # Static files Alias /tomcat-docs C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs Directory C:/jakarta-tomcat-4-1-24/webapps/tomcat-docs Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /tomcat-docs/WEB-INF/* AllowOverride None deny from all /Location
Re: Apache + Tomcat + mod_jk
I would like to put .html files under htdocs/geode, .js under htdocs/geode/javascript and all images under htdocs/geode/images. If the user want to access to a html file (http://host:port/geode/*.html), I want it to be served by Apache. If the user want to access to a servlet (http://host:port/geode/servlet/*), I want it to be served by Tomcat. If the user want to access to a jsp (http://host:port/geode/jsp/*.jsp), I want it to be served by Tomcat. I hope these precision will help you to understand exactly what I try to do. What do you mean by DocumentRoot C:/jakarta-tomcat-4-1-24/webapps/geode ? Thank you for your help. DocumentRoot C:/jakarta-tomcat-4-1-24/webapps/geode You will need to copy the mod_jk.conf file to some other location and modify it manually. Change your Include line in httpd.conf to reflect the new location. I like to put mine in the Apache conf directory. I'm not sure what you mean exactly by directly under Apache...as Apache doesn't care where files are located as long as it has the appropriate permissions to access them and can find them. Your files do not have to be under any particular directory. I'd have to know more about where you want to put your static resources exactly. Another option is to do something like: Alias /static C:/path/to/static/stuff There are various ways to do it, without knowing exactly what your dir structure is, what URL you want to use, etc. it is hard to give you a specific answer. In any case, you will likely have to modify mod_jk.conf by hand, which means putting it in a location where it won't be overwritten each time you start Tomcat, otherwise you will have to make the same changes over and over again. The whole mod_jk.conf thing is a convenience. It doesn't scale very well at all. I don't use it for my production servers, I make my changes by hand. Its in my HOWTO because its the easiest way for a newbie to get up and running. For complex setups (especially multiple virtual hosts and multiple webapps) you will want to avoid relying on it. John v.siguier wrote: No problem, my question is : I have configured Apache and Tomcat with mod_jk in order to connect them together but now all ressources of my application must be located under Tomcat directory to be founded. As I want to put all static ressources directly under Apache, somebody can tell me what I have to configure in Apache or Tomcat to do this ? Forgive me, but I've lost track of what this thread is about. What is not happening that you want to see happen, given the configuration files you've posted? What is your question again? John v.siguier wrote: The generated jakarta-tomcat-4-1-24\conf\auto\mod_jk.conf : ## Auto generated on Thu Jul 31 15:51:00 CEST 2003## IfModule !mod_jk.c LoadModule jk_module c:/apache/Apache2/modules/mod_jk-2.0.43.dll /IfModule JkWorkersFile C:/jakarta-tomcat-4-1-24/conf/jk/workers.properties JkLogFile C:/jakarta-tomcat-4-1-24/logs/mod_jk.log JkLogLevel emerg VirtualHost localhost ServerName localhost localhost:/examples # Static files Alias /examples C:/jakarta-tomcat-4-1-24/webapps/examples Directory C:/jakarta-tomcat-4-1-24/webapps/examples Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /examples/WEB-INF/* AllowOverride None deny from all /Location Location /examples/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory C:/jakarta-tomcat-4-1-24/webapps/examples/WEB-INF/ AllowOverride None deny from all /Directory Directory C:/jakarta-tomcat-4-1-24/webapps/examples/META-INF/ AllowOverride None deny from all /Directory JkMount /examples/jsp/security/protected/j_security_check ajp13 JkMount /examples/snoop ajp13 JkMount /examples/CompressionTest ajp13 JkMount /examples/servlet/* ajp13 JkMount /examples/*.jsp ajp13 JkMount /examples/servletToJsp ajp13 JkMount /examples/SendMailServlet ajp13 localhost:/webdav # Static files Alias /webdav C:/jakarta-tomcat-4-1-24/webapps/webdav Directory C:/jakarta-tomcat-4-1-24/webapps/webdav Options Indexes FollowSymLinks DirectoryIndex index.jsp index.html index.htm /Directory # Deny direct access to WEB-INF and META-INF # Location /webdav/WEB-INF/* AllowOverride None deny from all /Location Location /webdav/META-INF/* AllowOverride None deny from all
Re: Apache + Tomcat + mod_jk
Which server (Apache or Tomcat) actually serves the file has nothing to do with file location. Which server (Apache or Tomcat) actually serves the file is completely driven by the JkMount directives. JkMount is inclusive...that is, unless you define a JkMount for a particular URI, the file will be served by Apache. Thus: JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 means that ONLY JSP and servlet will be handled by Tomcat, ALL OTHER requests will be handled by Apache. Thus, putting your static resources under your web application's directory structure makes it easier on you when deploying, because you only have to deploy to one location. Again, where the files are located has NOTHING to do with which server (Apache or Tomcat) handles the request. By DocumentRoot I mean tell Apache where the DocumentRoot is. Thus, with a DocumentRoot equal to the location of your Tomcat web application, all of your files can exist in one location, and as long as Apache has access permisssions to the web application root directory, Apache will handle requests for those files, not Tomcat. webapps ...geode ..index.jsp ..static.html ..image.gif ..WEB-INF .web.xml .classes YourServlet.class DocumentRoot equals CATALINA_HOME/webapps/geode http://host/geode/static.html works. http://host/geode/image.gif works. http://host/geode/index.jsp works. http://host/geode/servlet/* works (provided you map your servlets correctly in webapps/geode/WEB-INF/web.xml). John v.siguier wrote: I would like to put .html files under htdocs/geode, .js under htdocs/geode/javascript and all images under htdocs/geode/images. If the user want to access to a html file (http://host:port/geode/*.html), I want it to be served by Apache. If the user want to access to a servlet (http://host:port/geode/servlet/*), I want it to be served by Tomcat. If the user want to access to a jsp (http://host:port/geode/jsp/*.jsp), I want it to be served by Tomcat. I hope these precision will help you to understand exactly what I try to do. What do you mean by DocumentRoot C:/jakarta-tomcat-4-1-24/webapps/geode ? Thank you for your help. DocumentRoot C:/jakarta-tomcat-4-1-24/webapps/geode You will need to copy the mod_jk.conf file to some other location and modify it manually. Change your Include line in httpd.conf to reflect the new location. I like to put mine in the Apache conf directory. I'm not sure what you mean exactly by directly under Apache...as Apache doesn't care where files are located as long as it has the appropriate permissions to access them and can find them. Your files do not have to be under any particular directory. I'd have to know more about where you want to put your static resources exactly. Another option is to do something like: Alias /static C:/path/to/static/stuff There are various ways to do it, without knowing exactly what your dir structure is, what URL you want to use, etc. it is hard to give you a specific answer. In any case, you will likely have to modify mod_jk.conf by hand, which means putting it in a location where it won't be overwritten each time you start Tomcat, otherwise you will have to make the same changes over and over again. The whole mod_jk.conf thing is a convenience. It doesn't scale very well at all. I don't use it for my production servers, I make my changes by hand. Its in my HOWTO because its the easiest way for a newbie to get up and running. For complex setups (especially multiple virtual hosts and multiple webapps) you will want to avoid relying on it. John v.siguier wrote: No problem, my question is : I have configured Apache and Tomcat with mod_jk in order to connect them together but now all ressources of my application must be located under Tomcat directory to be founded. As I want to put all static ressources directly under Apache, somebody can tell me what I have to configure in Apache or Tomcat to do this ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat + mod_jk
I am agree with you, only one location for all my application resources is better but my customer want to separate static resources from dynamic resources. You tell me that only JkMount directives indicate which serv files, or in my mod_jk.conf there is only : JkMount /geode/jsp/j_security_check ajp13 JkMount /geode/*.jsp ajp13 so I don't understand why an URL like http://host:port/geode/index.html (ie htdocs/geode/index.html) is not found, exact message is : The requested URL /geode/index.html was not found on this server. Which server (Apache or Tomcat) actually serves the file has nothing to do with file location. Which server (Apache or Tomcat) actually serves the file is completely driven by the JkMount directives. JkMount is inclusive...that is, unless you define a JkMount for a particular URI, the file will be served by Apache. Thus: JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 means that ONLY JSP and servlet will be handled by Tomcat, ALL OTHER requests will be handled by Apache. Thus, putting your static resources under your web application's directory structure makes it easier on you when deploying, because you only have to deploy to one location. Again, where the files are located has NOTHING to do with which server (Apache or Tomcat) handles the request. By DocumentRoot I mean tell Apache where the DocumentRoot is. Thus, with a DocumentRoot equal to the location of your Tomcat web application, all of your files can exist in one location, and as long as Apache has access permisssions to the web application root directory, Apache will handle requests for those files, not Tomcat. webapps ...geode ..index.jsp ..static.html ..image.gif ..WEB-INF .web.xml .classes YourServlet.class DocumentRoot equals CATALINA_HOME/webapps/geode http://host/geode/static.html works. http://host/geode/image.gif works. http://host/geode/index.jsp works. http://host/geode/servlet/* works (provided you map your servlets correctly in webapps/geode/WEB-INF/web.xml). John v.siguier wrote: I would like to put .html files under htdocs/geode, .js under htdocs/geode/javascript and all images under htdocs/geode/images. If the user want to access to a html file (http://host:port/geode/*.html), I want it to be served by Apache. If the user want to access to a servlet (http://host:port/geode/servlet/*), I want it to be served by Tomcat. If the user want to access to a jsp (http://host:port/geode/jsp/*.jsp), I want it to be served by Tomcat. I hope these precision will help you to understand exactly what I try to do. What do you mean by DocumentRoot C:/jakarta-tomcat-4-1-24/webapps/geode ? Thank you for your help. DocumentRoot C:/jakarta-tomcat-4-1-24/webapps/geode You will need to copy the mod_jk.conf file to some other location and modify it manually. Change your Include line in httpd.conf to reflect the new location. I like to put mine in the Apache conf directory. I'm not sure what you mean exactly by directly under Apache...as Apache doesn't care where files are located as long as it has the appropriate permissions to access them and can find them. Your files do not have to be under any particular directory. I'd have to know more about where you want to put your static resources exactly. Another option is to do something like: Alias /static C:/path/to/static/stuff There are various ways to do it, without knowing exactly what your dir structure is, what URL you want to use, etc. it is hard to give you a specific answer. In any case, you will likely have to modify mod_jk.conf by hand, which means putting it in a location where it won't be overwritten each time you start Tomcat, otherwise you will have to make the same changes over and over again. The whole mod_jk.conf thing is a convenience. It doesn't scale very well at all. I don't use it for my production servers, I make my changes by hand. Its in my HOWTO because its the easiest way for a newbie to get up and running. For complex setups (especially multiple virtual hosts and multiple webapps) you will want to avoid relying on it. John v.siguier wrote: No problem, my question is : I have configured Apache and Tomcat with mod_jk in order to connect them together but now all ressources of my application must be located under Tomcat directory to be founded. As I want to put all static ressources directly under Apache, somebody can tell me what I have to configure in Apache or Tomcat to do this ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Faites un voeu et puis Voila ! www.voila.fr - To
Re: Apache + Tomcat + mod_jk
argh... Because you don't have a DocumentRoot. Please, please just try one thing for me: - copy mod_jk.conf to APACHE_HOME/conf - edit mod_jk.conf...in the correct VirtualHost block, add a line that says: DocumentRoot PATH_TO_YOUR_WEBAPP_HERE - change httpd.conf, change the Include line for mod_jk.conf to include the version in APACHE_HOME.conf, not the typical location under CATALINA_HOME/conf - restart Tomcat, restart Apache Your index.html file is not served because: 1) there's no JkMount for *.html to tell Tomcat to serve it (which you don't want anyway) and 2) apache doesn't know where to find it I really don't know how else I can explain this. Maybe the Apache docs will help: http://httpd.apache.org/docs-2.0/mod/core.html#documentroot John v.siguier wrote: I am agree with you, only one location for all my application resources is better but my customer want to separate static resources from dynamic resources. You tell me that only JkMount directives indicate which serv files, or in my mod_jk.conf there is only : JkMount /geode/jsp/j_security_check ajp13 JkMount /geode/*.jsp ajp13 so I don't understand why an URL like http://host:port/geode/index.html (ie htdocs/geode/index.html) is not found, exact message is : The requested URL /geode/index.html was not found on this server. Which server (Apache or Tomcat) actually serves the file has nothing to do with file location. Which server (Apache or Tomcat) actually serves the file is completely driven by the JkMount directives. JkMount is inclusive...that is, unless you define a JkMount for a particular URI, the file will be served by Apache. Thus: JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 means that ONLY JSP and servlet will be handled by Tomcat, ALL OTHER requests will be handled by Apache. Thus, putting your static resources under your web application's directory structure makes it easier on you when deploying, because you only have to deploy to one location. Again, where the files are located has NOTHING to do with which server (Apache or Tomcat) handles the request. By DocumentRoot I mean tell Apache where the DocumentRoot is. Thus, with a DocumentRoot equal to the location of your Tomcat web application, all of your files can exist in one location, and as long as Apache has access permisssions to the web application root directory, Apache will handle requests for those files, not Tomcat. webapps ...geode ..index.jsp ..static.html ..image.gif ..WEB-INF .web.xml .classes YourServlet.class DocumentRoot equals CATALINA_HOME/webapps/geode http://host/geode/static.html works. http://host/geode/image.gif works. http://host/geode/index.jsp works. http://host/geode/servlet/* works (provided you map your servlets correctly in webapps/geode/WEB-INF/web.xml). John v.siguier wrote: I would like to put .html files under htdocs/geode, .js under htdocs/geode/javascript and all images under htdocs/geode/images. If the user want to access to a html file (http://host:port/geode/*.html), I want it to be served by Apache. If the user want to access to a servlet (http://host:port/geode/servlet/*), I want it to be served by Tomcat. If the user want to access to a jsp (http://host:port/geode/jsp/*.jsp), I want it to be served by Tomcat. I hope these precision will help you to understand exactly what I try to do. What do you mean by DocumentRoot C:/jakarta-tomcat-4-1-24/webapps/geode ? Thank you for your help. DocumentRoot C:/jakarta-tomcat-4-1-24/webapps/geode You will need to copy the mod_jk.conf file to some other location and modify it manually. Change your Include line in httpd.conf to reflect the new location. I like to put mine in the Apache conf directory. I'm not sure what you mean exactly by directly under Apache...as Apache doesn't care where files are located as long as it has the appropriate permissions to access them and can find them. Your files do not have to be under any particular directory. I'd have to know more about where you want to put your static resources exactly. Another option is to do something like: Alias /static C:/path/to/static/stuff There are various ways to do it, without knowing exactly what your dir structure is, what URL you want to use, etc. it is hard to give you a specific answer. In any case, you will likely have to modify mod_jk.conf by hand, which means putting it in a location where it won't be overwritten each time you start Tomcat, otherwise you will have to make the same changes over and over again. The whole mod_jk.conf thing is a convenience. It doesn't scale very well at all. I don't use it for my production servers, I make my changes by hand. Its in my HOWTO because its the easiest way for a newbie to get up and running. For complex setups (especially multiple virtual hosts and multiple webapps) you will want to avoid relying on it. John v.siguier wrote: No problem, my question is : I have
Re: Apache + Tomcat + mod_jk
Dear John, All I do to configure Apache with Tomcat thanks to mod_jk is from your document at http://www.johnturner.com/howto (NT platform)... is there a mail address where I can forward you all config files (httpd.conf, server.xml...) ? Regards or 3) dispensing with the mod_jk.conf method and modifying httpd.conf manually to work in your environment. John John Turner wrote: We didn't know you were using the mod_jk.conf method. How about posting your dir structure, with a description of where you want your files to be, and then post the relevant VirtualHost block (sanitized if necessary) from mod_jk.conf? Then we can see what it is you have already so we don't go around in circles. The point of previous posts is that if you want Apache to serve static content from a certain location, you typically use DocumentRoot to specify that location. If the DocumentRoot in your mod_jk.conf file isn't working for you, you will have to consider 1) changing your dir structure and server.xml so that mod_jk.conf is created with a DocumentRoot that does work for you, or 2) changing where you put your files to fit with the current DocumentRoot that is being generated. John v.siguier wrote: Thanks for your help but I don't understand where I have to put these new lines... I have made changes in server.xml and I have created workers.properties (under Tomcat) in order to generate automatically mod_jk.conf. In Apache config file, I have made no changes for my new webapp... do I have to write any information concerning my application in httpd.conf ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Faites un voeu et puis Voila ! www.voila.fr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat + mod_jk
Hi - I try to avoid free individual support. If you post your questions and your config specifics to the list, someone will help you, and then at least it will be in the archives for everyone else instead of just your InBox and mine. John v.siguier wrote: Dear John, All I do to configure Apache with Tomcat thanks to mod_jk is from your document at http://www.johnturner.com/howto (NT platform)... is there a mail address where I can forward you all config files (httpd.conf, server.xml...) ? Regards or 3) dispensing with the mod_jk.conf method and modifying httpd.conf manually to work in your environment. John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat + mod_jk
Where have you put your JSPs and/or servlets? If for example you've put them in tomcat-install/webapps/myfiles, then in your mod_jk conf file you need to put a directive like this: Alias /tcfiles tomcat-install/webapps/myfiles JkMount /tcfiles/servlet/* ajp13-wrk1 JkMount /tcfiles/*.jsp ajp13-wrk1 ajp13-wrk1 is a worker described in your workers.properties file This means that only files ending with *.jsp or starting with /servlet/ will be served by Tomcat. Anything else will be served by Apache. Zach. v.siguier wrote: Hello, I have configured Apache and Tomcat with mod_jk in order to connect them together but now all ressources of my application must be located under Tomcat directory to be founded. As I want to put all static ressources directly under Apache, somebody can tell me what I have to configure in Apache or Tomcat to do this ? Thank you -- Faites un voeu et puis Voila ! www.voila.fr - 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: Apache + Tomcat + mod_jk
You'll need DocumentRoot, too. John Zach Gatu wrote: Where have you put your JSPs and/or servlets? If for example you've put them in tomcat-install/webapps/myfiles, then in your mod_jk conf file you need to put a directive like this: Alias /tcfiles tomcat-install/webapps/myfiles JkMount /tcfiles/servlet/* ajp13-wrk1 JkMount /tcfiles/*.jsp ajp13-wrk1 ajp13-wrk1 is a worker described in your workers.properties file This means that only files ending with *.jsp or starting with /servlet/ will be served by Tomcat. Anything else will be served by Apache. Zach. v.siguier wrote: Hello, I have configured Apache and Tomcat with mod_jk in order to connect them together but now all ressources of my application must be located under Tomcat directory to be founded. As I want to put all static ressources directly under Apache, somebody can tell me what I have to configure in Apache or Tomcat to do this ? Thank you -- Faites un voeu et puis Voila ! www.voila.fr - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat + mod_jk
Thanks for your help but I don't understand where I have to put these new lines... I have made changes in server.xml and I have created workers.properties (under Tomcat) in order to generate automatically mod_jk.conf. In Apache config file, I have made no changes for my new webapp... do I have to write any information concerning my application in httpd.conf ? You'll need DocumentRoot, too. John Zach Gatu wrote: Where have you put your JSPs and/or servlets? If for example you've put them in tomcat-install/webapps/myfiles, then in your mod_jk conf file you need to put a directive like this: Alias /tcfiles tomcat-install/webapps/myfiles JkMount /tcfiles/servlet/* ajp13-wrk1 JkMount /tcfiles/*.jsp ajp13-wrk1 ajp13-wrk1 is a worker described in your workers.properties file This means that only files ending with *.jsp or starting with /servlet/ will be served by Tomcat. Anything else will be served by Apache. Zach. v.siguier wrote: Hello, I have configured Apache and Tomcat with mod_jk in order to connect them together but now all ressources of my application must be located under Tomcat directory to be founded. As I want to put all static ressources directly under Apache, somebody can tell me what I have to configure in Apache or Tomcat to do this ? Thank you -- Faites un voeu et puis Voila ! www.voila.fr - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Faites un voeu et puis Voila ! www.voila.fr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache + Tomcat + mod_jk
We didn't know you were using the mod_jk.conf method. How about posting your dir structure, with a description of where you want your files to be, and then post the relevant VirtualHost block (sanitized if necessary) from mod_jk.conf? Then we can see what it is you have already so we don't go around in circles. The point of previous posts is that if you want Apache to serve static content from a certain location, you typically use DocumentRoot to specify that location. If the DocumentRoot in your mod_jk.conf file isn't working for you, you will have to consider 1) changing your dir structure and server.xml so that mod_jk.conf is created with a DocumentRoot that does work for you, or 2) changing where you put your files to fit with the current DocumentRoot that is being generated. John v.siguier wrote: Thanks for your help but I don't understand where I have to put these new lines... I have made changes in server.xml and I have created workers.properties (under Tomcat) in order to generate automatically mod_jk.conf. In Apache config file, I have made no changes for my new webapp... do I have to write any information concerning my application in httpd.conf ? You'll need DocumentRoot, too. John Zach Gatu wrote: Where have you put your JSPs and/or servlets? If for example you've put them in tomcat-install/webapps/myfiles, then in your mod_jk conf file you need to put a directive like this: Alias /tcfiles tomcat-install/webapps/myfiles JkMount /tcfiles/servlet/* ajp13-wrk1 JkMount /tcfiles/*.jsp ajp13-wrk1 ajp13-wrk1 is a worker described in your workers.properties file This means that only files ending with *.jsp or starting with /servlet/ will be served by Tomcat. Anything else will be served by Apache. Zach. v.siguier wrote: Hello, I have configured Apache and Tomcat with mod_jk in order to connect them together but now all ressources of my application must be located under Tomcat directory to be founded. As I want to put all static ressources directly under Apache, somebody can tell me what I have to configure in Apache or Tomcat to do this ? Thank you -- Faites un voeu et puis Voila ! www.voila.fr - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Faites un voeu et puis Voila ! www.voila.fr - 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: Apache + Tomcat + mod_jk
or 3) dispensing with the mod_jk.conf method and modifying httpd.conf manually to work in your environment. John John Turner wrote: We didn't know you were using the mod_jk.conf method. How about posting your dir structure, with a description of where you want your files to be, and then post the relevant VirtualHost block (sanitized if necessary) from mod_jk.conf? Then we can see what it is you have already so we don't go around in circles. The point of previous posts is that if you want Apache to serve static content from a certain location, you typically use DocumentRoot to specify that location. If the DocumentRoot in your mod_jk.conf file isn't working for you, you will have to consider 1) changing your dir structure and server.xml so that mod_jk.conf is created with a DocumentRoot that does work for you, or 2) changing where you put your files to fit with the current DocumentRoot that is being generated. John v.siguier wrote: Thanks for your help but I don't understand where I have to put these new lines... I have made changes in server.xml and I have created workers.properties (under Tomcat) in order to generate automatically mod_jk.conf. In Apache config file, I have made no changes for my new webapp... do I have to write any information concerning my application in httpd.conf ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache-Tomcat mod_jk Problem
Did you restart Tomcat to generate a new mod_jk.conf file? If so, did you also restart Apache so that it picks up the new changes? If so, can you post the new mod_jk.conf file that shows the new configuration? Have you tried it without using the Alias command in server.xml? John On Sat, 21 Jun 2003 11:55:16 -0700 (PDT), Sam at Yahoo [EMAIL PROTECTED] wrote: I tried both of your URLs and they seem to be working now! I'm trying to do the exact same thing...but am having problems. I've got it all working with localhost but can't get it working with my domain name (e.g. http://localhost/examples vs http://www.mydomain.com/examples). Can you give me any hints or suggestions on what I need to change in my httpd.conf and server.xml? I haven't set up any virtual hosts in my httpd.conf and have added the following Alias line in my server.xml (in Host definition): Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true Aliaswww.mydomain.com/Alias This didn't help me. Any suggestions? --- Dave Wicks [EMAIL PROTECTED] wrote: I have recently setup mod_jk with Apache 2.0.40 serving as a proxyfor Tomcat 4.1.24. The problem is that some redirects don't work correctly. e.g. Access the login.jsp on Tomcat directly (port 8080) login (tomcat/password), this works fine! http://funbox.hopto.org:8080/examples/jsp/security/protected/login.jsp then try the proxy: http://funbox.hopto.org/examples/jsp/security/protected/login.jsp This only results on a 404 from the Apache server. Can someone please suggest why? Also, would the remedy work over SSL? Many Thanks _ Hotmail is now available on Australian mobile phones. Go to http://ninemsn.com.au/mobilecentral/signup.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache-Tomcat mod_jk Problem
I tried both of your URLs and they seem to be working now! I'm trying to do the exact same thing...but am having problems. I've got it all working with localhost but can't get it working with my domain name (e.g. http://localhost/examples vs http://www.mydomain.com/examples). Can you give me any hints or suggestions on what I need to change in my httpd.conf and server.xml? I haven't set up any virtual hosts in my httpd.conf and have added the following Alias line in my server.xml (in Host definition): Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true Aliaswww.mydomain.com/Alias This didn't help me. Any suggestions? --- Dave Wicks [EMAIL PROTECTED] wrote: I have recently setup mod_jk with Apache 2.0.40 serving as a proxyfor Tomcat 4.1.24. The problem is that some redirects don't work correctly. e.g. Access the login.jsp on Tomcat directly (port 8080) login (tomcat/password), this works fine! http://funbox.hopto.org:8080/examples/jsp/security/protected/login.jsp then try the proxy: http://funbox.hopto.org/examples/jsp/security/protected/login.jsp This only results on a 404 from the Apache server. Can someone please suggest why? Also, would the remedy work over SSL? Many Thanks _ Hotmail is now available on Australian mobile phones. Go to http://ninemsn.com.au/mobilecentral/signup.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache-Tomcat mod_jk Problem
We'll need more information, like what are your JkMount statements, what are the contents of your workers.properties file, and what does mod_jk.log say when you make the request on port 80. You might want to increase JkLogLevel in Apache's httpd.conf to get more info in mod_jk.log. John On Thu, 19 Jun 2003 17:50:11 +, Dave Wicks [EMAIL PROTECTED] wrote: Hello, I have compiled and configure mod_jk for use with Apache 2.0.40 proxying for Tomcat 4.1.24. There seems to be a problem when I try out the example login.jsp. It works fine if I go directly to the tomcat server directly, but if I access it via the proxy then Apache returns 404 (not found). e.g this works http://funbox.hopto.org:8080/examples/jsp/security/protected/login.jsp user=tomcat/password=password this returns a 404 ;-( http://funbox.hopto.org/examples/jsp/security/protected/login.jsp I have scoured the mail archives for a solution, alas still no answer. Does anyone out there know what causes this? Finally can someone please inform me where I go to view the replies to this message, it was mentioned that there was a forum somewhere. Hope this is a 'smart question'. Many thanks in advance. Dave _ Get mobile Hotmail. Go to http://ninemsn.com.au/mobilecentral/signup.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache-Tomcat mod_jk
Thank you very much for your help. The instructions were easy enough to follow, with a few exceptions. I downloaded the mod_jk-1.3-eapi.so because as per the site, that was the module to use if I am running Apache 1.3 with mod_ssl. After doing all the steps I tried to restart Apache and got the following error message: Starting httpd: Syntax error on line 4 of /var/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf: Cannot load /etc/httpd/libexec/mod_jk.so into server: /etc/httpd/libexec/mod_jk.so: cannot open shared object file: No such file or directory I changed the path in the mod_jk.conf file to LoadModule jk_module /the/exact/path/to/mod_jk-1.3-eapi.so When I tried to restart Apache it restarted no problem. But now I cannot get to http://localhost:8080 when before I could. (http://localhost still works though) Any thoughts? In the meantime I am going back to double check everything. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:14 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat HOWTO #1: Yes. #2: No. :) You don't need ant. When I originally wrote the HOWTO, I thought you did, so I hacked through getting it to work and put that in my HOWTO. Then, based on a tip from someone on the list I learned that I didn't need to go through all that, all I needed to do was follow connector build option #2, which is using the standard ./configure method. So, basically, if you want to build the connector from source, all you have to do is (assuming a GNU-ready build environment): NOTE: the ./configure method assumes you have a sane build environment: libtool, GNU make, autoconf, m4 a) cd to CONNECTOR_HOME/jk/native. b) check README and README.configure. c) run buildconf.sh: ./buildconf.sh. This will create a file called configure in CONNECTOR_HOME/jk/native. d) run configure: ./configure --with-apxs=/some/path/to/apache/bin/apxs --with-java-home=${JAVA_HOME} e) run make: make g) You should end up with a mod_jk.so file in CONNECTOR_HOME/jk/native/apache-1.3. Copy that mod_jk.so file to /path/to/apache/libexec/. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:04 AM To: 'Tomcat Users List' Subject: Apache-Tomcat HOWTO Another trivial question... I am looking at John Turner's how-to's for setting up Apache 1.3.26 + Tomcat 4.0.4. There was a post that when reading the how-to's version numbers are not that critical. Will this document help me for my Apache 1.3.27/Tomcat 4.1.12 set up? If so, then does that mean I have to install ant? Thanks! Denise Mangano Complus Data Innovations, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache-Tomcat mod_jk
By the way - not sure if I have the right path to my apache/libexec, but other modules were in my /usr/lib/apache/ directory so that is where I placed this one... Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Denise Mangano Sent: Thursday, December 12, 2002 10:38 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Thank you very much for your help. The instructions were easy enough to follow, with a few exceptions. I downloaded the mod_jk-1.3-eapi.so because as per the site, that was the module to use if I am running Apache 1.3 with mod_ssl. After doing all the steps I tried to restart Apache and got the following error message: Starting httpd: Syntax error on line 4 of /var/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf: Cannot load /etc/httpd/libexec/mod_jk.so into server: /etc/httpd/libexec/mod_jk.so: cannot open shared object file: No such file or directory I changed the path in the mod_jk.conf file to LoadModule jk_module /the/exact/path/to/mod_jk-1.3-eapi.so When I tried to restart Apache it restarted no problem. But now I cannot get to http://localhost:8080 when before I could. (http://localhost still works though) Any thoughts? In the meantime I am going back to double check everything. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:14 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat HOWTO #1: Yes. #2: No. :) You don't need ant. When I originally wrote the HOWTO, I thought you did, so I hacked through getting it to work and put that in my HOWTO. Then, based on a tip from someone on the list I learned that I didn't need to go through all that, all I needed to do was follow connector build option #2, which is using the standard ./configure method. So, basically, if you want to build the connector from source, all you have to do is (assuming a GNU-ready build environment): NOTE: the ./configure method assumes you have a sane build environment: libtool, GNU make, autoconf, m4 a) cd to CONNECTOR_HOME/jk/native. b) check README and README.configure. c) run buildconf.sh: ./buildconf.sh. This will create a file called configure in CONNECTOR_HOME/jk/native. d) run configure: ./configure --with-apxs=/some/path/to/apache/bin/apxs --with-java-home=${JAVA_HOME} e) run make: make g) You should end up with a mod_jk.so file in CONNECTOR_HOME/jk/native/apache-1.3. Copy that mod_jk.so file to /path/to/apache/libexec/. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:04 AM To: 'Tomcat Users List' Subject: Apache-Tomcat HOWTO Another trivial question... I am looking at John Turner's how-to's for setting up Apache 1.3.26 + Tomcat 4.0.4. There was a post that when reading the how-to's version numbers are not that critical. Will this document help me for my Apache 1.3.27/Tomcat 4.1.12 set up? If so, then does that mean I have to install ant? Thanks! Denise Mangano Complus Data Innovations, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache-Tomcat mod_jk
Do you have a workers.properties file? Creating one is explained in my HOWTO...JK needs one to understand how to get to Tomcat. Do you have the JkMount statements in httpd.conf? Apache needs those to understand what to send to JK. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:38 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Thank you very much for your help. The instructions were easy enough to follow, with a few exceptions. I downloaded the mod_jk-1.3-eapi.so because as per the site, that was the module to use if I am running Apache 1.3 with mod_ssl. After doing all the steps I tried to restart Apache and got the following error message: Starting httpd: Syntax error on line 4 of /var/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf: Cannot load /etc/httpd/libexec/mod_jk.so into server: /etc/httpd/libexec/mod_jk.so: cannot open shared object file: No such file or directory I changed the path in the mod_jk.conf file to LoadModule jk_module /the/exact/path/to/mod_jk-1.3-eapi.so When I tried to restart Apache it restarted no problem. But now I cannot get to http://localhost:8080 when before I could. (http://localhost still works though) Any thoughts? In the meantime I am going back to double check everything. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:14 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat HOWTO #1: Yes. #2: No. :) You don't need ant. When I originally wrote the HOWTO, I thought you did, so I hacked through getting it to work and put that in my HOWTO. Then, based on a tip from someone on the list I learned that I didn't need to go through all that, all I needed to do was follow connector build option #2, which is using the standard ./configure method. So, basically, if you want to build the connector from source, all you have to do is (assuming a GNU-ready build environment): NOTE: the ./configure method assumes you have a sane build environment: libtool, GNU make, autoconf, m4 a) cd to CONNECTOR_HOME/jk/native. b) check README and README.configure. c) run buildconf.sh: ./buildconf.sh. This will create a file called configure in CONNECTOR_HOME/jk/native. d) run configure: ./configure --with-apxs=/some/path/to/apache/bin/apxs --with-java-home=${JAVA_HOME} e) run make: make g) You should end up with a mod_jk.so file in CONNECTOR_HOME/jk/native/apache-1.3. Copy that mod_jk.so file to /path/to/apache/libexec/. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:04 AM To: 'Tomcat Users List' Subject: Apache-Tomcat HOWTO Another trivial question... I am looking at John Turner's how-to's for setting up Apache 1.3.26 + Tomcat 4.0.4. There was a post that when reading the how-to's version numbers are not that critical. Will this document help me for my Apache 1.3.27/Tomcat 4.1.12 set up? If so, then does that mean I have to install ant? Thanks! Denise Mangano Complus Data Innovations, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache-Tomcat mod_jk
That's not really the standard place for them, but as long as Apache starts up there shouldn't be any problems. You can also check Apache config by: /some/path/to/apache/bin/apachectl configtest It's usually quicker than starting it up and stopping it all the time. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:40 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk By the way - not sure if I have the right path to my apache/libexec, but other modules were in my /usr/lib/apache/ directory so that is where I placed this one... Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Denise Mangano Sent: Thursday, December 12, 2002 10:38 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Thank you very much for your help. The instructions were easy enough to follow, with a few exceptions. I downloaded the mod_jk-1.3-eapi.so because as per the site, that was the module to use if I am running Apache 1.3 with mod_ssl. After doing all the steps I tried to restart Apache and got the following error message: Starting httpd: Syntax error on line 4 of /var/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf: Cannot load /etc/httpd/libexec/mod_jk.so into server: /etc/httpd/libexec/mod_jk.so: cannot open shared object file: No such file or directory I changed the path in the mod_jk.conf file to LoadModule jk_module /the/exact/path/to/mod_jk-1.3-eapi.so When I tried to restart Apache it restarted no problem. But now I cannot get to http://localhost:8080 when before I could. (http://localhost still works though) Any thoughts? In the meantime I am going back to double check everything. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:14 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat HOWTO #1: Yes. #2: No. :) You don't need ant. When I originally wrote the HOWTO, I thought you did, so I hacked through getting it to work and put that in my HOWTO. Then, based on a tip from someone on the list I learned that I didn't need to go through all that, all I needed to do was follow connector build option #2, which is using the standard ./configure method. So, basically, if you want to build the connector from source, all you have to do is (assuming a GNU-ready build environment): NOTE: the ./configure method assumes you have a sane build environment: libtool, GNU make, autoconf, m4 a) cd to CONNECTOR_HOME/jk/native. b) check README and README.configure. c) run buildconf.sh: ./buildconf.sh. This will create a file called configure in CONNECTOR_HOME/jk/native. d) run configure: ./configure --with-apxs=/some/path/to/apache/bin/apxs --with-java-home=${JAVA_HOME} e) run make: make g) You should end up with a mod_jk.so file in CONNECTOR_HOME/jk/native/apache-1.3. Copy that mod_jk.so file to /path/to/apache/libexec/. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:04 AM To: 'Tomcat Users List' Subject: Apache-Tomcat HOWTO Another trivial question... I am looking at John Turner's how-to's for setting up Apache 1.3.26 + Tomcat 4.0.4. There was a post that when reading the how-to's version numbers are not that critical. Will this document help me for my Apache 1.3.27/Tomcat 4.1.12 set up? If so, then does that mean I have to install ant? Thanks! Denise Mangano Complus Data Innovations, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache-Tomcat mod_jk
I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf file. I tried searching for info on the JkMount directive but could not find any. Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so? And where would I place that in the httpd.conf file? I just don't get why it was working before, but now it isn't Thanks again. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:52 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Do you have a workers.properties file? Creating one is explained in my HOWTO...JK needs one to understand how to get to Tomcat. Do you have the JkMount statements in httpd.conf? Apache needs those to understand what to send to JK. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:38 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Thank you very much for your help. The instructions were easy enough to follow, with a few exceptions. I downloaded the mod_jk-1.3-eapi.so because as per the site, that was the module to use if I am running Apache 1.3 with mod_ssl. After doing all the steps I tried to restart Apache and got the following error message: Starting httpd: Syntax error on line 4 of /var/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf: Cannot load /etc/httpd/libexec/mod_jk.so into server: /etc/httpd/libexec/mod_jk.so: cannot open shared object file: No such file or directory I changed the path in the mod_jk.conf file to LoadModule jk_module /the/exact/path/to/mod_jk-1.3-eapi.so When I tried to restart Apache it restarted no problem. But now I cannot get to http://localhost:8080 when before I could. (http://localhost still works though) Any thoughts? In the meantime I am going back to double check everything. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:14 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat HOWTO #1: Yes. #2: No. :) You don't need ant. When I originally wrote the HOWTO, I thought you did, so I hacked through getting it to work and put that in my HOWTO. Then, based on a tip from someone on the list I learned that I didn't need to go through all that, all I needed to do was follow connector build option #2, which is using the standard ./configure method. So, basically, if you want to build the connector from source, all you have to do is (assuming a GNU-ready build environment): NOTE: the ./configure method assumes you have a sane build environment: libtool, GNU make, autoconf, m4 a) cd to CONNECTOR_HOME/jk/native. b) check README and README.configure. c) run buildconf.sh: ./buildconf.sh. This will create a file called configure in CONNECTOR_HOME/jk/native. d) run configure: ./configure --with-apxs=/some/path/to/apache/bin/apxs --with-java-home=${JAVA_HOME} e) run make: make g) You should end up with a mod_jk.so file in CONNECTOR_HOME/jk/native/apache-1.3. Copy that mod_jk.so file to /path/to/apache/libexec/. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:04 AM To: 'Tomcat Users List' Subject: Apache-Tomcat HOWTO Another trivial question... I am looking at John Turner's how-to's for setting up Apache 1.3.26 + Tomcat 4.0.4. There was a post that when reading the how-to's version numbers are not that critical. Will this document help me for my Apache 1.3.27/Tomcat 4.1.12 set up? If so, then does that mean I have to install ant? Thanks! Denise Mangano Complus Data Innovations, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache-Tomcat mod_jk
The mod_jk.conf file should take care of your JkMounts as well as your LoadModule line, too. My bad, I just re-read your messagehttp://localhost works but localhost:8080 does not? If :8080 isn't working, that has nothing to do with Apache, I apologize for sending you down that path. Did your HTTP connector in server.xml on port 8080 get commented out somehow? That would be the only thing I can think of that would cause it not to respond to requests. Is there anything in the Catalina logs? John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:41 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf file. I tried searching for info on the JkMount directive but could not find any. Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so? And where would I place that in the httpd.conf file? I just don't get why it was working before, but now it isn't Thanks again. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:52 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Do you have a workers.properties file? Creating one is explained in my HOWTO...JK needs one to understand how to get to Tomcat. Do you have the JkMount statements in httpd.conf? Apache needs those to understand what to send to JK. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:38 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Thank you very much for your help. The instructions were easy enough to follow, with a few exceptions. I downloaded the mod_jk-1.3-eapi.so because as per the site, that was the module to use if I am running Apache 1.3 with mod_ssl. After doing all the steps I tried to restart Apache and got the following error message: Starting httpd: Syntax error on line 4 of /var/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf: Cannot load /etc/httpd/libexec/mod_jk.so into server: /etc/httpd/libexec/mod_jk.so: cannot open shared object file: No such file or directory I changed the path in the mod_jk.conf file to LoadModule jk_module /the/exact/path/to/mod_jk-1.3-eapi.so When I tried to restart Apache it restarted no problem. But now I cannot get to http://localhost:8080 when before I could. (http://localhost still works though) Any thoughts? In the meantime I am going back to double check everything. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:14 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat HOWTO #1: Yes. #2: No. :) You don't need ant. When I originally wrote the HOWTO, I thought you did, so I hacked through getting it to work and put that in my HOWTO. Then, based on a tip from someone on the list I learned that I didn't need to go through all that, all I needed to do was follow connector build option #2, which is using the standard ./configure method. So, basically, if you want to build the connector from source, all you have to do is (assuming a GNU-ready build environment): NOTE: the ./configure method assumes you have a sane build environment: libtool, GNU make, autoconf, m4 a) cd to CONNECTOR_HOME/jk/native. b) check README and README.configure. c) run buildconf.sh: ./buildconf.sh. This will create a file called configure in CONNECTOR_HOME/jk/native. d) run configure: ./configure --with-apxs=/some/path/to/apache/bin/apxs --with-java-home=${JAVA_HOME} e) run make: make g) You should end up with a mod_jk.so file in CONNECTOR_HOME/jk/native/apache-1.3. Copy that mod_jk.so file to /path/to/apache/libexec/. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:04 AM To: 'Tomcat Users List' Subject: Apache-Tomcat HOWTO Another trivial question... I am looking at John Turner's how-to's for setting up Apache 1.3.26 + Tomcat 4.0.4. There was a post that when reading the how-to's version numbers are not that critical. Will this document help me for my Apache 1.3.27/Tomcat 4.1.12 set up? If so, then does that mean I have to install ant? Thanks! Denise Mangano Complus Data Innovations, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED
RE: Apache-Tomcat mod_jk
You seem to be confused here. I believe you said you were accessing port 8080 when it was working. Now, unless you setup Apache to listen on port 8080, you were talking directly to Tomcat's web server. Now that you have moved to Apache, you want to drop the 8080 and use port 80, which Apache listens to by default (again, unless you changed it). I would suggest that you post all the lines you added to httpd.conf, your workers.properties conf file, and your server.xml file. The JkMount directive tells Apache what path gets mapped to Tomcat; see http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html for more information about the directive. HTH, Ben Ricker On Thu, 2002-12-12 at 10:41, Denise Mangano wrote: I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf file. I tried searching for info on the JkMount directive but could not find any. Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so? And where would I place that in the httpd.conf file? I just don't get why it was working before, but now it isn't Thanks again. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:52 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Do you have a workers.properties file? Creating one is explained in my HOWTO...JK needs one to understand how to get to Tomcat. Do you have the JkMount statements in httpd.conf? Apache needs those to understand what to send to JK. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:38 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Thank you very much for your help. The instructions were easy enough to follow, with a few exceptions. I downloaded the mod_jk-1.3-eapi.so because as per the site, that was the module to use if I am running Apache 1.3 with mod_ssl. After doing all the steps I tried to restart Apache and got the following error message: Starting httpd: Syntax error on line 4 of /var/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf: Cannot load /etc/httpd/libexec/mod_jk.so into server: /etc/httpd/libexec/mod_jk.so: cannot open shared object file: No such file or directory I changed the path in the mod_jk.conf file to LoadModule jk_module /the/exact/path/to/mod_jk-1.3-eapi.so When I tried to restart Apache it restarted no problem. But now I cannot get to http://localhost:8080 when before I could. (http://localhost still works though) Any thoughts? In the meantime I am going back to double check everything. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:14 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat HOWTO #1: Yes. #2: No. :) You don't need ant. When I originally wrote the HOWTO, I thought you did, so I hacked through getting it to work and put that in my HOWTO. Then, based on a tip from someone on the list I learned that I didn't need to go through all that, all I needed to do was follow connector build option #2, which is using the standard ./configure method. So, basically, if you want to build the connector from source, all you have to do is (assuming a GNU-ready build environment): NOTE: the ./configure method assumes you have a sane build environment: libtool, GNU make, autoconf, m4 a) cd to CONNECTOR_HOME/jk/native. b) check README and README.configure. c) run buildconf.sh: ./buildconf.sh. This will create a file called configure in CONNECTOR_HOME/jk/native. d) run configure: ./configure --with-apxs=/some/path/to/apache/bin/apxs --with-java-home=${JAVA_HOME} e) run make: make g) You should end up with a mod_jk.so file in CONNECTOR_HOME/jk/native/apache-1.3. Copy that mod_jk.so file to /path/to/apache/libexec/. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:04 AM To: 'Tomcat Users List' Subject: Apache-Tomcat HOWTO Another trivial question... I am looking at John Turner's how-to's for setting up Apache 1.3.26 + Tomcat 4.0.4. There was a post that when reading the how-to's version numbers are not that critical. Will this document help me for my Apache 1.3.27/Tomcat 4.1.12 set up? If so, then does that mean I have to install ant? Thanks! Denise Mangano Complus Data Innovations, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL
RE: Apache-Tomcat mod_jk
I pasted before I read the link below...that how-to is for 3.2. The one for 4.x is at http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/ajp.html. Another good How-to that I used to setup a load-balanced Apache-mod_jk-Tomcat 4.0.6 setup is at http://www.ubeans.com/tomcat/. Good luck, Ben Ricker On Thu, 2002-12-12 at 10:44, Ben Ricker wrote: You seem to be confused here. I believe you said you were accessing port 8080 when it was working. Now, unless you setup Apache to listen on port 8080, you were talking directly to Tomcat's web server. Now that you have moved to Apache, you want to drop the 8080 and use port 80, which Apache listens to by default (again, unless you changed it). I would suggest that you post all the lines you added to httpd.conf, your workers.properties conf file, and your server.xml file. The JkMount directive tells Apache what path gets mapped to Tomcat; see http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html for more information about the directive. HTH, Ben Ricker On Thu, 2002-12-12 at 10:41, Denise Mangano wrote: I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf file. I tried searching for info on the JkMount directive but could not find any. Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so? And where would I place that in the httpd.conf file? I just don't get why it was working before, but now it isn't Thanks again. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:52 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Do you have a workers.properties file? Creating one is explained in my HOWTO...JK needs one to understand how to get to Tomcat. Do you have the JkMount statements in httpd.conf? Apache needs those to understand what to send to JK. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:38 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Thank you very much for your help. The instructions were easy enough to follow, with a few exceptions. I downloaded the mod_jk-1.3-eapi.so because as per the site, that was the module to use if I am running Apache 1.3 with mod_ssl. After doing all the steps I tried to restart Apache and got the following error message: Starting httpd: Syntax error on line 4 of /var/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf: Cannot load /etc/httpd/libexec/mod_jk.so into server: /etc/httpd/libexec/mod_jk.so: cannot open shared object file: No such file or directory I changed the path in the mod_jk.conf file to LoadModule jk_module /the/exact/path/to/mod_jk-1.3-eapi.so When I tried to restart Apache it restarted no problem. But now I cannot get to http://localhost:8080 when before I could. (http://localhost still works though) Any thoughts? In the meantime I am going back to double check everything. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:14 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat HOWTO #1: Yes. #2: No. :) You don't need ant. When I originally wrote the HOWTO, I thought you did, so I hacked through getting it to work and put that in my HOWTO. Then, based on a tip from someone on the list I learned that I didn't need to go through all that, all I needed to do was follow connector build option #2, which is using the standard ./configure method. So, basically, if you want to build the connector from source, all you have to do is (assuming a GNU-ready build environment): NOTE: the ./configure method assumes you have a sane build environment: libtool, GNU make, autoconf, m4 a) cd to CONNECTOR_HOME/jk/native. b) check README and README.configure. c) run buildconf.sh: ./buildconf.sh. This will create a file called configure in CONNECTOR_HOME/jk/native. d) run configure: ./configure --with-apxs=/some/path/to/apache/bin/apxs --with-java-home=${JAVA_HOME} e) run make: make g) You should end up with a mod_jk.so file in CONNECTOR_HOME/jk/native/apache-1.3. Copy that mod_jk.so file to /path/to/apache/libexec/. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:04 AM To: 'Tomcat Users List' Subject: Apache-Tomcat
RE: Apache-Tomcat mod_jk
I think I am confused : ) I originally set up my website in Apache, and it is listening to port 80. I could access my website through http://localhost. I installed Tomcat (did not make any config changes). After the installation I still had access to http://localhost and to Tomcat's index page at http://localhost:8080. (At that point I could also access http://localhost:8080/examples/jsp/index.html. Now I still can access http://localhost but I can NOTaccess http://localhost:8080. Nor can I access the examples directory through either. I have made no port changes. The only change I made to the httpd.conf file was to add, at the very end, Include /usr/local/tomcat/conf/jk/mod_jk.conf (I changed a path to my mod_jk.so file in the generated mod_jk.conf file so I copied the custom conf file to the jk directory and pointed there (read that in another how-to)). I have ServerName defined as www.mydomain.com In my server.xml file: Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig / Host name=www.mydomain.com debug=0 appBase=webapps unpackWARs=true autoDeploy=true Listener className=org.apache.ajp.tomcat4.config.ApacheConfig append=true forwardAll=false / workers.properties: # BEGIN workers.properties # # Setup for apache system # # (optional) make this equal to CATALINA_HOME workers.tomcat_home=/var/jakarta-tomcat-4.1.12 # # (optional) make this equal to JAVA_HOME workers.java_home=/usr/local/j2sdk1.4.1 # ps=/ worker.list=ajp13 # Definition for Ajp13 worker # worker.ajp13.port=8009 # change this line to match apache ServerName and Host name in server.xml worker.ajp13.host=www.parkingticketpayment.com worker.ajp13.type=ajp13 # # END workers.properties I think I did everything right Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk You seem to be confused here. I believe you said you were accessing port 8080 when it was working. Now, unless you setup Apache to listen on port 8080, you were talking directly to Tomcat's web server. Now that you have moved to Apache, you want to drop the 8080 and use port 80, which Apache listens to by default (again, unless you changed it). I would suggest that you post all the lines you added to httpd.conf, your workers.properties conf file, and your server.xml file. The JkMount directive tells Apache what path gets mapped to Tomcat; see http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html for more information about the directive. HTH, Ben Ricker On Thu, 2002-12-12 at 10:41, Denise Mangano wrote: I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf file. I tried searching for info on the JkMount directive but could not find any. Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so? And where would I place that in the httpd.conf file? I just don't get why it was working before, but now it isn't Thanks again. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:52 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Do you have a workers.properties file? Creating one is explained in my HOWTO...JK needs one to understand how to get to Tomcat. Do you have the JkMount statements in httpd.conf? Apache needs those to understand what to send to JK. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:38 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Thank you very much for your help. The instructions were easy enough to follow, with a few exceptions. I downloaded the mod_jk-1.3-eapi.so because as per the site, that was the module to use if I am running Apache 1.3 with mod_ssl. After doing all the steps I tried to restart Apache and got the following error message: Starting httpd: Syntax error on line 4 of /var/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf: Cannot load /etc/httpd/libexec/mod_jk.so into server: /etc/httpd/libexec/mod_jk.so: cannot open shared object file: No such file or directory I changed the path in the mod_jk.conf file to LoadModule jk_module /the/exact/path/to/mod_jk-1.3-eapi.so When I tried to restart Apache it restarted no problem. But now I cannot get to http://localhost:8080 when before I could. (http://localhost still works though) Any thoughts? In the meantime I am going back to double check everything. Denise Mangano Help Desk Analyst
RE: Apache-Tomcat mod_jk
Nope, its not commented out in server.xml. I'm not too sure what I am looking for but from what I can tell there is nothing abnormal in the logs. Question though - which if this is the case, you may get angry with me for bothering you with my dumb questions For Service Name it says Tomcat-Standalone Why would it say standalone if I am using it only as a servlet/JSP container? Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:43 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk The mod_jk.conf file should take care of your JkMounts as well as your LoadModule line, too. My bad, I just re-read your messagehttp://localhost works but localhost:8080 does not? If :8080 isn't working, that has nothing to do with Apache, I apologize for sending you down that path. Did your HTTP connector in server.xml on port 8080 get commented out somehow? That would be the only thing I can think of that would cause it not to respond to requests. Is there anything in the Catalina logs? John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:41 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf file. I tried searching for info on the JkMount directive but could not find any. Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so? And where would I place that in the httpd.conf file? I just don't get why it was working before, but now it isn't Thanks again. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:52 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Do you have a workers.properties file? Creating one is explained in my HOWTO...JK needs one to understand how to get to Tomcat. Do you have the JkMount statements in httpd.conf? Apache needs those to understand what to send to JK. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:38 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Thank you very much for your help. The instructions were easy enough to follow, with a few exceptions. I downloaded the mod_jk-1.3-eapi.so because as per the site, that was the module to use if I am running Apache 1.3 with mod_ssl. After doing all the steps I tried to restart Apache and got the following error message: Starting httpd: Syntax error on line 4 of /var/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf: Cannot load /etc/httpd/libexec/mod_jk.so into server: /etc/httpd/libexec/mod_jk.so: cannot open shared object file: No such file or directory I changed the path in the mod_jk.conf file to LoadModule jk_module /the/exact/path/to/mod_jk-1.3-eapi.so When I tried to restart Apache it restarted no problem. But now I cannot get to http://localhost:8080 when before I could. (http://localhost still works though) Any thoughts? In the meantime I am going back to double check everything. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:14 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat HOWTO #1: Yes. #2: No. :) You don't need ant. When I originally wrote the HOWTO, I thought you did, so I hacked through getting it to work and put that in my HOWTO. Then, based on a tip from someone on the list I learned that I didn't need to go through all that, all I needed to do was follow connector build option #2, which is using the standard ./configure method. So, basically, if you want to build the connector from source, all you have to do is (assuming a GNU-ready build environment): NOTE: the ./configure method assumes you have a sane build environment: libtool, GNU make, autoconf, m4 a) cd to CONNECTOR_HOME/jk/native. b) check README and README.configure. c) run buildconf.sh: ./buildconf.sh. This will create a file called configure in CONNECTOR_HOME/jk/native. d) run configure: ./configure --with-apxs=/some/path/to/apache/bin/apxs --with-java-home=${JAVA_HOME} e) run make: make g) You should end up with a mod_jk.so file in CONNECTOR_HOME/jk/native/apache-1.3. Copy that mod_jk.so file to /path/to/apache/libexec/. John -Original Message- From: Denise Mangano [mailto
RE: Apache-Tomcat mod_jk
Does your server.xml have a line that looks like this: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / If it does, is that line commented out or otherwise disabled? In any case, if you have Apache setup, you don't need to access Tomcat on 8080. You should be able to access http://localhost/examples. That's the test to see if mod_jk is installed and working. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 12:08 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk I think I am confused : ) I originally set up my website in Apache, and it is listening to port 80. I could access my website through http://localhost. I installed Tomcat (did not make any config changes). After the installation I still had access to http://localhost and to Tomcat's index page at http://localhost:8080. (At that point I could also access http://localhost:8080/examples/jsp/index.html. Now I still can access http://localhost but I can NOTaccess http://localhost:8080. Nor can I access the examples directory through either. I have made no port changes. The only change I made to the httpd.conf file was to add, at the very end, Include /usr/local/tomcat/conf/jk/mod_jk.conf (I changed a path to my mod_jk.so file in the generated mod_jk.conf file so I copied the custom conf file to the jk directory and pointed there (read that in another how-to)). I have ServerName defined as www.mydomain.com In my server.xml file: Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig / Host name=www.mydomain.com debug=0 appBase=webapps unpackWARs=true autoDeploy=true Listener className=org.apache.ajp.tomcat4.config.ApacheConfig append=true forwardAll=false / workers.properties: # BEGIN workers.properties # # Setup for apache system # # (optional) make this equal to CATALINA_HOME workers.tomcat_home=/var/jakarta-tomcat-4.1.12 # # (optional) make this equal to JAVA_HOME workers.java_home=/usr/local/j2sdk1.4.1 # ps=/ worker.list=ajp13 # Definition for Ajp13 worker # worker.ajp13.port=8009 # change this line to match apache ServerName and Host name in server.xml worker.ajp13.host=www.parkingticketpayment.com worker.ajp13.type=ajp13 # # END workers.properties I think I did everything right Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk You seem to be confused here. I believe you said you were accessing port 8080 when it was working. Now, unless you setup Apache to listen on port 8080, you were talking directly to Tomcat's web server. Now that you have moved to Apache, you want to drop the 8080 and use port 80, which Apache listens to by default (again, unless you changed it). I would suggest that you post all the lines you added to httpd.conf, your workers.properties conf file, and your server.xml file. The JkMount directive tells Apache what path gets mapped to Tomcat; see http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.h tml for more information about the directive. HTH, Ben Ricker On Thu, 2002-12-12 at 10:41, Denise Mangano wrote: I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf file. I tried searching for info on the JkMount directive but could not find any. Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so? And where would I place that in the httpd.conf file? I just don't get why it was working before, but now it isn't Thanks again. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:52 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Do you have a workers.properties file? Creating one is explained in my HOWTO...JK needs one to understand how to get to Tomcat. Do you have the JkMount statements in httpd.conf? Apache needs those to understand what to send to JK. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:38 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Thank you very much for your help
RE: Apache-Tomcat mod_jk
On Thu, 2002-12-12 at 11:07, Denise Mangano wrote: I think I am confused : ) I originally set up my website in Apache, and it is listening to port 80. I could access my website through http://localhost. I installed Tomcat (did not make any config changes). After the installation I still had access to http://localhost and to Tomcat's index page at http://localhost:8080. (At that point I could also access http://localhost:8080/examples/jsp/index.html. Now I still can access http://localhost but I can NOTaccess http://localhost:8080. Nor can I access the examples directory through either. I have made no port changes. The only change I made to the httpd.conf file was to add, at the very end, Include /usr/local/tomcat/conf/jk/mod_jk.conf (I changed a path to my mod_jk.so file in the generated mod_jk.conf file so I copied the custom conf file to the jk directory and pointed there (read that in another how-to)). I have ServerName defined as www.mydomain.com Therein lies the problem: You must tell Apache, through the JkMount mentioned earlier, what paths will get mapped to Tomcat. For example, to run the examples through port 80 (and Apache), you would use the following: JkMount /examples/servlet/* ajp13 JkMount /examples/*.jsp ajp13 This will cause mod_jk to intercept requests for /examples/servlets and /examples/*.jsp and send the request to the worker called ajp13 and setup in your workers.properties file. If you have another web app you want to use (I use /servlets for my setup, just use the JkMount for the path and the worker. For example: JkMount /path/you/want ajp13 Hth, Ben Ricker In my server.xml file: Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig / Host name=www.mydomain.com debug=0 appBase=webapps unpackWARs=true autoDeploy=true Listener className=org.apache.ajp.tomcat4.config.ApacheConfig append=true forwardAll=false / workers.properties: # BEGIN workers.properties # # Setup for apache system # # (optional) make this equal to CATALINA_HOME workers.tomcat_home=/var/jakarta-tomcat-4.1.12 # # (optional) make this equal to JAVA_HOME workers.java_home=/usr/local/j2sdk1.4.1 # ps=/ worker.list=ajp13 # Definition for Ajp13 worker # worker.ajp13.port=8009 # change this line to match apache ServerName and Host name in server.xml worker.ajp13.host=www.parkingticketpayment.com worker.ajp13.type=ajp13 # # END workers.properties I think I did everything right Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk You seem to be confused here. I believe you said you were accessing port 8080 when it was working. Now, unless you setup Apache to listen on port 8080, you were talking directly to Tomcat's web server. Now that you have moved to Apache, you want to drop the 8080 and use port 80, which Apache listens to by default (again, unless you changed it). I would suggest that you post all the lines you added to httpd.conf, your workers.properties conf file, and your server.xml file. The JkMount directive tells Apache what path gets mapped to Tomcat; see http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html for more information about the directive. HTH, Ben Ricker On Thu, 2002-12-12 at 10:41, Denise Mangano wrote: I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf file. I tried searching for info on the JkMount directive but could not find any. Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so? And where would I place that in the httpd.conf file? I just don't get why it was working before, but now it isn't Thanks again. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:52 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Do you have a workers.properties file? Creating one is explained in my HOWTO...JK needs one to understand how to get to Tomcat. Do you have the JkMount statements in httpd.conf? Apache needs those to understand what to send to JK. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:38 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Thank you very much for your help. The instructions were easy enough to follow, with a few exceptions. I downloaded the mod_jk-1.3-eapi.so because as per the site
RE: Apache-Tomcat mod_jk
Tomcat uses a Java class called CoyoteConnector to receive requests. Those requests can use several different protocols: HTTP, HTTPS, JK, etc. There is a default CoyoteConnector configured on 8080...that is known as Tomcat Stand-alone and that's what people use when they want Tomcat to serve web content without using Apache. In other words, Tomcat can act as a regular webserver. If you were to change that Standalone port to 80, you wouldn't need Apache at all, but you'd have to run Tomcat for everything, and Tomcat doesn't handle things like CGI, PHP, etc. very well, whereas Apache does. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 12:14 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Nope, its not commented out in server.xml. I'm not too sure what I am looking for but from what I can tell there is nothing abnormal in the logs. Question though - which if this is the case, you may get angry with me for bothering you with my dumb questions For Service Name it says Tomcat-Standalone Why would it say standalone if I am using it only as a servlet/JSP container? Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:43 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk The mod_jk.conf file should take care of your JkMounts as well as your LoadModule line, too. My bad, I just re-read your messagehttp://localhost works but localhost:8080 does not? If :8080 isn't working, that has nothing to do with Apache, I apologize for sending you down that path. Did your HTTP connector in server.xml on port 8080 get commented out somehow? That would be the only thing I can think of that would cause it not to respond to requests. Is there anything in the Catalina logs? John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:41 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf file. I tried searching for info on the JkMount directive but could not find any. Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so? And where would I place that in the httpd.conf file? I just don't get why it was working before, but now it isn't Thanks again. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:52 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Do you have a workers.properties file? Creating one is explained in my HOWTO...JK needs one to understand how to get to Tomcat. Do you have the JkMount statements in httpd.conf? Apache needs those to understand what to send to JK. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:38 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Thank you very much for your help. The instructions were easy enough to follow, with a few exceptions. I downloaded the mod_jk-1.3-eapi.so because as per the site, that was the module to use if I am running Apache 1.3 with mod_ssl. After doing all the steps I tried to restart Apache and got the following error message: Starting httpd: Syntax error on line 4 of /var/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf: Cannot load /etc/httpd/libexec/mod_jk.so into server: /etc/httpd/libexec/mod_jk.so: cannot open shared object file: No such file or directory I changed the path in the mod_jk.conf file to LoadModule jk_module /the/exact/path/to/mod_jk-1.3-eapi.so When I tried to restart Apache it restarted no problem. But now I cannot get to http://localhost:8080 when before I could. (http://localhost still works though) Any thoughts? In the meantime I am going back to double check everything. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 9:14 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat HOWTO #1: Yes. #2: No. :) You don't need ant. When I originally wrote the HOWTO, I thought you did, so I hacked through getting it to work and put that in my HOWTO. Then, based on a tip from someone on the list I learned that I didn't
RE: Apache-Tomcat mod_jk
mod_jk.conf has JkMount statements in it. John -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 12:19 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk On Thu, 2002-12-12 at 11:07, Denise Mangano wrote: I think I am confused : ) I originally set up my website in Apache, and it is listening to port 80. I could access my website through http://localhost. I installed Tomcat (did not make any config changes). After the installation I still had access to http://localhost and to Tomcat's index page at http://localhost:8080. (At that point I could also access http://localhost:8080/examples/jsp/index.html. Now I still can access http://localhost but I can NOTaccess http://localhost:8080. Nor can I access the examples directory through either. I have made no port changes. The only change I made to the httpd.conf file was to add, at the very end, Include /usr/local/tomcat/conf/jk/mod_jk.conf (I changed a path to my mod_jk.so file in the generated mod_jk.conf file so I copied the custom conf file to the jk directory and pointed there (read that in another how-to)). I have ServerName defined as www.mydomain.com Therein lies the problem: You must tell Apache, through the JkMount mentioned earlier, what paths will get mapped to Tomcat. For example, to run the examples through port 80 (and Apache), you would use the following: JkMount /examples/servlet/* ajp13 JkMount /examples/*.jsp ajp13 This will cause mod_jk to intercept requests for /examples/servlets and /examples/*.jsp and send the request to the worker called ajp13 and setup in your workers.properties file. If you have another web app you want to use (I use /servlets for my setup, just use the JkMount for the path and the worker. For example: JkMount /path/you/want ajp13 Hth, Ben Ricker In my server.xml file: Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig / Host name=www.mydomain.com debug=0 appBase=webapps unpackWARs=true autoDeploy=true Listener className=org.apache.ajp.tomcat4.config.ApacheConfig append=true forwardAll=false / workers.properties: # BEGIN workers.properties # # Setup for apache system # # (optional) make this equal to CATALINA_HOME workers.tomcat_home=/var/jakarta-tomcat-4.1.12 # # (optional) make this equal to JAVA_HOME workers.java_home=/usr/local/j2sdk1.4.1 # ps=/ worker.list=ajp13 # Definition for Ajp13 worker # worker.ajp13.port=8009 # change this line to match apache ServerName and Host name in server.xml worker.ajp13.host=www.parkingticketpayment.com worker.ajp13.type=ajp13 # # END workers.properties I think I did everything right Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk You seem to be confused here. I believe you said you were accessing port 8080 when it was working. Now, unless you setup Apache to listen on port 8080, you were talking directly to Tomcat's web server. Now that you have moved to Apache, you want to drop the 8080 and use port 80, which Apache listens to by default (again, unless you changed it). I would suggest that you post all the lines you added to httpd.conf, your workers.properties conf file, and your server.xml file. The JkMount directive tells Apache what path gets mapped to Tomcat; see http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.h tml for more information about the directive. HTH, Ben Ricker On Thu, 2002-12-12 at 10:41, Denise Mangano wrote: I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf file. I tried searching for info on the JkMount directive but could not find any. Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so? And where would I place that in the httpd.conf file? I just don't get why it was working before, but now it isn't Thanks again. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:52 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Do you have a workers.properties file? Creating one is explained in my HOWTO...JK needs one to understand how to get to Tomcat. Do you have the JkMount statements in httpd.conf? Apache needs those
RE: Apache-Tomcat mod_jk
John - Yes I do have that code, it is not commented out. But I can still not access the examples. As I mentioned before, it appears that after this mod_jk installation I can no longer access Tomcat at all (shouldn't I still be able to view http://localhost:8080). Before I installed mod_jk I could access everything in Tomcat... Maybe it is a good idea to start over with Tomcat from scratch? Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 12:11 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Does your server.xml have a line that looks like this: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / If it does, is that line commented out or otherwise disabled? In any case, if you have Apache setup, you don't need to access Tomcat on 8080. You should be able to access http://localhost/examples. That's the test to see if mod_jk is installed and working. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 12:08 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk I think I am confused : ) I originally set up my website in Apache, and it is listening to port 80. I could access my website through http://localhost. I installed Tomcat (did not make any config changes). After the installation I still had access to http://localhost and to Tomcat's index page at http://localhost:8080. (At that point I could also access http://localhost:8080/examples/jsp/index.html. Now I still can access http://localhost but I can NOTaccess http://localhost:8080. Nor can I access the examples directory through either. I have made no port changes. The only change I made to the httpd.conf file was to add, at the very end, Include /usr/local/tomcat/conf/jk/mod_jk.conf (I changed a path to my mod_jk.so file in the generated mod_jk.conf file so I copied the custom conf file to the jk directory and pointed there (read that in another how-to)). I have ServerName defined as www.mydomain.com In my server.xml file: Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig / Host name=www.mydomain.com debug=0 appBase=webapps unpackWARs=true autoDeploy=true Listener className=org.apache.ajp.tomcat4.config.ApacheConfig append=true forwardAll=false / workers.properties: # BEGIN workers.properties # # Setup for apache system # # (optional) make this equal to CATALINA_HOME workers.tomcat_home=/var/jakarta-tomcat-4.1.12 # # (optional) make this equal to JAVA_HOME workers.java_home=/usr/local/j2sdk1.4.1 # ps=/ worker.list=ajp13 # Definition for Ajp13 worker # worker.ajp13.port=8009 # change this line to match apache ServerName and Host name in server.xml worker.ajp13.host=www.parkingticketpayment.com worker.ajp13.type=ajp13 # # END workers.properties I think I did everything right Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk You seem to be confused here. I believe you said you were accessing port 8080 when it was working. Now, unless you setup Apache to listen on port 8080, you were talking directly to Tomcat's web server. Now that you have moved to Apache, you want to drop the 8080 and use port 80, which Apache listens to by default (again, unless you changed it). I would suggest that you post all the lines you added to httpd.conf, your workers.properties conf file, and your server.xml file. The JkMount directive tells Apache what path gets mapped to Tomcat; see http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.h tml for more information about the directive. HTH, Ben Ricker On Thu, 2002-12-12 at 10:41, Denise Mangano wrote: I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf file. I tried searching for info on the JkMount directive but could not find any. Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so? And where would I place that in the httpd.conf file? I just don't get why it was working before, but now it isn't Thanks again. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED
RE: Apache-Tomcat mod_jk
Ben - Thank you for taking the time to look :), but as John mentioned the JkMount statements are included in the mod_jk.conf file Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 12:19 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk On Thu, 2002-12-12 at 11:07, Denise Mangano wrote: I think I am confused : ) I originally set up my website in Apache, and it is listening to port 80. I could access my website through http://localhost. I installed Tomcat (did not make any config changes). After the installation I still had access to http://localhost and to Tomcat's index page at http://localhost:8080. (At that point I could also access http://localhost:8080/examples/jsp/index.html. Now I still can access http://localhost but I can NOTaccess http://localhost:8080. Nor can I access the examples directory through either. I have made no port changes. The only change I made to the httpd.conf file was to add, at the very end, Include /usr/local/tomcat/conf/jk/mod_jk.conf (I changed a path to my mod_jk.so file in the generated mod_jk.conf file so I copied the custom conf file to the jk directory and pointed there (read that in another how-to)). I have ServerName defined as www.mydomain.com Therein lies the problem: You must tell Apache, through the JkMount mentioned earlier, what paths will get mapped to Tomcat. For example, to run the examples through port 80 (and Apache), you would use the following: JkMount /examples/servlet/* ajp13 JkMount /examples/*.jsp ajp13 This will cause mod_jk to intercept requests for /examples/servlets and /examples/*.jsp and send the request to the worker called ajp13 and setup in your workers.properties file. If you have another web app you want to use (I use /servlets for my setup, just use the JkMount for the path and the worker. For example: JkMount /path/you/want ajp13 Hth, Ben Ricker In my server.xml file: Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig / Host name=www.mydomain.com debug=0 appBase=webapps unpackWARs=true autoDeploy=true Listener className=org.apache.ajp.tomcat4.config.ApacheConfig append=true forwardAll=false / workers.properties: # BEGIN workers.properties # # Setup for apache system # # (optional) make this equal to CATALINA_HOME workers.tomcat_home=/var/jakarta-tomcat-4.1.12 # # (optional) make this equal to JAVA_HOME workers.java_home=/usr/local/j2sdk1.4.1 # ps=/ worker.list=ajp13 # Definition for Ajp13 worker # worker.ajp13.port=8009 # change this line to match apache ServerName and Host name in server.xml worker.ajp13.host=www.parkingticketpayment.com worker.ajp13.type=ajp13 # # END workers.properties I think I did everything right Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk You seem to be confused here. I believe you said you were accessing port 8080 when it was working. Now, unless you setup Apache to listen on port 8080, you were talking directly to Tomcat's web server. Now that you have moved to Apache, you want to drop the 8080 and use port 80, which Apache listens to by default (again, unless you changed it). I would suggest that you post all the lines you added to httpd.conf, your workers.properties conf file, and your server.xml file. The JkMount directive tells Apache what path gets mapped to Tomcat; see http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html for more information about the directive. HTH, Ben Ricker On Thu, 2002-12-12 at 10:41, Denise Mangano wrote: I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf file. I tried searching for info on the JkMount directive but could not find any. Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so? And where would I place that in the httpd.conf file? I just don't get why it was working before, but now it isn't Thanks again. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 10:52 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Do you have a workers.properties file? Creating one is explained in my HOWTO...JK needs one to understand how to get to Tomcat. Do you have the JkMount statements in httpd.conf? Apache needs those to understand what to send to JK
RE: Apache-Tomcat mod_jk
Installing mod_jk to Apache shouldn't have done anything to Tomcat. If I had to guess, I would guess that there is probably a typo in server.xml from when you added the ApacheConfig Listeners to generate mod_jk.conf automatically. The typo (if it's there) is probably causing Tomcat not to even startup. Is Tomcat even running? Anything in the Tomcat logs? John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 12:37 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk John - Yes I do have that code, it is not commented out. But I can still not access the examples. As I mentioned before, it appears that after this mod_jk installation I can no longer access Tomcat at all (shouldn't I still be able to view http://localhost:8080). Before I installed mod_jk I could access everything in Tomcat... Maybe it is a good idea to start over with Tomcat from scratch? Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 12:11 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Does your server.xml have a line that looks like this: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / If it does, is that line commented out or otherwise disabled? In any case, if you have Apache setup, you don't need to access Tomcat on 8080. You should be able to access http://localhost/examples. That's the test to see if mod_jk is installed and working. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 12:08 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk I think I am confused : ) I originally set up my website in Apache, and it is listening to port 80. I could access my website through http://localhost. I installed Tomcat (did not make any config changes). After the installation I still had access to http://localhost and to Tomcat's index page at http://localhost:8080. (At that point I could also access http://localhost:8080/examples/jsp/index.html. Now I still can access http://localhost but I can NOTaccess http://localhost:8080. Nor can I access the examples directory through either. I have made no port changes. The only change I made to the httpd.conf file was to add, at the very end, Include /usr/local/tomcat/conf/jk/mod_jk.conf (I changed a path to my mod_jk.so file in the generated mod_jk.conf file so I copied the custom conf file to the jk directory and pointed there (read that in another how-to)). I have ServerName defined as www.mydomain.com In my server.xml file: Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig / Host name=www.mydomain.com debug=0 appBase=webapps unpackWARs=true autoDeploy=true Listener className=org.apache.ajp.tomcat4.config.ApacheConfig append=true forwardAll=false / workers.properties: # BEGIN workers.properties # # Setup for apache system # # (optional) make this equal to CATALINA_HOME workers.tomcat_home=/var/jakarta-tomcat-4.1.12 # # (optional) make this equal to JAVA_HOME workers.java_home=/usr/local/j2sdk1.4.1 # ps=/ worker.list=ajp13 # Definition for Ajp13 worker # worker.ajp13.port=8009 # change this line to match apache ServerName and Host name in server.xml worker.ajp13.host=www.parkingticketpayment.com worker.ajp13.type=ajp13 # # END workers.properties I think I did everything right Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk You seem to be confused here. I believe you said you were accessing port 8080 when it was working. Now, unless you setup Apache to listen on port 8080, you were talking directly to Tomcat's web server. Now that you have moved to Apache, you want to drop the 8080 and use port 80, which Apache listens to by default (again, unless you changed it). I would suggest that you post all the lines you added to httpd.conf, your workers.properties conf file, and your server.xml file. The JkMount directive tells Apache what path gets mapped to Tomcat; see http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.h tml for more information about the directive. HTH, Ben Ricker On Thu, 2002-12-12 at 10:41
RE: Apache-Tomcat mod_jk
You may be right. Tomcat was started, but the log hadn't been updated in the past hour There has to be an error somewhere. I am going to try starting over. (No one said it would be easy :) ) Thanks for all your help, and I will send an update... Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 12:41 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Installing mod_jk to Apache shouldn't have done anything to Tomcat. If I had to guess, I would guess that there is probably a typo in server.xml from when you added the ApacheConfig Listeners to generate mod_jk.conf automatically. The typo (if it's there) is probably causing Tomcat not to even startup. Is Tomcat even running? Anything in the Tomcat logs? John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 12:37 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk John - Yes I do have that code, it is not commented out. But I can still not access the examples. As I mentioned before, it appears that after this mod_jk installation I can no longer access Tomcat at all (shouldn't I still be able to view http://localhost:8080). Before I installed mod_jk I could access everything in Tomcat... Maybe it is a good idea to start over with Tomcat from scratch? Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 12:11 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Does your server.xml have a line that looks like this: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false / If it does, is that line commented out or otherwise disabled? In any case, if you have Apache setup, you don't need to access Tomcat on 8080. You should be able to access http://localhost/examples. That's the test to see if mod_jk is installed and working. John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 12:08 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk I think I am confused : ) I originally set up my website in Apache, and it is listening to port 80. I could access my website through http://localhost. I installed Tomcat (did not make any config changes). After the installation I still had access to http://localhost and to Tomcat's index page at http://localhost:8080. (At that point I could also access http://localhost:8080/examples/jsp/index.html. Now I still can access http://localhost but I can NOTaccess http://localhost:8080. Nor can I access the examples directory through either. I have made no port changes. The only change I made to the httpd.conf file was to add, at the very end, Include /usr/local/tomcat/conf/jk/mod_jk.conf (I changed a path to my mod_jk.so file in the generated mod_jk.conf file so I copied the custom conf file to the jk directory and pointed there (read that in another how-to)). I have ServerName defined as www.mydomain.com In my server.xml file: Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig / Host name=www.mydomain.com debug=0 appBase=webapps unpackWARs=true autoDeploy=true Listener className=org.apache.ajp.tomcat4.config.ApacheConfig append=true forwardAll=false / workers.properties: # BEGIN workers.properties # # Setup for apache system # # (optional) make this equal to CATALINA_HOME workers.tomcat_home=/var/jakarta-tomcat-4.1.12 # # (optional) make this equal to JAVA_HOME workers.java_home=/usr/local/j2sdk1.4.1 # ps=/ worker.list=ajp13 # Definition for Ajp13 worker # worker.ajp13.port=8009 # change this line to match apache ServerName and Host name in server.xml worker.ajp13.host=www.parkingticketpayment.com worker.ajp13.type=ajp13 # # END workers.properties I think I did everything right Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Ben Ricker [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk You seem to be confused here. I believe you said you were accessing port 8080 when it was working. Now, unless you setup Apache to listen on port 8080, you were talking directly to Tomcat's web server. Now that you have moved to Apache, you want to drop
RE: Apache-Tomcat mod_jk
On Thu, 12 Dec 2002, Denise Mangano wrote: Nope, its not commented out in server.xml. I'm not too sure what I am looking for but from what I can tell there is nothing abnormal in the logs. Question though - which if this is the case, you may get angry with me for bothering you with my dumb questions For Service Name it says Tomcat-Standalone Why would it say standalone if I am using it only as a servlet/JSP container? All this stuff (what appears in the logs, what services/connectors/etc. are running, etc.) all depends on what you have in your server.xml. For example, in there you can define one or more Service's, each of which can have one or more Connector's. When Tomcat starts up, you'll get a line in that log for each Service; so perhaps you only have one, and its name happens to be Tomcat-Standalone (the name is defined in the Service tag). That is one of the Service's that comes in Tomcat's server.xml out of the box (I think it has two, perhaps you've commented one out). Now, that name may be misleading, because it's arbitrary, and even with one Service you can have multiplce Connector's. So it may not just be Tomcat-Standalone that you are running. Connector's are basically access points into Tomcat, and they can either be standalone, like the HttpConnector, or through a web server, like Ajp13Connector. The new CoyoteConnector is kind of special, I believe, as it can handle multiple protocols (like both HTTP and AJP). So you should really look at what Connector's you have set up to see what should be going on. That's why someone suggested you post your whole server.xml, it will allow people here to get a totally clear idea of what you have setup. BTW, out of the box, Tomcat Standalone runs on port 8080. So whether or not you get something on that port depends on whether you have an appropriate Connector set up. And if you plan to always use Tomcat behind Apache, you might want to disable/comment out that Connector (although sometimes it's good to have for testing purposes). -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:43 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk The mod_jk.conf file should take care of your JkMounts as well as your LoadModule line, too. My bad, I just re-read your messagehttp://localhost works but localhost:8080 does not? If :8080 isn't working, that has nothing to do with Apache, I apologize for sending you down that path. Did your HTTP connector in server.xml on port 8080 get commented out somehow? That would be the only thing I can think of that would cause it not to respond to requests. Is there anything in the Catalina logs? John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:41 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf file. I tried searching for info on the JkMount directive but could not find any. Do I place JkMount path/to/modules/mod_jk-1.3-eapi.so? And where would I place that in the httpd.conf file? I just don't get why it was working before, but now it isn't Thanks again. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. [ ... ] Milt Epstein Research Programmer Integration and Software Engineering (ISE) Campus Information Technologies and Educational Services (CITES) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache-Tomcat mod_jk
Well I took the novice route and started all over again. I got Tomcat 4.1.12 itself back up and running, but without mod_jk installed. I haven't had a chance to get back to trying again today, but I will tomorrow. If I run into the same problems, I will post my entire server.xml file, and hopefully all you nice people will find something that my untrained eyes cant. Maybe a little background on my project will help determine exactly what it is that I need. I have a site running on Apache 1.3.27 (mostly HTML, some XML) on RedHat 7.3. This site, through a connector, is pulling information from a UNIX system. That part works fine. I get to the last screen, where the connection to UNIX is broken, but not before I am passed a transaction number. I then direct the user to an HTML form, where I collect all their credit card information. This is the point I am at now. What I need to do from here is collect the info and transmit it to the payment processor through an API call, which I will either use servlet or JSP. Then I will display an updated page that varies depending on what the response is from the payment processor. All this over a secure connection of course (which from what I understand will be another battle). I then have to send the info I receive back to the UNIX system to be updated. (If anyone has any experience in a similar situation or any input regarding this project it is definitely welcome). Hope the background paints a clearer picture... Will post tomorrow when I try to set up mod_jk again. Thanks! Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Milt Epstein [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 3:17 PM To: Tomcat Users List Subject: RE: Apache-Tomcat mod_jk On Thu, 12 Dec 2002, Denise Mangano wrote: Nope, its not commented out in server.xml. I'm not too sure what I am looking for but from what I can tell there is nothing abnormal in the logs. Question though - which if this is the case, you may get angry with me for bothering you with my dumb questions For Service Name it says Tomcat-Standalone Why would it say standalone if I am using it only as a servlet/JSP container? All this stuff (what appears in the logs, what services/connectors/etc. are running, etc.) all depends on what you have in your server.xml. For example, in there you can define one or more Service's, each of which can have one or more Connector's. When Tomcat starts up, you'll get a line in that log for each Service; so perhaps you only have one, and its name happens to be Tomcat-Standalone (the name is defined in the Service tag). That is one of the Service's that comes in Tomcat's server.xml out of the box (I think it has two, perhaps you've commented one out). Now, that name may be misleading, because it's arbitrary, and even with one Service you can have multiplce Connector's. So it may not just be Tomcat-Standalone that you are running. Connector's are basically access points into Tomcat, and they can either be standalone, like the HttpConnector, or through a web server, like Ajp13Connector. The new CoyoteConnector is kind of special, I believe, as it can handle multiple protocols (like both HTTP and AJP). So you should really look at what Connector's you have set up to see what should be going on. That's why someone suggested you post your whole server.xml, it will allow people here to get a totally clear idea of what you have setup. BTW, out of the box, Tomcat Standalone runs on port 8080. So whether or not you get something on that port depends on whether you have an appropriate Connector set up. And if you plan to always use Tomcat behind Apache, you might want to disable/comment out that Connector (although sometimes it's good to have for testing purposes). -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:43 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk The mod_jk.conf file should take care of your JkMounts as well as your LoadModule line, too. My bad, I just re-read your messagehttp://localhost works but localhost:8080 does not? If :8080 isn't working, that has nothing to do with Apache, I apologize for sending you down that path. Did your HTTP connector in server.xml on port 8080 get commented out somehow? That would be the only thing I can think of that would cause it not to respond to requests. Is there anything in the Catalina logs? John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 11:41 AM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk I do have a workers.properties file. I checked that, my server.xml, and my httpd.conf and all server names are the same. I thought the mod_jk.conf file took care of the LoadModule directive that I would have had to place in my httpd.conf
RE: Apache-Tomcat mod_jk
Tell your boss you have the wrong title. ;) John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 4:42 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Well I took the novice route and started all over again. I got Tomcat 4.1.12 itself back up and running, but without mod_jk installed. I haven't had a chance to get back to trying again today, but I will tomorrow. If I run into the same problems, I will post my entire server.xml file, and hopefully all you nice people will find something that my untrained eyes cant. Maybe a little background on my project will help determine exactly what it is that I need. I have a site running on Apache 1.3.27 (mostly HTML, some XML) on RedHat 7.3. This site, through a connector, is pulling information from a UNIX system. That part works fine. I get to the last screen, where the connection to UNIX is broken, but not before I am passed a transaction number. I then direct the user to an HTML form, where I collect all their credit card information. This is the point I am at now. What I need to do from here is collect the info and transmit it to the payment processor through an API call, which I will either use servlet or JSP. Then I will display an updated page that varies depending on what the response is from the payment processor. All this over a secure connection of course (which from what I understand will be another battle). I then have to send the info I receive back to the UNIX system to be updated. (If anyone has any experience in a similar situation or any input regarding this project it is definitely welcome). Hope the background paints a clearer picture... Will post tomorrow when I try to set up mod_jk again. Thanks! Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache-Tomcat mod_jk
We're working on changing it as we speak :) I started here at this position - going for my Master's now (full time mind you - have final tonight in Java - yikes), and really want to get into programming - so I was given an opportunity. Originally project was going to be done on IIS which would have my world easier, but turns out this connector I mentioned is third party and they require Apache. Its great because it is definitely a learning experience, and I am enjoying it, but trying to learn a new technology on a deadline (without someone lecturing it to you) is turning out to be a very big task. Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 4:42 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Tell your boss you have the wrong title. ;) John -Original Message- From: Denise Mangano [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 4:42 PM To: 'Tomcat Users List' Subject: RE: Apache-Tomcat mod_jk Well I took the novice route and started all over again. I got Tomcat 4.1.12 itself back up and running, but without mod_jk installed. I haven't had a chance to get back to trying again today, but I will tomorrow. If I run into the same problems, I will post my entire server.xml file, and hopefully all you nice people will find something that my untrained eyes cant. Maybe a little background on my project will help determine exactly what it is that I need. I have a site running on Apache 1.3.27 (mostly HTML, some XML) on RedHat 7.3. This site, through a connector, is pulling information from a UNIX system. That part works fine. I get to the last screen, where the connection to UNIX is broken, but not before I am passed a transaction number. I then direct the user to an HTML form, where I collect all their credit card information. This is the point I am at now. What I need to do from here is collect the info and transmit it to the payment processor through an API call, which I will either use servlet or JSP. Then I will display an updated page that varies depending on what the response is from the payment processor. All this over a secure connection of course (which from what I understand will be another battle). I then have to send the info I receive back to the UNIX system to be updated. (If anyone has any experience in a similar situation or any input regarding this project it is definitely welcome). Hope the background paints a clearer picture... Will post tomorrow when I try to set up mod_jk again. Thanks! Denise Mangano Help Desk Analyst Complus Data Innovations, Inc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache Tomcat mod_jk problem
Hi, I did have a similar setup so I hope my comments below help you. Regards, Glenn Drew --- Director GEESOFT PTY LTD - Original Message - From: R. C. Hill [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 03, 2002 7:38 PM Subject: Apache Tomcat mod_jk problem Hi, I'm trying to use the mod_jk connector with Apache 2.0.43 (Win32) and Tomcat 4.1.10. When I add the Include c:/tomcat/conf/auto/mod_jk.conf line in the apache httpd.conf file, apache will not start. No sign of an error in the error.log file. I'm stumped...it should work?! Does anyone know what I'm doing wrong? I configured them as follows: 1.) I downloaded the mod_jk-2.0.43.dll and placed it in the C:\Program Files\Apache Group\Apache2\modules directory Good. 2.) Created workers.properties in the C:\tomcat\conf\jk directory. # (optional) make this equal to CATALINA_HOME workers.CATALINA_HOME=C:\tomcat # (optional) make this equal to JAVA_HOME workers.java_home=C:\j2sdk1.4.0_01 # Windows uses back slashes ps=\ worker.list=ajp13 # Definition for Ajp13 worker worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 Good So far. 3.) I added the following to tomcat's server.xml: After the Server port=8005 ... declaration: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=C:\Program Files\Apache Group\Apache2\modules\mod_jk-2.0.43.dll jkDebug=info workersConfig=C:\tomcat\conf\jk\workers.properties jkLog=C:\tomcat\logs\mod_jk.log/ I felt that hard coding my mod_jk.conf file rather than dynamically building it more useful particularily when you change things. I have attached both my workers.properties and mod_jk-manual.conf file. Use it if you like. Copy the file into the mod_jk.conf directory and change the end of httpd.conf to: Include c:/tomcat/conf/auto/mod_jk-manual.conf (I do not use quotes) Also, when you refer to the module, use c:\progra~1\apache~1\apache2\modules\mod_jk-2.0.43.dll and keep it on the same line. This should make no difference, but just to be safe. !-- Define an AJP 1.3 Connector on port 8009 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ I use the Coyote/JK2 AJP 1.3 Connector and set to port 8009 !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true Good 4.) Added to the end of the apache httpd.conf file: Include c:/tomcat/conf/auto/mod_jk.conf Beware if you use the manual file to make sure the filename is correct. 5.) The contents of C:\tomcat\conf\auto\mod_jk.conf shows: IfModule !mod_jk.c LoadModule jk_module C:/Program Files/Apache Group/Apache2/modules/mod_jk-1.3.27.dll Ahh! You quoted mod_jk-2.0.43.dll in your server.xml. But it is wrong here. Check to make sure it is consistent with whatever you named the module in Apachehome\modules. /IfModule JkWorkersFile C:/tomcat/conf/jk/workers.properties JkLogFile C:/tomcat/logs/mod_jk.log JkLogLevel info You also need to create a servlet Context in server.xml and have a corresponding web.xml file configured. Look at the Tomcat docs for assistance on this one. I think the example webapps is done for you. To test if your servlet is working... Compile your servlet with an init() method that prints a diagnostic message. public void init() { System.out.println(The servlet is starting for the first time); } and see if this pops out when you direct your browser to the url http:\\localhost\command\servlet\[YourServlet as defined in the web.xml file] I hope this helps in some way. Regards Glenn Drew Any help would be much appreciated! Thanks, - R _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] workers.properties Description: Binary data mod_jk.conf-manual Description: Binary data -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache Tomcat mod_jk problem
Near as I can tell you are missing a Listener element for ApacheConfig in your server.xml. You need 2 Listeners, minimum. One of them at the Server level, which it looks like you have, and one of them at the Host level which it looks like you don't have. That's why your auto-generated mod_jk.conf file is complete. John -Original Message- From: R. C. Hill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 3:38 AM To: [EMAIL PROTECTED] Subject: Apache Tomcat mod_jk problem Hi, I'm trying to use the mod_jk connector with Apache 2.0.43 (Win32) and Tomcat 4.1.10. When I add the Include c:/tomcat/conf/auto/mod_jk.conf line in the apache httpd.conf file, apache will not start. No sign of an error in the error.log file. I'm stumped...it should work?! Does anyone know what I'm doing wrong? I configured them as follows: 1.) I downloaded the mod_jk-2.0.43.dll and placed it in the C:\Program Files\Apache Group\Apache2\modules directory 2.) Created workers.properties in the C:\tomcat\conf\jk directory. # (optional) make this equal to CATALINA_HOME workers.CATALINA_HOME=C:\tomcat # (optional) make this equal to JAVA_HOME workers.java_home=C:\j2sdk1.4.0_01 # Windows uses back slashes ps=\ worker.list=ajp13 # Definition for Ajp13 worker worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 3.) I added the following to tomcat's server.xml: After the Server port=8005 ... declaration: Listener className=org.apache.ajp.tomcat4.config.ApacheConfig modJk=C:\Program Files\Apache Group\Apache2\modules\mod_jk-2.0.43.dll jkDebug=info workersConfig=C:\tomcat\conf\jk\workers.properties jkLog=C:\tomcat\logs\mod_jk.log/ !-- Define an AJP 1.3 Connector on port 8009 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true 4.) Added to the end of the apache httpd.conf file: Include c:/tomcat/conf/auto/mod_jk.conf 5.) The contents of C:\tomcat\conf\auto\mod_jk.conf shows: IfModule !mod_jk.c LoadModule jk_module C:/Program Files/Apache Group/Apache2/modules/mod_jk-1.3.27.dll /IfModule JkWorkersFile C:/tomcat/conf/jk/workers.properties JkLogFile C:/tomcat/logs/mod_jk.log JkLogLevel info Any help would be much appreciated! Thanks, - R _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache/Tomcat/Mod_jk = setKeepAlive() in Ajp13Connector.run = NoSuchMethodError
I removed the WarpConnector but still the same error occurs... do I have to place a ajp13 connector in my Service name=Tomcat-Apache? Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ralph Einfeldt Sent: vrijdag 19 juli 2002 09:23 To: Tomcat Users List Subject: AW: Apache/Tomcat/Mod_jk = setKeepAlive() in Ajp13Connector.run = NoSuchMethodError The first thing that puzzles me is that you have org.apache.catalina.connector.warp.WarpConnector in server.xml although you are talking about mod_jk. I don't have an idea how this might cause your error message. -Ursprüngliche Nachricht- Von: Gunter D'Hondt [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 19. Juli 2002 09:09 An: 'Tomcat Users List' Betreff: Apache/Tomcat/Mod_jk = setKeepAlive() in Ajp13Connector.run = NoSuchMethodError I'm working with nt4, apache2.0.39,tomcat4.04,jdk1.22,mod_jk1.2 and I can start everything up but when browsing to a jsp page gives me the following error: snip/ Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=75 enableLookups=true appBase=webapps acceptCount=10 debug=0/ Engine className=org.apache.catalina.connector.warp.WarpEngine name=Apache debug=0 Logger className=org.apache.catalina.logger.FileLogger prefix=apache_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.MemoryRealm / /Engine /Service /Server -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] attachment: winmail.dat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Apache/Tomcat/Mod_jk = setKeepAlive() in Ajp13Connector.run = NoSuchMethodError
Is there anybody who had the same problem and can help me out coz I'm out of possibilities now... Greetings, Gunter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ralph Einfeldt Sent: vrijdag 19 juli 2002 09:51 To: Tomcat Users List Subject: AW: Apache/Tomcat/Mod_jk = setKeepAlive() in Ajp13Connector.run = NoSuchMethodError As i'm not a user of mod_jk, I won't burn my mouth. Maybe this link helps to answer your question: http://village.flashnet.it/users/fn048069/files/readme/jakarta.txt -Ursprüngliche Nachricht- Von: Gunter D'Hondt [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 19. Juli 2002 09:30 An: 'Tomcat Users List' Betreff: RE: Apache/Tomcat/Mod_jk = setKeepAlive() in Ajp13Connector.run = NoSuchMethodError I removed the WarpConnector but still the same error occurs... do I have to place a ajp13 connector in my Service name=Tomcat-Apache? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] attachment: winmail.dat -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: apache + tomcat + mod_jk
You'll have to fix this first: [Thu Jul 18 16:38:33 2002] [error] [client 194.214.221.61] client denied by server configuration: /var/mpictures/Mpictures AND 194.214.221.61 - - [18/Jul/2002:16:38:33 +0200] GET /appli/Mpictures HTTP/1.1 403 321 - Mozilla/5.0 (X11; U; Linux i686; fr-FR;rv:0.9.8) Gecko/20020204 That's apache telling you that you have no permissions to access that resource. Tomcat hasn't even gotten involved at that point, and neither has the connector, as far as I know. Also, it's a really good idea to make sure http://localhost:8080/examples and http://localhost/examples work before trying to add your own configurations into the mix. John Turner [EMAIL PROTECTED] -Original Message- From: COLLINEAU Franck FTRD/DMI/TAM [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 18, 2002 10:56 AM To: Tomcat Users List Subject: apache + tomcat + mod_jk Greetings, I would like to run an application using both Tomcat and Apache with mod_jk module. I have followed the procedure 's intallation given on the tomcat site So Tomcat listen to on port 8080 (http) and on port 8007 (mod_jk). When i type in a browser http://myUrl:8080 it works! But when i type in a brwser http://myUrl i have the 403 error (forbidden) Here an extract of the httpd.conf: Include /opt/tomcat/conf/mod_jk.conf-auto JkWorkersFile /etc/httpd/conf/workers.properties JkLogFile /var/log/httpd/mod_jk.log JkLogLevel warn JkMount /*.jsp ajp12 JkMount /servlet/* ajp12 Here are logs traces: error_log: [Thu Jul 18 16:38:18 2002] [warn] module jk_module is already loaded, skipping [Thu Jul 18 16:38:18 2002] [notice] Apache-AdvancedExtranetServer/1.3.23 (Mandrake Linux/4.1mdk) mod_gzip/1.3.19.1a mod_jk configured -- resuming normal operations [Thu Jul 18 16:38:18 2002] [notice] Accept mutex: sysvsem (Default: sysvsem) [Thu Jul 18 16:38:33 2002] [error] [client 194.214.221.61] client denied by server configuration: /var/mpictures/Mpictures mod_jk_log: [jk_worker.c (223)]: build_worker_map, removing old ajp13 worker [jk_worker.c (235)]: build_worker_map, done [jk_worker.c (102)]: wc_open, done [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (435)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match access_log 194.214.221.61 - - [18/Jul/2002:16:38:33 +0200] GET /appli/Mpictures HTTP/1.1 403 321 - Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:0.9.8) Gecko/20020204 extract of httpd.conf IfModule mod_jk.c Include /opt/tomcat/conf/mod_jk.conf-auto /IfModule JkWorkersFile /etc/httpd/conf/workers.properties JkLogFile /var/log/httpd/mod_jk.log JkLogLevel warn JkMount /*.jsp ajp12 JkMount /servlet/* ajp12 can anybody help me ? Franck -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache Tomcat mod_jk
You need to do some reading. Usually, apache runs on port 80 Usually, tomcat web server runs on port 8080 (of course, you can change it) If you get to Tomcat via apache, you should be able to do http://my.machine/examples and see tomcat examples. If you do not see them, your connector (mod_jk) is not configured correctly. If you get to Tomcat directly, you should be able to do http://my.machine:8080/examples If your apache is not running, you still can see pages via Tomcat 8080 port, since Tomcat is also a web server. You can disable prot 8080 in tomcat (comment out !-- ... -- the connector which has 8080 in server.xml), but until you do, your tomcat is serving pages on port 8080 without apache. When you do ps -ef | grep httpd you see Apache when you do ps -ef | grep java | grep -i tomcat you will see tomcat processes (and threads) If you installed apache from the CD or red hat or whatever, it is automatically started on book. To stop it you need to do: /etc/rc.d/init.d/httpd stop and to start it, you need to do /etc/rc.d/init.d/httpd start On Fri, 13 Jul 2001, Saadat Ahmed wrote: Another basic question. When I kill all httpds and hence my apache server is not running and then I start tomcat, how come I can browse the tomcat index page on port 8080 eventhough the apache server is not running. Is TomCat more than a Servlet engine, how is the httpd request is being processed without me having apache running. For some reason when I executed ps -e | grep httpd I do see httpds. Is this apache, if it is then how come it starts eventhough I just started tomcat with startup.sh Regards, Saaat. _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com Jan K. Labanowski|phone: 614-292-9279, FAX: 614-292-7168 Ohio Supercomputer Center|Internet: [EMAIL PROTECTED] 1224 Kinnear Rd, |http://www.ccl.net/chemistry.html Columbus, OH 43212-1163 |http://www.osc.edu/
RE: Apache+Tomcat mod_jk 3.2.2 install problem
Hi, Well I guess you are not the only one having this problem. I had to turn back to Jserv module. It works fine. -Original Message- From: Edilmar Alves [mailto:[EMAIL PROTECTED]] Sent: Friday, June 15, 2001 4:37 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Apache+Tomcat mod_jk 3.2.2 install problem I installed Tomcat 3.2.2 with Linux RedHat k2.2.17-14cl, and http://localhost:8080/ works fine, all examples servlets/JSPs. Then, I tried to install the integration with Apache 1.3.14. This is the error: [root@email conf]# /etc/rc.d/init.d/httpd start Iniciando httpd: BUG IN DYNAMIC LINKER ld.so: dynamic-link.h: 57: elf_get_dynamic_ info: Assertion `! bad dynamic tag' failed! I tried with both libraries: mod_jk.so-eapi mod_jk.so-noeapi renaming it to mod_jk.so and putting it into libexec (a link to modules). PS: Apache works fine without Tomcat module.