Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

How to map apache to tomcat?

 
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have several users under /home/users on my redhat7.3. I want their directories can support JSP and servlet.
So far as the apache-tomcat-connetor is concerned, I cannot find the mod_jk from http://jakarta.apache.org/builds/jakarta-tomcat-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/tomcat-4.0-doc/config/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
Andrew
 
Andrew Parker
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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/LinuxTutorialTomcat.html#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/jakarta-tomcat-4.0/archives/v4.0.2/rpms/
2. I downloaded http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3/bin/linux/i386/mod_jk-3.3-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.
 
Andrew Parker
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
anyone could help?
Andrew
 
Andrew Parker
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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, worker.properties and server.xml or other files in order to make it work?
And advice?
 
Saloon Keeper
Posts: 23449
159
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You probably would have gotten more responses if you'd asked this in the Apache/Tomcat Forum.
Ypu might be able to convert the URLs from the "~" shorthand to explicit paths using mod_rewrite, but I don't guarantee it, since mod_webapp has been known to be greedy and grab stuff before other Apache modules can see it. Maybe Apache 2.0 is better equipped to handle that.
Mod_webapp was supposed to get friendlier in that regard, but if it has, it's been within the last 6 months, since that's when I last researched it.
 
This tiny ad will self destruct in five seconds.
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic