You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Qingshan Xie <xi...@yahoo.com> on 2007/06/06 00:33:44 UTC

[users@httpd] How to define multiple paths for ProxyPass and ProxyPassReverse?

Hi! all,

   In Apache/2.0.59, if I need to specify multiple
paths for  "ProxyPass and ProxyPassReverse", for
example, I need to proxy 3 paths /A, /B, /C to
http://www.foo.com
do I need to configure them as, 
......
ProxyPass: /A http://www.foo.com
ProxyPassReverse: /A http://www.foo.com
ProxyPass: /B http://www.foo.com
ProxyPassReverse: /B http://www.foo.com
ProxyPass: /C http://www.foo.com
ProxyPassReverse: /C http://www.foo.com
...... ?

If a hundred paths need to be defined, any simple way?

Thx, Q.Xie



       
____________________________________________________________________________________
Choose the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.
http://autos.yahoo.com/carfinder/

---------------------------------------------------------------------
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] How to define multiple paths for ProxyPass and ProxyPassReverse?

Posted by Qingshan Xie <xi...@yahoo.com>.
Thanks a lot for your quick reply!

Yes, we are setting a reverse proxy.  Have not found a
simple way to define the multiple paths.

Q.Xie

--- Dragon <dr...@crimson-dragon.com> wrote:

> Qingshan Xie wrote:
> >Hi! all,
> >
> >    In Apache/2.0.59, if I need to specify multiple
> >paths for  "ProxyPass and ProxyPassReverse", for
> >example, I need to proxy 3 paths /A, /B, /C to
> >http://www.foo.com
> >do I need to configure them as,
> >......
> >ProxyPass: /A http://www.foo.com
> >ProxyPassReverse: /A http://www.foo.com
> >ProxyPass: /B http://www.foo.com
> >ProxyPassReverse: /B http://www.foo.com
> >ProxyPass: /C http://www.foo.com
> >ProxyPassReverse: /C http://www.foo.com
> >...... ?
> >
> >If a hundred paths need to be defined, any simple
> way?
> ---------------- End original message.
> ---------------------
> 
> You can use a rewrite rule to handle the forward
> proxy using the [P] 
> flag to proxy the request. However, I do not know
> how to do this for 
> the reverse proxy using mod_rewrite.
> 
> There is a small discussion on how to do this in the
> Apache 
> documentation on mod_rewrite on the Apache web site.
> 
> 
> Dragon
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   Venimus, Saltavimus, Bibimus (et naribus canium
> capti sumus)
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
>
---------------------------------------------------------------------
> 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
> 
> 



 
____________________________________________________________________________________
It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

---------------------------------------------------------------------
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] How to define multiple paths for ProxyPass and ProxyPassReverse?

Posted by Dragon <dr...@crimson-dragon.com>.
Qingshan Xie wrote:
>Hi! all,
>
>    In Apache/2.0.59, if I need to specify multiple
>paths for  "ProxyPass and ProxyPassReverse", for
>example, I need to proxy 3 paths /A, /B, /C to
>http://www.foo.com
>do I need to configure them as,
>......
>ProxyPass: /A http://www.foo.com
>ProxyPassReverse: /A http://www.foo.com
>ProxyPass: /B http://www.foo.com
>ProxyPassReverse: /B http://www.foo.com
>ProxyPass: /C http://www.foo.com
>ProxyPassReverse: /C http://www.foo.com
>...... ?
>
>If a hundred paths need to be defined, any simple way?
---------------- End original message. ---------------------

You can use a rewrite rule to handle the forward proxy using the [P] 
flag to proxy the request. However, I do not know how to do this for 
the reverse proxy using mod_rewrite.

There is a small discussion on how to do this in the Apache 
documentation on mod_rewrite on the Apache web site.


Dragon

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


---------------------------------------------------------------------
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