You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by wi <ic...@gmail.com> on 2007/04/23 08:33:02 UTC
[users@httpd] Proxying GET and POST requests
Hi all
We have a need (driven by some load/caching issues) to split our incoming
traffic so that GET requests go to one set of servers and POST requests go
to another part of the farm. Unfortunately, there's no simple URI based way
of identifying which is which, so I'm wondering whether there is some way to
do this that I've missed.
I imagine it would be possible to come up with a mod_perl solution to this,
but if there's some sort of simple "Pure Apache" way, I'd like to try that
first.
thanks
Wayne
--
2X7 -> %A-3+ -> %K-7+ -> %9-?+ -> %Q-8 -> ?9-?9+
Re: [users@httpd] Proxying GET and POST requests
Posted by Pid <p...@pidster.com>.
wi wrote:
> Hi all
>
> We have a need (driven by some load/caching issues) to split our
> incoming traffic so that GET requests go to one set of servers and POST
> requests go to another part of the farm. Unfortunately, there's no
> simple URI based way of identifying which is which, so I'm wondering
> whether there is some way to do this that I've missed.
>
> I imagine it would be possible to come up with a mod_perl solution to
> this, but if there's some sort of simple "Pure Apache" way, I'd like to
> try that first.
http://httpd.apache.org/docs/2.2/mod/core.html#limit
If you're using mod_proxy you might be able to set up proxy instructions
inside a pair <Limits>.
<LimitExcept POST>
#do 'get', etc stuff
</LimitExcept>
<Limit POST>
#do post stuff
</Limit>
p
</guess>
> thanks
> Wayne
>
> --
> 2X7 -> %A-3+ -> %K-7+ -> %9-?+ -> %Q-8 -> ?9-?9+
[users@httpd] Re: Proxying GET and POST requests
Posted by Joost de Heer <sa...@xs4all.nl>.
wi wrote:
> Hi all
>
> We have a need (driven by some load/caching issues) to split our incoming
> traffic so that GET requests go to one set of servers and POST requests go
> to another part of the farm. Unfortunately, there's no simple URI based
> way
> of identifying which is which, so I'm wondering whether there is some way
> to
> do this that I've missed.
>
> I imagine it would be possible to come up with a mod_perl solution to
> this,
> but if there's some sort of simple "Pure Apache" way, I'd like to try that
> first.
mod_rewrite can do this, something like this:
RewriteCond %{REQUEST_METHOD} POST
RewriteRule /(.*) http://posthost.my.domain/$1 [P,L]
RewriteRule /(.*) http://gethost.my.domain/$1 [P]
Joost
---------------------------------------------------------------------
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