Re: Re: Apache proxy based on condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx> wrote:

From: Nick Kew <nick@xxxxxxxxxxxx>
Subject: Re: Re: Apache proxy based on condition
To: users@xxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux