Welcome! Log In Create A New Profile

Advanced

Re: redirect subdomain to internal location

May 25, 2011 10:26AM
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 domain.com/client/more/stuff.htm? 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;
redis2_pass 127.0.0.1:6379;
}
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!

Chris
Subject Author Posted

redirect subdomain to internal location

chris.percol May 25, 2011 07:43AM

Re: redirect subdomain to internal location

António P. P. Almeida May 25, 2011 08:00AM

Re: redirect subdomain to internal location

chris.percol May 25, 2011 09:16AM

Re: redirect subdomain to internal location

António P. P. Almeida May 25, 2011 09:24AM

Re: redirect subdomain to internal location

Igor Sysoev May 25, 2011 09:22AM

Re: redirect subdomain to internal location

chris.percol May 25, 2011 10:26AM

Re: redirect subdomain to internal location

António P. P. Almeida May 25, 2011 11:10AM

Re: redirect subdomain to internal location

António P. P. Almeida May 25, 2011 11:18AM

Re: redirect subdomain to internal location

António P. P. Almeida May 25, 2011 11:22AM

Re: redirect subdomain to internal location

chris.percol May 25, 2011 02:14PM

Re: redirect subdomain to internal location

António P. P. Almeida May 25, 2011 03:04PM

Re: redirect subdomain to internal location

chris.percol May 26, 2011 04:34AM

Re: redirect subdomain to internal location

chris.percol May 26, 2011 06:47AM

Re: redirect subdomain to internal location

António P. P. Almeida May 26, 2011 07:06AM

Re: redirect subdomain to internal location

chris.percol May 26, 2011 08:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 61
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready