Fedora Linux Support Community & Resources Center
Old 7th June 2004, 01:06 PM
loyal_lin Offline
Registered User
Join Date: Jun 2004
Location: Greece
Age: 33
Posts: 15
Need help with apache+tomcat.(urgent)


5 days ago i managed to setup apache
and it worked. soon after i tried to setup tomcat and although i started i couldn t reach the page
localhost:8080. maybe because of the firewall.
so i said i should install a connector. i picked up jk1.2.5. i installed it , i run the configuration script but after "make" i got this:
Making all in common
make[1]: Entering directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.5-src/jk/native/common'
/bin/sh /usr/lib/apr/build/libtool --silent --mode=compile gcc -I/usr/include/httpd -g -O2 -O2 -g -pipe -march=i386 -mcpu=i686 -pthread -DHAVE_APR -g -O2 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I /usr/java/j2sdk1.4.2_04/include -I /usr/java/j2sdk1.4.2_04/include/ -c jk_connect.c
jk_connect.c:99:28: apr_network_io.h: No such file or directory
jk_connect.c:100:23: apr_errno.h: No such file or directory
jk_connect.c:101:25: apr_general.h: No such file or directory
jk_connect.c: In function `jk_resolve':
jk_connect.c:140: error: `apr_pool_t' undeclared (first use in this function)
jk_connect.c:140: error: (Each undeclared identifier is reported only once
jk_connect.c:140: error: for each function it appears in.)
jk_connect.c:140: error: `context' undeclared (first use in this function)
jk_connect.c:141: error: `apr_sockaddr_t' undeclared (first use in this function)
jk_connect.c:141: error: `remote_sa' undeclared (first use in this function)
jk_connect.c:145: error: `APR_SUCCESS' undeclared (first use in this function)
jk_connect.c:148: error: `APR_UNSPEC' undeclared (first use in this function)
jk_connect.c:148: error: `apr_port_t' undeclared (first use in this function)
jk_connect.c:148: error: syntax error before "port"
make[1]: *** [jk_connect.lo] Error 1
make[1]: Leaving directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.5-src/jk/native/common'
make: *** [all-recursive] Error 1

as it seems tha epr header files are not seen.
i am desperate as i have to implement a project with java servlets.
thanks....immediate help needed
Fedora core2
Reply With Quote
Old 7th June 2004, 06:51 PM
deuch Offline
Registered User
Join Date: Apr 2004
Location: France
Age: 38
Posts: 340
if you have a FC1, jakarta site provide a package with mod_jk 2 ...

For FC2; on the 4th CD, you have the RPM for mod_jk ...

To use Tomcat you havve to set variable :


For tomcat, you have to use port 8080 and 80 for apache.

With tomcat + apache, you can see the welcome page of apache with http://localhost

hope it helps,
Reply With Quote
Old 8th June 2004, 01:47 PM
jeru Offline
Registered User
Join Date: May 2004
Location: Arizona
Posts: 119
CATALINA_HOME=path to tomcat

You should probably start using mod_jk2 instead of jk these days. mod_jk2 is better suited for multithreaded servers like apache2 and was made to replace mod_jk. It's just too hard to get people to figure out and use an almost undocumented configuration. (or step away from the autoconfig patch that was made for mod_jk)

Tomcat doesn't need to be running on 8080, 8080 is irrelivent to the working with the JK/AJP13 protocol that runs on 8009. mod_jk and mod_jk2 only connect using this but even they can be configured to use whatever port you choose. 8009 is just default. 8080 is just the connector you use if you want to reach tomcat directly via http.

Like duech said, get the mod_jk2 DSO module from the FC2 build... There shouldn't be any harm in that. But it's also very easy to build if you feel like doing so. Then you just need to set your workers2.properties file to pass off whatever uri's tomcat container should process instead of apache. You'll also need to configure apache's httpd.conf to forward all /*.jsp requests to the JK/AJP13 connector

Here's a relativly new compilation/additions/updates of howto's I did for my brother in law... Not complete but should get you going initially.

Reply With Quote
Old 10th June 2004, 05:15 AM
Tycho316 Offline
Registered User
Join Date: Jun 2004
Posts: 4
what was your ./configure command?
i have to "./configure with-apxs=/usr/local/apache/bin/apxs" to make.
Reply With Quote
Old 11th June 2004, 06:27 PM
odysseus Offline
Registered User
Join Date: Dec 2003
Posts: 17

thx for the link, this rescued me from a 2-week-struggle, editing config-files, starting and stopping tomcats and apaches..

it works, apache and tomcat talk to each other
>athlon xp 2400
>768mb ram
>nvidia fx 5900
>soundblaster audigy player
Reply With Quote

apache, tomcaturgent

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
tomcat apache connector demck85 Servers & Networking 0 21st January 2007 04:33 PM
Tomcat and apache nayeemmz Using Fedora 2 23rd June 2006 04:37 PM
FC2 + Apache 2 + Tomcat 5 LeAkEd Guides & Solutions (Not For Questions) 2 27th June 2005 09:55 AM
Apache and Tomcat RaCarter Servers & Networking 2 20th September 2004 09:13 AM

Current GMT-time: 10:38 (Thursday, 24-08-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat