redirect subdomain to internal location

chris.percol nginx-forum at
Wed May 25 18:26:42 MSD 2011

Thanks guys,

I get that now, in my newness to nginx I was overcomplicating things. My
server_name is now doing what I had hoped to achieve.

If you can bear with me for one more question, how do I get the 'client'
out of I want to use the 'client' part
of the uri to search a redis key/value pair.

I had success with this code for query strings but couldn't work out how
to get the first part of the uri to be my key?

       location / {
       eval_escalate on;
       eval $res {
               set_unescape_uri $key $arg_key;
               redis2_query get $key;
       set_by_lua $path "return
require('redis.parser').parse_reply(ngx.arg[1])" $res;
       proxy_pass http://app_cluster_1/$path;
       proxy_redirect off;

Thanks again for all the help!


Posted at Nginx Forum:,200694,200774#msg-200774

More information about the nginx mailing list