I have two iKaaro instances running on port 8080 and 9080, where the 9080 instance is Read only.
I am unsure how to use nginx for example if the request method is PO
I'd recommend the nginx map function. This goes outside of your location block:
map $request_method $destination {
default 8080;
PUT 9080;
POST 9080;
DELETE 9080;
}
Then in your location block:
proxy_pass http://127.0.0.1:$destination
This is all regexes too, so you can do things like:
map $request_method $cookie_auth $destination {
default 8080;
"^POST " 9080;
"^PUT someAuthCookieValue" 9080;
}
Plus this avoids the use of if at all. It's pretty awesome. I used it to direct all write traffic in a WordPress cluster to one FastCGI TCP socket on a remote node but send read traffic to a local FastCGI UNIX socket.