Setting location header

Joe Van Dyk joe at pinkpucker.net
Sun Apr 26 07:59:12 MSD 2009


I have a URL stored in memcached in the key "some-key".  I have the
following location defined:

        location /redirect-from-memcached {
          set $memcached_key  some-key;
          memcached_pass      localhost:11211;
          add_header Location What goes here?
          return 302;
        }


How can I, in nginx 0.6, access the value of "some-key" in memcached
and use it in the Location header?

Thanks,
Joe





More information about the nginx mailing list