Hi,
I'm trying to setup a location config using regexp but it seems to not work.
I need to cache all http requests that starts with: /app/v1/service/try/ and contains "method=getServiceName".
Example: http://mydomaine.com/app/v1/service/try/?param1=val1¶m2=val2&method=getServiceName¶m3=val3
I used the following config:
location ~* /app/v1/service/try/(.*)getServiceName(.*) {
proxy_pass http://localhost:8080;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_ignore_headers Expires;
proxy_ignore_headers Cache-Control;
proxy_cache_valid 200 301 302 12h;
expires 12h;
proxy_cache mycachename;
}
I see in logs:
*233 test location: "/"
2010/12/14 13:44:03 [debug] 26370#0: *233 test location: "50x.html"
2010/12/14 13:44:03 [debug] 26370#0: *233 test location: ~ "/app/v1/service/try/(.*)getServiceName(.*)"
2010/12/14 13:44:03 [debug] 26370#0: *233 using configuration "/"
Thank you in advance for your help.