Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

apache + tomcat + mod_jk to load jsp pages through apache

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  configuration apache about redirect.  
Author Message
apseyed

External


Since: Jul 03, 2003
Posts: 7



(Msg. 1) Posted: Thu Jul 10, 2003 1:40 pm
Post subject: apache + tomcat + mod_jk to load jsp pages through apache
Archived from groups: alt>apache>configuration (more info?)

I'm continuing to try to get apache, tomcat, and the connector to work so
apache passes jsp page requests to tomcat. It still is not functional, but
still haven't found the culprit of why this isn't working. My configuration
including perhaps tail-tell log file output is detailed below. _any_
suggestions appreciated.
Thx,
/Patrice
Here's the specs/state:


tomcat-4.1.24

Apache/2.0.46

Mod_jk

j2sdk1.4.1_02



#in /usr/local

lrwxrwxrwx 1 root root 12 Jul 7 12:16 apache ->
apache2.0.46

lrwxrwxrwx 1 root root 13 Jul 1 12:09 java ->
j2sdk1.4.1_02

lrwxrwxrwx 1 root root 13 Jul 8 09:53 tomcat ->
tomcat-4.1.24



#in /usr/local/apache/modules

-rw-r--r-- 1 root root 124472 Jul 8 09:58 mod_jk.so



# iptables -L -n

Chain INPUT (policy ACCEPT)

target prot opt source destination

ACCEPT tcp -- 155.41.0.0/16 0.0.0.0/0 tcp dpt:22
flags:0x16/0x02

ACCEPT tcp -- 155.41.0.0/16 0.0.0.0/0 tcp dpt:21
flags:0x16/0x02

ACCEPT tcp -- 155.41.0.0/16 0.0.0.0/0 tcp dpt:13782
flags:0x16/0x02

ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
flags:0x16/0x02

ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080
flags:0x16/0x02

ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8009
flags:0x16/0x02

ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3306
flags:0x16/0x02

ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:25
flags:0x16/0x02

ACCEPT tcp -- 155.41.0.0/16 0.0.0.0/0 tcp dpt:2049
flags:0x16/0x02

ACCEPT tcp -- 127.0.0.0/16 0.0.0.0/0 tcp
flags:0x16/0x02

DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp
flags:0x16/0x02



#in /etc/apache/httpd.conf

LoadModule jk_module modules/mod_jk.so

Include /usr/local/tomcat/conf/auto/mod_jk.conf



JkWorkersFile /usr/local/tomcat/conf/workers.properties

JkLogFile /usr/local/apache/logs/mod_jk.log

JkLogLevel debug



#within my virtual hosts in httpd.conf



