<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="" class="">Hi,<br style=""><br style="" class="">The proxying of GET requests on $args i.e. feedid=293634 goes to server2 properly.<br style="" class=""><br style="" class="">But proxying of POST requests on $args i.e. feedid=293634 always goes to server1 instead of server2.<br style="" class=""><br style="" class="">Following is configuration...<br style="" class=""><br style="" class="">1. /etc/nginx/nginx.conf contains<br style="" class=""><br style="" class="">user nginx;<br style="" class="">worker_processes 4;<br style="" class="">error_log /var/log/nginx/error.log warn;<br style="" class="">pid /var/run/nginx.pid;<br style="" class="">events {<br style="" class="">worker_connections 1024;<br style="" class="">}<br style="" class="">http {<br style="" class="">include /etc/nginx/proxy.conf;<br style="" class="">include
 /etc/nginx/mime.types;<br style="" class="">default_type application/octet-stream;<br style="" class="">server_names_hash_bucket_size 64;<br style="" class="">log_format main '$remote_addr - $remote_user [$time_local] "$request" '<br style="" class="">'$status $body_bytes_sent "$http_referer" '<br style="" class="">'"$http_user_agent" "$http_x_forwarded_for"';<br style="" class="">access_log /var/log/nginx/access.log main;<br style="" class="">sendfile on;<br style="" class="">keepalive_timeout 70;<br style="" class="">include /tmp/routing.conf ;<br style="" class="">}<br style="" class=""><br style="" class="">2. /etc/nginx/proxy.conf contains<br style="" class=""><br style="" class="">proxy_redirect off;<br style="" class="">proxy_set_header Host $host;<br style="" class="">proxy_set_header X-Real-IP $remote_addr;<br style="" class="">proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br style="" class="">client_max_body_size 100m;<br
 style="" class="">client_body_buffer_size 100m;<br style="" class="">proxy_connect_timeout 60;<br style="" class="">proxy_send_timeout 60;<br style="" class="">proxy_read_timeout 60;<br style="" class="">proxy_buffers 32 4k;<br style="" class="">proxy_next_upstream error timeout http_500 http_502 http_503 http_504 http_404 invalid_header;<br style="" class="">log_format postdata $request_body;<br style="" class=""><br style="" class=""><br style="" class="">3. /tmp/routing.conf contains<br style="" class=""><br style="" class="">upstream server1 {<br style="" class="">server 192.168.20.202:8090;<br style="" class="">}<br style="" class="">upstream server2 {<br style="" class="">server 127.0.0.1:8080;<br style="" class="">}<br style="" class=""><br style="" class="">server {<br style="" class="">listen 80;<br style="" class="">server_name mysubdomain.domain.co.in;<br style="" class=""><br style="" class="">location / {<br style="" class="">proxy_pass
 http://server1;<br style="" class=""><br style="" class="">if ( $args ~ 'feedid=293634' ) {<br style="" class="">proxy_pass http://server2;<br style="" class="">}<br style="" class="">if ( $request_method = POST ) {<br style="" class="">set $test P;<br style="" class="">}<br style="" class="">if ( $args ~ 'feedid=293634' ) {<br style="" class="">set $test "${test}C";<br style="" class="">}<br style="" class="">if ( $test = PC) {<br style="" class="">proxy_pass http://server2;<br style="" class="">}<br style="" class="">}<br style="" class="">}<br style="" class=""><br style="" class="">Any suggestions....</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;" class=""><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;" class="">Thanks,</div><div
 style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;" class="">M. G.<br style="" class=""></div></div></body></html>