You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by aireana <ai...@gmail.com> on 2007/09/11 08:14:56 UTC

[users@httpd] ProxyPassReverse doesn't work...,Help!

Apache 2.2.4 on Fedora core 6
I try to run JVM server on port 7979
it is on local machine at http://localhost:7979
There are http://localhost:7979/profile/login  and others.

Try to use ProxyPassReverse but it doesn't work!!
Here , my configuration.

************
httpd.conf  
************
<IfModule mod_proxy.c>
ProxyRequests On
<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>
</IfModule>


************
mingle.conf
************
ProxyPreserveHost On
ProxyPass /mingle/ http://localhost:7979/
ProxyPassReverse /mingle/ http://localhost:7979/

###At 7979 is running JVM server.
### It should work with configuration above, but it doesnt'.
###So I add Location to make sure. But no difference. T T

<Location "mingle" >
    ProxyPass http://localhost:7979/
    ProxyPassReverse http://localhost:7979/
</Location>

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
||Any suggestion. Thanks for your time.||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Ps. The ProxyPass works well.

-- 
View this message in context: http://www.nabble.com/ProxyPassReverse-doesn%27t-work...%2CHelp%21-tf4420517.html#a12608708
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyPassReverse doesn't work...,Help!

Posted by aireana <ai...@gmail.com>.


aireana wrote:
> 
> Apache 2.2.4 on Fedora core 6
> I try to run JVM server on port 7979
> it is on local machine at http://localhost:7979
> There are http://localhost:7979/profile/login  and others.
> 
> Try to use ProxyPassReverse but it doesn't work!!
> Here , my configuration.
> 
> ************
> httpd.conf  
> ************
> <IfModule mod_proxy.c>
> ProxyRequests Off
> <Proxy *>
>     Order deny,allow
>     Allow from all
> </Proxy>
> </IfModule>
> 
> 
> ************
> mingle.conf
> ************
> ProxyPreserveHost On
> ProxyPass /mingle/ http://localhost:7979/
> ProxyPassReverse /mingle/ http://localhost:7979/
> 
> ###At 7979 is running JVM server.
> ### It should work with configuration above, but it doesnt'.
> ###So I add Location to make sure. But no difference. T T
> 
> <Location "mingle" >
>     ProxyPass http://localhost:7979/
>     ProxyPassReverse http://localhost:7979/
> </Location>
> 
> |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> ||Any suggestion. Thanks for your time.||
> |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> 
> Ps. The ProxyPass works well.
> 
> 


Sorry, ProxyRequests is Off , actually.I typed in rush.

ProxyPass works. I want to map http://localhost:7979/ and all under it to
"/mingle".

As ProxyPassReverse is On, when I was route to somewhere from "/mingle" (for
example, from "http://localhost:7979" to
"http://localhost:7979/profile/login" ), it should change to
"mingle/profile/login" instead, right?
But I doesn't. It route me to "/profile/login" which happen to be 404.

~'"*Thank you very much.*"'~

-- 
View this message in context: http://www.nabble.com/ProxyPassReverse-doesn%27t-work...%2CHelp%21-tf4420517.html#a12614972
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyPassReverse doesn't work...,Help!

Posted by Brian Munroe <br...@gmail.com>.
On 9/11/07, Joshua Slive <jo...@slive.ca> wrote:

> http://wiki.apache.org/httpd/WatchingHttpHeaders
>
> > ProxyPass /mingle/ http://192.168.50.89:7979/
> > ProxyPassReverse /mingle/ http://192.168.50.89:7979/
> >
> > <Location /mingle/ >
> >     ProxyPass http://192.168.50.89:7979/
> >      ProxyPassReverse http://192.168.50.89:7979/
> > </Location>
>
> Don't use both of these. One ProxyPass and ProxyPassReverse is sufficient.
>

Also, you need to identify the full URL on the ProxyPass, unless your
'mingle' application is
the ROOT application in Tomcat.

For example:

<Location /mingle>
    ProxyPass http://192.168.50.89:7979/mingle
    ProxyPassReverse http://192.168.50.89:7979/mingle
</Location>

-- brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyPassReverse doesn't work...,Help!

Posted by Joshua Slive <jo...@slive.ca>.
On 9/11/07, Chanita Siridechkun <ai...@gmail.com> wrote:
> Hello,
>
> Got error 502 from httpd
> [Tue Sep 11 ] [error] [client 192.168.50.89] proxy: error reading status
> line from remote server 192.168.50.89
> [Tue Sep 11 ] [error] [client 192.168.50.89] proxy: error reading from
> remote server returned by /mingle/

Looks like the back-end server is returning garbage. Have you tried
running these requests manually from the server?
http://wiki.apache.org/httpd/WatchingHttpHeaders

> ProxyPass /mingle/ http://192.168.50.89:7979/
> ProxyPassReverse /mingle/ http://192.168.50.89:7979/
>
> <Location /mingle/ >
>     ProxyPass http://192.168.50.89:7979/
>      ProxyPassReverse http://192.168.50.89:7979/
> </Location>

Don't use both of these. One ProxyPass and ProxyPassReverse is sufficient.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyPassReverse doesn't work...,Help!

Posted by Chanita Siridechkun <ai...@gmail.com>.
Hello,

Got error 502 from httpd
[Tue Sep 11 ] [error] [client 192.168.50.89] proxy: error reading status
line from remote server 192.168.50.89
[Tue Sep 11 ] [error] [client 192.168.50.89] proxy: error reading from
remote server returned by /mingle/

My current configuration:
******************
httpd.conf
******************
ServerName 192.168.50.89
UseCanonicalName On

*****************
mingle.conf
*****************
ProxyPass /mingle/ http://192.168.50.89:7979/
ProxyPassReverse /mingle/ http://192.168.50.89:7979/

<Location /mingle/ >
    ProxyPass http://192.168.50.89:7979/
    ProxyPassReverse http://192.168.50.89:7979/
</Location>

Thank you  * Thank you
P.s. ( T  T )

2007/9/11, Joshua Slive <jo...@slive.ca>:
>
> On 9/11/07, aireana <ai...@gmail.com> wrote:
>
> > > ProxyPreserveHost On
> > > ProxyPass /mingle/ http://localhost:7979/
> > > ProxyPassReverse /mingle/ http://localhost:7979/
>
> > As ProxyPassReverse is On, when I was route to somewhere from "/mingle"
> (for
> > example, from "http://localhost:7979" to
> > "http://localhost:7979/profile/login" ), it should change to
> > "mingle/profile/login" instead, right?
> > But I doesn't. It route me to "/profile/login" which happen to be 404.
>
> I don't know what you mean by "route to somewhere". ProxyPassReverse
> will ONLY modify Location headers from your back-end server. These are
> typically generated by an "HTTP redirect".
>
> Also, using ProxyPreserveHost and ProxyPassReverse in combination is
> usually a mistake. You probably want to get rid of the
> ProxyPreserveHost and use the correct hostname in place of localhost
> in the ProxyPassReverse directive. Otherwise, the redirects coming
> back from your back-end will not be to "localhost" and therefore will
> not be caught by the ProxyPassReverse.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] ProxyPassReverse doesn't work...,Help!

Posted by Joshua Slive <jo...@slive.ca>.
On 9/11/07, aireana <ai...@gmail.com> wrote:

> > ProxyPreserveHost On
> > ProxyPass /mingle/ http://localhost:7979/
> > ProxyPassReverse /mingle/ http://localhost:7979/

> As ProxyPassReverse is On, when I was route to somewhere from "/mingle" (for
> example, from "http://localhost:7979" to
> "http://localhost:7979/profile/login" ), it should change to
> "mingle/profile/login" instead, right?
> But I doesn't. It route me to "/profile/login" which happen to be 404.

I don't know what you mean by "route to somewhere". ProxyPassReverse
will ONLY modify Location headers from your back-end server. These are
typically generated by an "HTTP redirect".

Also, using ProxyPreserveHost and ProxyPassReverse in combination is
usually a mistake. You probably want to get rid of the
ProxyPreserveHost and use the correct hostname in place of localhost
in the ProxyPassReverse directive. Otherwise, the redirects coming
back from your back-end will not be to "localhost" and therefore will
not be caught by the ProxyPassReverse.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyPassReverse doesn't work...,Help!

Posted by aireana <ai...@gmail.com>.


aireana wrote:
> 
> Apache 2.2.4 on Fedora core 6
> I try to run JVM server on port 7979
> it is on local machine at http://localhost:7979
> There are http://localhost:7979/profile/login  and others.
> 
> Try to use ProxyPassReverse but it doesn't work!!
> Here , my configuration.
> 
> ************
> httpd.conf  
> ************
> <IfModule mod_proxy.c>
> ProxyRequests Off
> <Proxy *>
>     Order deny,allow
>     Allow from all
> </Proxy>
> </IfModule>
> 
> 
> ************
> mingle.conf
> ************
> ProxyPreserveHost On
> ProxyPass /mingle/ http://localhost:7979/
> ProxyPassReverse /mingle/ http://localhost:7979/
> 
> ###At 7979 is running JVM server.
> ### It should work with configuration above, but it doesnt'.
> ###So I add Location to make sure. But no difference. T T
> 
> <Location "mingle" >
>     ProxyPass http://localhost:7979/
>     ProxyPassReverse http://localhost:7979/
> </Location>
> 
> |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> ||Any suggestion. Thanks for your time.||
> |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> 
> Ps. The ProxyPass works well.
> 
> 


Sorry, ProxyRequests is Off , actually.I typed in rush.

ProxyPass works. I want to map http://localhost:7979/ and all under it to
"/mingle".

As ProxyPassReverse is On, when I was route to somewhere from "/mingle" (for
example, from "http://localhost:7979" to
"http://localhost:7979/profile/login" ), it should change to
"mingle/profile/login" instead, right?
But I doesn't. It route me to "/profile/login" which happen to be 404.

~'"* Thank you very much.*"'~

-- 
View this message in context: http://www.nabble.com/ProxyPassReverse-doesn%27t-work...%2CHelp%21-tf4420517.html#a12614974
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org