JkMount /*.jsp ajp13

JkMount /servlet/* ajp13



#/usr/local/tomcat/conf/jk/workers.properties

worker.list=ajp13

workers.tomcat_home=/usr/local/tomcat

workers.java_home=/usr/local/java

worker.testWorker.port=8009

worker.testWorker.host=localhost

worker.testWorker.type=ajp13



#in /usr/local/tomcat/conf/server.xml added



<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
modJk="/usr/local/apache/modules/mod_jk.so" />



within the Server container, and:



<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
append="true" forwardAll="false" modJk="/usr/local/apache/modules/mod_jk.so"
workersConfig="/usr/local/tomcat/conf/workers.properties" />



in the Host container.



#/usr/local/tomcat/logs/Catalina.out logs upon start up of tomcat:

Jul 10, 2003 9:47:59 AM org.apache.coyote.http11.Http11Protocol init

INFO: Initializing Coyote HTTP/1.1 on port 8080

Starting service Tomcat-Standalone

Apache Tomcat/4.1.24



Jul 10, 2003 9:48:03 AM org.apache.coyote.http11.Http11Protocol start

INFO: Starting Coyote HTTP/1.1 on port 8080

Jul 10, 2003 9:48:03 AM org.apache.jk.common.ChannelSocket init

INFO: JK2: ajp13 listening on /0.0.0.0:8009

Jul 10, 2003 9:48:03 AM org.apache.jk.server.JkMain start

INFO: Jk running ID=0 time=1/102
config=/usr/local/tomcat/conf/jk2.properties



This looks as expected.



if you look /usr/local/apache/logs/mod_jk.log says "done without a match"
when i am clicking on the .js page which then is supposed to load a jsp
page. the GetSampleTracking java activity i mentioned at the end of this
email. Is this a great big glaring hint?

---
##/usr/local/apache/logs/mod_jk.log
Into jk_uri_worker_map_t::map_uri_to_worker
[Thu Jul 10 10:21:37 2003] [jk_uri_worker_map.c (477)]: Attempting to map
URI '/mirage/servlet/GetSampleTracking'
[Thu Jul 10 10:21:37 2003] [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Thu Jul 10 10:21:37 2003] [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Thu Jul 10 10:21:37 2003] [jk_uri_worker_map.c (477)]: Attempting to map
URI '/mirage/servlet/GetSampleTracking'
[Thu Jul 10 10:21:37 2003] [jk_uri_worker_map.c (599)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match



The result is even if I go to <virtualhost>:8080 I will get the tomcat
page, and can surf to <virtualhost>:8080/examples

But <virtualhosts>/examples will not give me anything.. isn't the jkmount
option in httpd.conf supposed to link the two together, even though docRoot
for the virtual host does not contain the examples dir? (which is in
/usr/local/tomcat/webapps).



I put the JkMount directive in another of my virtual hosts in httpd.conf,
which _does_ have jsp pages in its document root, and the jsp page would not
load. The way it complains seems like it cannot find the java class, but I
don't know. The result was
http://<virtualhost>/mirage/servlet/GetSampleTracking " page cannot be
found"



-I tried setting up a host container for each of my virtual hosts, but all
that did was show a directory listing of my webserver from all the virtual
hosts.

-I changed instances of localhost to my webserver name, which didn't help.





Any ideas?



/Patrice

Computer System Administrator

Genetics Program - BUMC

 >> Stay informed about: apache + tomcat + mod_jk to load jsp pages through apache 
Back to top
Login to vote
gmh2441

External


Since: Jul 10, 2003
Posts: 6



(Msg. 2) Posted: Thu Jul 10, 2003 5:26 pm
Post subject: Re: apache + tomcat + mod_jk to load jsp pages through apache [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Patrice Seyed wrote:
 >
 > I'm continuing to try to get apache, tomcat, and the connector to work so
 > apache passes jsp page requests to tomcat. It still is not functional, but
 > still haven't found the culprit of why this isn't working. My configuration
 > including perhaps tail-tell log file output is detailed below. _any_
 > suggestions appreciated.

I've been in your place. One thing:

- Starting with 4.0.x of Tomcat, it's not "TOMCAT_HOME", it's
"CATALINA_HOME" (I know 3.3 of Tomcat used "TOMCAT_HOME", and I think
that was the last in that line)

Also, check out <a style='text-decoration: underline;' href="http://tomcatfaq.sourceforge.net" target="_blank">http://tomcatfaq.sourceforge.net</a> - I think you might
find some answers there.


 > But <virtualhosts>/examples will not give me anything.. isn't the jkmount
 > option in httpd.conf supposed to link the two together, even though docRoot
 > for the virtual host does not contain the examples dir? (which is in
 > /usr/local/tomcat/webapps).
 >
 > I put the JkMount directive in another of my virtual hosts in httpd.conf,
 > which _does_ have jsp pages in its document root, and the jsp page would not
 > load. The way it complains seems like it cannot find the java class, but I
 > don't know. The result was
 > <a style='text-decoration: underline;' href="http://<virtualhost>/mirage/servlet/GetSampleTracking" target="_blank">http://<virtualhost>/mirage/servlet/GetSampleTracking</a> " page cannot be
 > found"

Do you have an error log from Apache? When you say "will not give me
anything", do you mean you don't get the desired result but DO get
something else?

 > -I tried setting up a host container for each of my virtual hosts, but all
 > that did was show a directory listing of my webserver from all the virtual
 > hosts.

If I recall right, you have to have a <Host> for each VirtualHost, and
the directions in one have to correspond to the other.


 > -I changed instances of localhost to my webserver name, which didn't help.

Are you sure the name for each host in server.xml is exactly the same as
the corresponding ServerName in httpd.conf?

--
Lynn Hollerman.<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: apache + tomcat + mod_jk to load jsp pages through apache 
Back to top
Login to vote
vbmitsql

External


Since: Jul 19, 2003
Posts: 1



(Msg. 3) Posted: Sat Jul 19, 2003 1:46 pm
Post subject: Re: apache + tomcat + mod_jk to load jsp pages through apache [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Back to top
Login to vote
Display posts from previous:   
Related Topics:
more tomcat/apache: mod_jk.conf auto generated? - Hi, I've gotten my hands on the right docs.. I'm continuing to read up, one thing I've done is upgraded 2.0.46 of apache. One thing it says, which I've seen in a few other docs, is that /usr/local/tomcat/conf/auto/mod_jk.conf is autogenerated by tomcat...

Apache+Tomcat+Cocoon - Anyone ever get those 3 latest-stable release ever work? I got Apache+Tomcat works fine. But I can't get Cocoon to work. All I got when I did http://localhost:8080/cocoon is a directory listing. Helps are greatly appreciated. PS: Its too confusing to....

tomcat apache integration documentation - Hi, well I couldn't get it to work, the jsp pages were showing up as text on the webpage, so anyway I'm starting from scratch on a test box. I want to make sure I'm using the right documentation from the start though. I was had been using..

apache not passing jsp requests to tomcat (config looks ok) - Looks like everything is configured correctly, _but_ when i navgate to execute a jsp page within the JkMount path (httpd.conf), the apache webserver displays it as html/plain text, so it looks like apache is not handing off to mod_jk and the tomcat..

APACHE and PHP module - Hi , I got my multiple sites running now and I found I need to use PHP config directives in apache ..So I set up PHP to run as a module last night and got it to work ( I think !) .. How can I test PHP to see if its in the new configuration ?.So far I can...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]