LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-08-2002, 10:24 AM   #1
gogo
Member
 
Registered: Apr 2001
Posts: 117

Rep: Reputation: 15
How to map apache to tomcat server?


Hi,

I installed tomcat4 and I have many users under /home/users on redhat 7.3.

How can I map all users dirs to tomcat4?

How do I edit httpd.conf, web.xml, server.xml and add mod_webapp module to apache web server?

Thanks for help

gogo
 
Old 07-08-2002, 11:56 AM   #2
entm
Member
 
Registered: Oct 2001
Location: Atlanta, GA
Distribution: Red Hat 7.0
Posts: 45

Rep: Reputation: 15
Start with this:

http://www.yolinux.com/TUTORIALS/Lin...ialTomcat.html

and see if it helps. I just got through following this guide over the weekend and had everything working except PostgreSQL. I still have to edit the host config file for PostgreSQL.
 
Old 07-08-2002, 08:07 PM   #3
gogo
Member
 
Registered: Apr 2001
Posts: 117

Original Poster
Rep: Reputation: 15
Hi,

So far as the apache-tomcat-connetor is concerned, I cannot find the mod_jk from http://jakarta.apache.org/builds/jak...at-connectors/ and http://www.rpmfind.net.

Now, I installed the mod_webapp.so which downloaded from rpmfind.net.

I read the doc http://jakarta.apache.org/tomcat/tom...nfig/warp.html

but unable to configure the server.xml and httpd.conf files.

In mod_webapp, there is no worker.properties, how should I map apache to tomcat4?

Thanks for help

gogo
 
Old 07-08-2002, 11:25 PM   #4
rverlander
Member
 
Registered: May 2002
Distribution: A few
Posts: 488

Rep: Reputation: 30
Why don't you use ApacheJServ (aka mod_jserv) and gnujsp instead?
 
Old 07-09-2002, 03:11 AM   #5
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Rep: Reputation: 30
on the first link suggested in this thread has
mod_jk rpm

i think that works..

...
by the way..

i 'm having trouble with file permissions

tail /var/log/httpd/error_log

[Tue Jul 9 03:01:59 2002] [error] [client 127.0.0.1] client denied by server configuration: /var/jakarta-tomcat-4.0.4/webapps/examples

thx
 
Old 07-09-2002, 03:39 AM   #6
rverlander
Member
 
Registered: May 2002
Distribution: A few
Posts: 488

Rep: Reputation: 30
<rant>
Why don't you use ApacheJServ (aka mod_jserv) and gnujsp instead?
</rant>
 
Old 07-09-2002, 08:16 AM   #7
entm
Member
 
Registered: Oct 2001
Location: Atlanta, GA
Distribution: Red Hat 7.0
Posts: 45

Rep: Reputation: 15
The link I posted at the top covers everything in detail from setting up workers to editing all the necessary config files. As I said, everything worked for me except PostgreSQL which requires that I edit an additional host config file that was not mentioned in the article. MySQL was very easy and simple to set up, and I now have it working with Tomcat, Apache, and PHP.

Try doing a google search for your specific distributions and see what you come up with. The link was specific for RedHat, but I noticed that some of the folks responding were using Mandrake and Debian.
 
Old 07-09-2002, 01:14 PM   #8
gogo
Member
 
Registered: Apr 2001
Posts: 117

Original Poster
Rep: Reputation: 15
Hi,

I removed the mod_webapp.so and install mod_jk.so. But, httpd shows an error and cannot be started now.

Loaded DSO modules/mod_jk.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with - DEAPI).

What does it mean and how should I do it now?

According to http://www.yolinux.com/TUTORIALS/Lin...#APACHETOMCAT, here were my steps (Please tell me which part I was wrong):

1. I installed mod_jk-1.3-1.0-1.4.0.2.i386.rpm which was downloaded from http://jakarta.apache.org/builds/jak...s/v4.0.2/rpms/

2. I downloaded http://jakarta.apache.org/builds/jak...-ap13-eapi.so, rename it to mod_jk.so and replace the one located under /usr/lib/apache/mod_jk.so.

3. Modify: /etc/httpd/conf/workers.properties

4. Add to: /var/tomcat4/conf/server.xml

5. Add to: /etc/httpd/conf/httpd.conf

6. Modify: /etc/httpd/conf/mod_jk.conf

Thanks for any advice.

gogo



 
Old 07-10-2002, 08:15 AM   #9
entm
Member
 
Registered: Oct 2001
Location: Atlanta, GA
Distribution: Red Hat 7.0
Posts: 45

Rep: Reputation: 15
It sounds like you ran into a problem that was explained on the website. If you followed the directions exactly, then I don't really know what went wrong. I would double check the .conf files you edited and review the steps again.

I am running RedHat 7.3. I installed Apache 1.3.26, MySQL, and Tomcat 4.0.2 from .rpms. I have not run into the problem you described. I don't really know how to help you with that error.
 
Old 07-14-2002, 11:12 AM   #10
gogo
Member
 
Registered: Apr 2001
Posts: 117

Original Poster
Rep: Reputation: 15
Hi,

I made little progress although it still not worked.

The apache server can be started now. But, it still shows a [warn] Loaded DSO modules/mod_jk.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with - DEAPI).

Also, when I run http://localhost/examples/servlet/MyHelloWorld, it showed:

Apache Tomcat/4.0.4 - HTTP Status 404 - /examples/servlet/MyHelloWorld

The requested resource (/examples/servlet/MyHelloWorld) is not available.

So, what's wrong with it?

Any guru could help me?

Regards

gogo
 
Old 07-15-2002, 09:08 AM   #11
gogo
Member
 
Registered: Apr 2001
Posts: 117

Original Poster
Rep: Reputation: 15
Now, the apache can connect to tomcat.

When I run http://localhost/examples/servlet/MyHelloWorld, it works now.

I did not setup Virtualhost. However, I have many users like localhost/~userA.

I tried to add JkMount /*.jsp ajp13, JkMount /servlet/* ajp13 to httpd.conf in-between <Directory /home/*/html> </Directory>.

However, the apache cannot be started because they cannot be added in-between <Directory>.

I also tried to add <Host name="localhost/~userA">
<Context path="" docBase"/home/userA/html" /></Host> to server.xml.

But, it still did not work.

So, how should I configure httpd.conf and server.xml or other files in order to make it work?

And advice?

gogo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Apache Tomcat Server on RED HAT Linux 9 shelldinesh Linux - Software 0 10-06-2004 06:55 AM
Apache Tomcat server error?? mlhammer Linux - Software 0 07-31-2004 11:20 PM
tomcat 5 implimentation on apache httpd server srikz Red Hat 0 07-22-2004 02:00 AM
Apache Tomcat web Server hardware config homyarb Linux - Software 2 04-16-2003 12:36 AM
tomcat server configuration with apache on RHL 7.2, 6.2 sathu Linux - Software 0 02-05-2002 07:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration