httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alin vasile <alinachegal...@yahoo.com>
Subject Re: [users@httpd] Re: Apache proxy based on condition
Date Thu, 18 Mar 2010 10:28:05 GMT
I tried this, with no luck.

The good part is that the proxy will be always reverse, so it is easy to accomplish only with
mod_rewrite.

--- On Thu, 3/18/10, Nick Kew <nick@webthing.com> wrote:

From: Nick Kew <nick@webthing.com>
Subject: Re: [users@httpd] Re: Apache proxy based on condition
To: users@httpd.apache.org
Date: Thursday, March 18, 2010, 1:31 AM


On 15 Mar 2010, at 19:42, alin vasile wrote:

> Hi All,
> 
>    I am configuring a reverse proxy with Apache 2.2 and I need for certain conditions
to make a request to another proxy.

Presumably this other proxy is a forward proxy?  If it's a reverse
proxy you don't need to do anything.

> For request header X-Custom-Type TYPE_1 -> forward to proxy 1
> For request header X-Custom-Type TYPE_2 -> forward to proxy 2
> etc...

Use RewriteCond to check the custom header.

>   I know that there is the directive ProxyRemote in mod_proxy but this can be used
at most with an url regular expression.

The trick here is to rewrite into different address spaces with the
relevant ProxyRemote settings.

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




      
Mime
View raw message