LeanMoreTryMore
asked on
Apache Web Server connect to Tomcat
We have a client want their web application to be run on Apache Web server with tomcat as a middle tier. I need to report to my manager about this.
I have tried and successfully installed Apached and Apache Tomcat. Both works BUT I follow some document to connect Tomcat to Apache, it DOES NOT WORK.
Are there any installer I can use?
I go through the Apache document but it still does not work..I think I must miss somthing..
ALSO.
Let's say if I can connect Tomcat to Apache, where do I deploy my web application?
at the moment, my application is located $TOMCAT_HOMR/webappl/HR folder.
I dont know how it work.
Please help
The version i use for Apache Server is Apache 2.0.53 (win)
Apache Tomcat 5.59
I have tried and successfully installed Apached and Apache Tomcat. Both works BUT I follow some document to connect Tomcat to Apache, it DOES NOT WORK.
Are there any installer I can use?
I go through the Apache document but it still does not work..I think I must miss somthing..
ALSO.
Let's say if I can connect Tomcat to Apache, where do I deploy my web application?
at the moment, my application is located $TOMCAT_HOMR/webappl/HR folder.
I dont know how it work.
Please help
The version i use for Apache Server is Apache 2.0.53 (win)
Apache Tomcat 5.59
ASKER
Is our web application reside in the $TOMCAT_HOME/webapp or in $APACHE_HOME?
ASKER
Refer to your tomcat connector setting,
Is the port 9009 a Apache port?
address = 127.0.0.1 <=== Let's say i want to install apache web server on my pc, the address is my PC address, isn't it?
Is the port 9009 a Apache port?
address = 127.0.0.1 <=== Let's say i want to install apache web server on my pc, the address is my PC address, isn't it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Complete instructions are available at
tomcat/tomcat-4.1-doc/jk2/
Here's a (minimal) configuration example.
It dispatches all requests for the 'examples' context
to Tomcat.
My setup is Apache 1.3.x/Tomcat 4.0.x on RH7.2. The
example should also be valid for your setup.
1. In httpd.conf, tell Apache to load the module:
LoadModule jk_module modules/mod_jk.so
2. In httpd.conf, configure mod_jk:
JkWorkersFile /etc/httpd/conf/workers.pr
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:$S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /examples/* worker1
3. Configure workers for mod_jk in
/etc/httpd/conf/workers.pr
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=127.0.
worker.worker1.port=9009
worker.worker1.lbfactor=1
worker.worker1.local_worke
4. In server.xml, configure Tomcat to talk to mod_jk:
<Service name="Tomcat-Standalone">
<!-- this is the HTTP connector which was configured
in the server.xml that came with Tomcat
-->
<Connector className="org.apache.cata
<!-- This makes Tomcat talk to mod_jk -->
<Connector className="org.apache.ajp.
port="9009"
address="127.0.0.1" />
<Engine........
If you don't want to access Tomcat directly via HTTP, you
can comment out the entry for the HttpConnector.
After a restart of Tomcat and Apache, Apache should
dispatch requests for the 'examples' context to Tomcat.
R.K