Welcome! Log In Create A New Profile

Advanced

Query_String not matching

Roland RoLaNd
September 11, 2014 11:34AM
Hello,

I am obviously a new nginx user, so please bear with me.

I have setup nginx as a content caching service, running on port 80 and directing traffic to backend servers.

all works okay, though one specific scenario where i want to cache an object matching a specific query string.

Here's a sample:

..../ getimage.view&id=19823&class=5617&size=80 

I want to cache objecting matching : class=5617&size=80 
since obviously the ID will change depending on user.


i googled  nginx config,etc... everything i found simply explains that i could match $uri and $args but not how to bypass args 

i tried the following:

 if ($uri ~* "^getimage.view") {
  set $args $2$3;
  set $cache_key $scheme$host$uri$is_args$args;
    }


But it's not working....
any advice? or better yet any place i can learn more about manipulating query strings ?

Thanks in advance. 
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Query_String not matching

Roland RoLaNd September 11, 2014 11:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 280
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready