Hello Maxim,
OK got it now ;-)
It's working, you saved my day :-D
So to put it in a nutshell:
- I used perl switcher_test::handler in my location /
- in the handler method I call $r->has_request_body(\& test) and in test method according to what I found in the body I do an internal_redirect (as far as I understood it can only redirect to a location in the same vhost) to /proxy1 (or /proxy2 depending) and return.
- in /proxyX I do a rewrite /proxyX(.*) $1 break; proxy_pass http://my_upstream
It's working perfectly but I just wonder if there is a more elegant/efficient way to do it ?
RĂ©mi