Passing variables via passenger_set_cgi_param

Hi,
My nginx location configuration looks like this

location ~* ^/z/(\d+)$ {
            set $mID $1;
            set $tag_type 'z';

            access_log  /opt/nginx/logs/bright_tag.log

bright_tag_log;
if ($arg_uid ~* ‘.+’) {
access_log /opt/nginx/logs/product_uid.log
prod_log;
}

            if ($arg_orderNumber ~* '.+') {
                    access_log  /opt/nginx/logs/conversion.log

conv_log;
}

            if ($arg_prodID ~* '.+') {
                    access_log  /opt/nginx/logs/product_uid.log

prod_log;
}

            root html/bright_tag/public;
            passenger_enabled on;
            passenger_set_cgi_param UID $uid_set$uid_got;
    }

When I hit the uri /z/123, I am able to access UID parameter in my
sinatra application. But when I hit this uri /z/123?prodID=25, Nginx
does not pass UID parameter to my application. I googled around for a
while about this issue but everything was in vain. Can anyone give some
suggestions regarding this?

Thanks,
Dhaval.

ok never mind. I figured out myself.

dhaval deshpande wrote in post #1025082:

Hi,
My nginx location configuration looks like this

location ~* ^/z/(\d+)$ {
            set $mID $1;
            set $tag_type 'z';

            access_log  /opt/nginx/logs/bright_tag.log

bright_tag_log;
if ($arg_uid ~* ‘.+’) {
access_log /opt/nginx/logs/product_uid.log
prod_log;
}

            if ($arg_orderNumber ~* '.+') {
                    access_log  /opt/nginx/logs/conversion.log

conv_log;
}

            if ($arg_prodID ~* '.+') {
                    access_log  /opt/nginx/logs/product_uid.log

prod_log;
}

            root html/bright_tag/public;
            passenger_enabled on;
            passenger_set_cgi_param UID $uid_set$uid_got;
    }

When I hit the uri /z/123, I am able to access UID parameter in my
sinatra application. But when I hit this uri /z/123?prodID=25, Nginx
does not pass UID parameter to my application. I googled around for a
while about this issue but everything was in vain. Can anyone give some
suggestions regarding this?

Thanks,
Dhaval.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs