• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Connection between tomcat and apache

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am newbie at tomcat, I have installed it (5.5.17) under /usr/lib/ when i browse to http://localhost i get default apache page, and when i browse to htt://localhost:8080 I get default tomcat page and i can run the examples.

I have two problem, when i change the port to 80 in server.xml to get default tomcat page when you run http://localhost, it does not work it generate connection was refused....

somebody told me that i must create a connection between apache and tomcat I installed jakarta-tomcat-connectors-1.2.15 but when i run following commandos
> ./configure --with-apxs=/usr/bin/apxs2

after a while it generates following:

......
need to check for Perl first, apxs depends on it...
checking for perl... /usr/bin/perl
could not find /usr/bin/apxs2
configure: error: You must specify a valid --with-apxs path

but i know i have apxs2 under /usr/bin and i see it.

how i can solve my problem, thanks

i am newbe and need som description.
 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to install mod_jk plugin to Apache.

Than configure workers.properties in APACHE_HOME/conf

worker.list=ajp13

worker.ajp13.type=ajp13
worker.ajp13.host=localhost (probably)
worker.ajp13.port=8009

After that you have to configure httpd.conf in the same directory for redirecting jsp and servlet requests to Tomcat.

JkWorkersFile %APACHE_HOME%/conf/workers.properties
JkLogFile %APACHE_HOME%/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /servlets-examples/servlet/* ajp13w
JkMount /jsp-examples/*.jsp ajp13w

Take this only as an example.
 
Medes Agri
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks , do you mean mod_jk connector, i used following link and install it

http://archive.apache.org/dist/jakarta/tomcat-connectors/jk/source/jk-1.2.15/
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic