You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Luiz Fabiano T.I CTO (Tempo Filmes)" <ti...@tempofilmes.com.br> on 2010/10/26 13:47:12 UTC

Help with tomcat 5.5 and Apache2 (404 issues)

Hi folks,

                I'm trying to use Apche and Tocamt 5.5 together, I want to
answer request in http://mydomain.com/  in tomcat with my ROOT/.do  but when
I use /blog for example, I want to answer this request by Apache, I got a
wordpress blog there, which only be able to answer on port 80, but no matter
what I do, when I get error 404, Tomcat cannot send this one through apache.
Below are my server.xml and my virtualhost in apache called tomcat.conf.

 

Thanks in advice:

Server.xml:

 

<?xml version='1.0' encoding='utf-8'?>

<Server port="54100" shutdown="shutdowntomcatproDuc@o">

 

  <Service name="Catalina">

    <Connector port="8080" protocol="AJP/1.3" redirectPort="8443" />

    <Engine name="Catalina"

   defaultHost="localhost"

   jvmRoute="tomcat-producao">

 

      <Host name="localhost"

   appBase="webapps"

            unpackWARs="true"

   autoDeploy="false"

            xmlValidation="false"

   xmlNamespaceAware="false">

    </Host>

 

    </Engine>

  </Service>

</Server>

~

 

Tomcat.conf:

ProxyRequests On

ProxyPreserveHost On

<Proxy balancer://cloud>

 BalancerMember ajp://localhost:8080 route=tomcat-producao

</Proxy>

<Location / >

 ProxyPass balancer://cloud/ stickysession=JSESSIONID

 ProxyPass /blog /var/www/blog

</Location>

 

 

 


RES: RES: Help with tomcat 5.5 and Apache2 (404 issues)

Posted by "Luiz Fabiano T.I CTO (Tempo Filmes)" <ti...@tempofilmes.com.br>.
Pretty nice, it's works great for me..!

ProxyRequests On
ProxyPreserveHost On
<Proxy balancer://cloud>
 BalancerMember ajp://localhost:8080 route=tomcat-producao
</Proxy>
 ProxyPass /blog !
 ProxyPass /media !
<Location / >
   ProxyPass balancer://cloud/ stickysession=JSESSIONID
</Location>

-----Mensagem original-----
De: Pid [mailto:pid@pidster.com] 
Enviada em: terça-feira, 26 de outubro de 2010 12:44
Para: Tomcat Users List
Assunto: Re: RES: Help with tomcat 5.5 and Apache2 (404 issues)

On 26/10/2010 14:14, Luiz Fabiano T.I CTO (Tempo Filmes) wrote:
> Dear PiD
> 
> 	It's doesn't works for me, when I try to lauch apache2 the deamon 
> sends it for me: "ProxyPass URL must be absolute!", I've tried to put 
> full path, with and without domain, anyway nothing good happened, I 
> still with the problem and I will waiting for more help from you and 
> the community, I'll be so grateful if someone help me up.

Sorry, you're right.  The ! instruction only works when defined outside of a
Location block.

In which case, you'll need to define:

 ProxyPass /blog !
 ProxyPass /       balancer... etc

Instead of defining <Location ...>


p


> Thank you all
>  
> 
> -----Mensagem original-----
> De: Pid [mailto:pid@pidster.com]
> Enviada em: terça-feira, 26 de outubro de 2010 10:04
> Para: Tomcat Users List
> Assunto: Re: Help with tomcat 5.5 and Apache2 (404 issues)
> 
> On 26/10/2010 12:47, Luiz Fabiano T.I CTO (Tempo Filmes) wrote:
>> Hi folks,
>>
>>                 I'm trying to use Apche and Tocamt 5.5 together, I 
>> want to answer request in http://mydomain.com/  in tomcat with my 
>> ROOT/.do  but when I use /blog for example, I want to answer this 
>> request by Apache, I got a wordpress blog there, which only be able 
>> to answer on port 80, but no matter what I do, when I get error 404, 
>> Tomcat
> cannot send this one through apache.
>> Below are my server.xml and my virtualhost in apache called tomcat.conf.
>>
>>  
>>
>> Thanks in advice:
>>
>> Server.xml:
>>
>>  
>>
>> <?xml version='1.0' encoding='utf-8'?>
>>
>> <Server port="54100" shutdown="shutdowntomcatproDuc@o">
>>
>>  
>>
>>   <Service name="Catalina">
>>
>>     <Connector port="8080" protocol="AJP/1.3" redirectPort="8443" />
>>
>>     <Engine name="Catalina"
>>
>>    defaultHost="localhost"
>>
>>    jvmRoute="tomcat-producao">
>>
>>  
>>
>>       <Host name="localhost"
>>
>>    appBase="webapps"
>>
>>             unpackWARs="true"
>>
>>    autoDeploy="false"
>>
>>             xmlValidation="false"
>>
>>    xmlNamespaceAware="false">
>>
>>     </Host>
>>
>>  
>>
>>     </Engine>
>>
>>   </Service>
>>
>> </Server>
>>
>> ~
>>
>>  
>>
>> Tomcat.conf:
>>
>> ProxyRequests On
>>
>> ProxyPreserveHost On
>>
>> <Proxy balancer://cloud>
>>
>>  BalancerMember ajp://localhost:8080 route=tomcat-producao
>>
>> </Proxy>
>>
>> <Location / >
>>  ProxyPass balancer://cloud/ stickysession=JSESSIONID  ProxyPass 
>> /blog /var/www/blog </Location>
> 
> Try the following instead:
> 
>> <Location / >
>>  ProxyPass /blog !
>>  ProxyPass balancer://cloud/ stickysession=JSESSIONID </Location>
> 
> 
> In your original the first ProxyPass overrides the second, and the 
> second isn't like to work as you can't proxy a request to a
file/directory.
> 
> 
> p
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 



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


Re: RES: Help with tomcat 5.5 and Apache2 (404 issues)

Posted by Pid <pi...@pidster.com>.
On 26/10/2010 14:14, Luiz Fabiano T.I CTO (Tempo Filmes) wrote:
> Dear PiD
> 
> 	It's doesn't works for me, when I try to lauch apache2 the deamon
> sends it for me: "ProxyPass URL must be absolute!", I've tried to put full
> path, with and without domain, anyway nothing good happened, I still with
> the problem and I will waiting for more help from you and the community,
> I'll be so grateful if someone help me up.

Sorry, you're right.  The ! instruction only works when defined outside
of a Location block.

In which case, you'll need to define:

 ProxyPass /blog !
 ProxyPass /       balancer... etc

Instead of defining <Location ...>


p


> Thank you all
>  
> 
> -----Mensagem original-----
> De: Pid [mailto:pid@pidster.com] 
> Enviada em: terça-feira, 26 de outubro de 2010 10:04
> Para: Tomcat Users List
> Assunto: Re: Help with tomcat 5.5 and Apache2 (404 issues)
> 
> On 26/10/2010 12:47, Luiz Fabiano T.I CTO (Tempo Filmes) wrote:
>> Hi folks,
>>
>>                 I'm trying to use Apche and Tocamt 5.5 together, I 
>> want to answer request in http://mydomain.com/  in tomcat with my 
>> ROOT/.do  but when I use /blog for example, I want to answer this 
>> request by Apache, I got a wordpress blog there, which only be able to 
>> answer on port 80, but no matter what I do, when I get error 404, Tomcat
> cannot send this one through apache.
>> Below are my server.xml and my virtualhost in apache called tomcat.conf.
>>
>>  
>>
>> Thanks in advice:
>>
>> Server.xml:
>>
>>  
>>
>> <?xml version='1.0' encoding='utf-8'?>
>>
>> <Server port="54100" shutdown="shutdowntomcatproDuc@o">
>>
>>  
>>
>>   <Service name="Catalina">
>>
>>     <Connector port="8080" protocol="AJP/1.3" redirectPort="8443" />
>>
>>     <Engine name="Catalina"
>>
>>    defaultHost="localhost"
>>
>>    jvmRoute="tomcat-producao">
>>
>>  
>>
>>       <Host name="localhost"
>>
>>    appBase="webapps"
>>
>>             unpackWARs="true"
>>
>>    autoDeploy="false"
>>
>>             xmlValidation="false"
>>
>>    xmlNamespaceAware="false">
>>
>>     </Host>
>>
>>  
>>
>>     </Engine>
>>
>>   </Service>
>>
>> </Server>
>>
>> ~
>>
>>  
>>
>> Tomcat.conf:
>>
>> ProxyRequests On
>>
>> ProxyPreserveHost On
>>
>> <Proxy balancer://cloud>
>>
>>  BalancerMember ajp://localhost:8080 route=tomcat-producao
>>
>> </Proxy>
>>
>> <Location / >
>>  ProxyPass balancer://cloud/ stickysession=JSESSIONID  ProxyPass /blog 
>> /var/www/blog </Location>
> 
> Try the following instead:
> 
>> <Location / >
>>  ProxyPass /blog !
>>  ProxyPass balancer://cloud/ stickysession=JSESSIONID </Location>
> 
> 
> In your original the first ProxyPass overrides the second, and the second
> isn't like to work as you can't proxy a request to a file/directory.
> 
> 
> p
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


RES: Help with tomcat 5.5 and Apache2 (404 issues)

Posted by "Luiz Fabiano T.I CTO (Tempo Filmes)" <ti...@tempofilmes.com.br>.
Dear PiD

	It's doesn't works for me, when I try to lauch apache2 the deamon
sends it for me: "ProxyPass URL must be absolute!", I've tried to put full
path, with and without domain, anyway nothing good happened, I still with
the problem and I will waiting for more help from you and the community,
I'll be so grateful if someone help me up.

