Solved

Connecting Apache 2.2 and Tomcat 5.5.17

Posted on 2006-07-23
3
8,495 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
ID: 17175159
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Apache server crashes randomly 38 120
Apache 2.2 on Windows 2008 32 84
phpPgAdmin problem 14 200
Web site: http forwards to https causing 301 errors - SEO issue? 26 37
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

830 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