tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <>
Subject Re: ProxyPaths and mod_proxy_ajp
Date Wed, 05 Mar 2008 16:00:46 GMT
Seems to me you are using Apache as a front-end to
TC. In which case you are telling Apache that whatever is
under /examples should be handled by TC, everything else
is local... Right so far?

If so, then you for SURE do not what to configure Apache
as a forward proxy, which is what you are doing with the
ProxyRequests On directive. For a simple reverse proxy
you should make sure that Apache is not also a forward
one as well... checkout

On Feb 27, 2008, at 4:17 PM, Stephen Nelson-Smith wrote:

> Hi,
> I have an application which, due to restrictions by third party
> developers must run on Tomcat 4.1.31 with Java version 1.4.2_11.
> I am deploying this on a new RHEL 5 machine, with
> httpd-2.2.3-11.el5_1.3.  From my reading, it appears that
> mod_proxy_ajp is the way to go, and I aim to loadbalance several
> instances, so this seems to be ideal.
> I am testing with the default Tomcat webapps - I would like to be able
> to enter: and get the webapps, where I can
> click on the examples and run them.
> On tomcat the path is:
> I am trying to understand the following behavour:
> The relevant apache config is:
>      <IfModule mod_proxy.c>
>      ProxyRequests On
>      <Proxy *>
>          Order allow,deny
>          Allow from all
>      </Proxy>
>      LoadModule proxy_ajp_module modules/
>      ProxyPass /examples/ ajp://localhost:8080/examples/
>      ProxyVia on
> My server.xml contains:
> <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
>               port="8080" maxHttpHeaderSize="8192"
>               maxThreads="150" minSpareThreads="25"  
> maxSpareThreads="75"
>               enableLookups="false" redirectPort="8443"  
> acceptCount="100"
>               connectionTimeout="20000" disableUploadTimeout="true"
>               proxyName="" proxyPort="80"/>
> When I browse to I get a tomcat-served
> directory listing, which I can use to navigate to the examples, from
> whence I can click on the examples, and they work.
> If I add /servlets to both sides of the ProxyPass directive, I can
> browse directly to the directory listing, but if I click on one of the
> examples I get a 404 / resource unavailable.
> Why is this happening?  How do I get to map to the
> examples, in such a way that I can click on them and they work?
> Once this is tested and working, I will roll out the real app.  What's
> the recommended way to mix in apache virtual hosts, so I can browse to
> and be mapped to
> /some/path/which/eventually/logs/into/the/app?
> Thanks,
> S.
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message