Solved

Connecting Apache 2.2 and Tomcat 5.5.17

Posted on 2006-07-23
3
8,455 Views
Last Modified: 2008-01-09
I'm trying to connect Tomcat to Apache using mod_proxy_ajp.  Here are the relevant configuration sections.

From httpd.conf:

#
# Configure AJP proxying
#
<Location /*/WEB-INF/>
    Deny from all
</Location>

#
# Forward all newtowne requests
#
<Location /newtowne/>
    ProxyPass            ajp://127.0.0.1:8009/
    ProxyPassReverse      ajp://127.0.0.1:8009/
    Allow from all
</Location>

From server.xml:

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector address="localhost" port="8009"
               protocol="AJP/1.3" enableLookups="false"
             minSpareThreads="20" maxSpareThreads="100"
             maxThreads="200" connectionTimeout="60000" />

However, when I attemp tto request a resource that should get mapped to the Tomcat engine, I see the following error in the Apache logs:

[Sat Jul 22 16:50:22 2006] [error] (13)Permission denied: proxy: AJP: attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed
[Sat Jul 22 16:50:22 2006] [error] ap_proxy_connect_backend disabling worker for (127.0.0.1)
[Sat Jul 22 16:50:22 2006] [error] proxy: AJP: failed to make connection to backend: 127.0.0.1
[Sat Jul 22 16:50:24 2006] [error] proxy: AJP: disabled connection for (127.0.0.1)

It looks as though Apache is attempting to Proxy the request as directed, but gets not further than that, as it is denied permission to speak to the AJP server.   As far as I can tell the AHP connector starts successfully since I see no indications otherwise in the logs.

Any ideas?

Thanks in advance.

Derek
0
Comment
Question by:derekl
3 Comments
 
LVL 4

Accepted Solution

by:
Tol_cv earned 250 total points
Comment Utility
you should not use proxypass with  ajp connectors, with ajp connectors use mod_jk, JKmount directoves,  configure workers in worker.properties etc.
if you want to use proxypass:

ProxyPass          http://127.0.0.1:8080/
    ProxyPassReverse     http://127.0.0.1:8080/

assuming 8080 is your tomcat port (not ajp connector port).
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now