You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by bl...@ironwire.net on 2006/06/06 01:46:13 UTC

tomcat contexts for proxied content

I've got tomcat 5.5.17 and apache 2.2.2 installed and I'm trying to set 
up an AJP1.3 connector to proxy content from apache to tomcat.  However, 
no matter what I've tried so far, tomcat always responds with a 
"requested resource not available" error.

Following are the settings in server.xml:

<Connector port="8009" enableLookups="false" proxyName="ironwire.net" 
proxyPort="80" protocol="AJP/1.3" maxThreads="50" minSpareThreads="2" 
maxSpareThreads="25" address="127.0.0.1" />

     <Engine name="localhost" defaultHost="localhost">
       <Realm className="org.apache.catalina.realm.UserDatabaseRealm" 
resourceName="UserDatabase" />

       <Host name="localhost" appBase="/usr/local" unpackWARs="true" 
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
         <Context path="" docBase="tomcat/webapps" />
         <Context path="/" docBase="www/ironwire.net" reloadable="true" />
       </Host>
     </Engine>

And, in httpd.conf, I have:

ProxyRequests Off
ProxyPass / ajp://localhost:8009/

Does anybody have any experience with this?

Thanks,
-- Steven

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat contexts for proxied content

Posted by Marc Bächinger <mb...@bcwin.ch>.
i'm everthing but an expert in this, but i got loadbalancing with ajp working 
with those versions you mention (2.2.2 and 5.5.17). Maybe my config below is 
helpful for you.

The documentation on the net about configuration of the new built-in ajp 
support through the proxy module was rather thin. The best howto i found is 
in german (the config samples maybe helpful even if the rest is german):

http://www.linuxforen.de/forums/showthread.php?t=209010

marc

my config:

in server.xml:

      <Connector port="9002" URIEncoding="UTF-8"
                   maxThreads="25"
                   minSpareThreads="4"
                   maxSpareThreads="10"
                   enableLookups="false"
                   acceptCount="100"
                   protocol="AJP/1.3"
                   request.registerRequests="true" />
        <Engine name="Catalina"
                defaultHost="localhost"
		jvmRoute="node1" >

in httpd.conf :
-------------------------------------------
<IfModule mod_proxy_balancer.c>

    <Location /balancer-manager>
        SetHandler balancer-manager
    </Location>

    <Proxy balancer://cluster>
        BalancerMember ajp://localhost:9002 route=node1
        BalancerMember ajp://localhost:9102 route=node2
    </Proxy>

    <Location /axis2>
        ProxyPass balancer://cluster/axis2 stickysession=JSESSIONID
    </Location>
</IfModule>

Am Dienstag, 6. Juni 2006 01.46 schrieb bleak@ironwire.net:
> I've got tomcat 5.5.17 and apache 2.2.2 installed and I'm trying to set
> up an AJP1.3 connector to proxy content from apache to tomcat.  However,
> no matter what I've tried so far, tomcat always responds with a
> "requested resource not available" error.
>
> Following are the settings in server.xml:
>
> <Connector port="8009" enableLookups="false" proxyName="ironwire.net"
> proxyPort="80" protocol="AJP/1.3" maxThreads="50" minSpareThreads="2"
> maxSpareThreads="25" address="127.0.0.1" />
>
>      <Engine name="localhost" defaultHost="localhost">
>        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
> resourceName="UserDatabase" />
>
>        <Host name="localhost" appBase="/usr/local" unpackWARs="true"
> autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
>          <Context path="" docBase="tomcat/webapps" />
>          <Context path="/" docBase="www/ironwire.net" reloadable="true" />
>        </Host>
>      </Engine>
>
> And, in httpd.conf, I have:
>
> ProxyRequests Off
> ProxyPass / ajp://localhost:8009/
>
> Does anybody have any experience with this?
>
> Thanks,
> -- Steven
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org