Thank you all
 

-----Mensagem original-----
De: Pid [mailto:pid@pidster.com] 
Enviada em: terça-feira, 26 de outubro de 2010 10:04
Para: Tomcat Users List
Assunto: Re: Help with tomcat 5.5 and Apache2 (404 issues)

On 26/10/2010 12:47, Luiz Fabiano T.I CTO (Tempo Filmes) wrote:
> Hi folks,
> 
>                 I'm trying to use Apche and Tocamt 5.5 together, I 
> want to answer request in http://mydomain.com/  in tomcat with my 
> ROOT/.do  but when I use /blog for example, I want to answer this 
> request by Apache, I got a wordpress blog there, which only be able to 
> answer on port 80, but no matter what I do, when I get error 404, Tomcat
cannot send this one through apache.
> Below are my server.xml and my virtualhost in apache called tomcat.conf.
> 
>  
> 
> Thanks in advice:
> 
> Server.xml:
> 
>  
> 
> <?xml version='1.0' encoding='utf-8'?>
> 
> <Server port="54100" shutdown="shutdowntomcatproDuc@o">
> 
>  
> 
>   <Service name="Catalina">
> 
>     <Connector port="8080" protocol="AJP/1.3" redirectPort="8443" />
> 
>     <Engine name="Catalina"
> 
>    defaultHost="localhost"
> 
>    jvmRoute="tomcat-producao">
> 
>  
> 
>       <Host name="localhost"
> 
>    appBase="webapps"
> 
>             unpackWARs="true"
> 
>    autoDeploy="false"
> 
>             xmlValidation="false"
> 
>    xmlNamespaceAware="false">
> 
>     </Host>
> 
>  
> 
>     </Engine>
> 
>   </Service>
> 
> </Server>
> 
> ~
> 
>  
> 
> Tomcat.conf:
> 
> ProxyRequests On
> 
> ProxyPreserveHost On
> 
> <Proxy balancer://cloud>
> 
>  BalancerMember ajp://localhost:8080 route=tomcat-producao
> 
> </Proxy>
> 
> <Location / >
>  ProxyPass balancer://cloud/ stickysession=JSESSIONID  ProxyPass /blog 
> /var/www/blog </Location>

Try the following instead:

> <Location / >
>  ProxyPass /blog !
>  ProxyPass balancer://cloud/ stickysession=JSESSIONID </Location>


In your original the first ProxyPass overrides the second, and the second
isn't like to work as you can't proxy a request to a file/directory.


p


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


Re: Help with tomcat 5.5 and Apache2 (404 issues)

Posted by Pid <pi...@pidster.com>.
On 26/10/2010 12:47, Luiz Fabiano T.I CTO (Tempo Filmes) wrote:
> Hi folks,
> 
>                 I'm trying to use Apche and Tocamt 5.5 together, I want to
> answer request in http://mydomain.com/  in tomcat with my ROOT/.do  but when
> I use /blog for example, I want to answer this request by Apache, I got a
> wordpress blog there, which only be able to answer on port 80, but no matter
> what I do, when I get error 404, Tomcat cannot send this one through apache.
> Below are my server.xml and my virtualhost in apache called tomcat.conf.
> 
>  
> 
> Thanks in advice:
> 
> Server.xml:
> 
>  
> 
> <?xml version='1.0' encoding='utf-8'?>
> 
> <Server port="54100" shutdown="shutdowntomcatproDuc@o">
> 
>  
> 
>   <Service name="Catalina">
> 
>     <Connector port="8080" protocol="AJP/1.3" redirectPort="8443" />
> 
>     <Engine name="Catalina"
> 
>    defaultHost="localhost"
> 
>    jvmRoute="tomcat-producao">
> 
>  
> 
>       <Host name="localhost"
> 
>    appBase="webapps"
> 
>             unpackWARs="true"
> 
>    autoDeploy="false"
> 
>             xmlValidation="false"
> 
>    xmlNamespaceAware="false">
> 
>     </Host>
> 
>  
> 
>     </Engine>
> 
>   </Service>
> 
> </Server>
> 
> ~
> 
>  
> 
> Tomcat.conf:
> 
> ProxyRequests On
> 
> ProxyPreserveHost On
> 
> <Proxy balancer://cloud>
> 
>  BalancerMember ajp://localhost:8080 route=tomcat-producao
> 
> </Proxy>
> 
> <Location / >
>  ProxyPass balancer://cloud/ stickysession=JSESSIONID
>  ProxyPass /blog /var/www/blog
> </Location>

Try the following instead:

> <Location / >
>  ProxyPass /blog !
>  ProxyPass balancer://cloud/ stickysession=JSESSIONID
> </Location>


In your original the first ProxyPass overrides the second, and the
second isn't like to work as you can't proxy a request to a file/directory.


p