Welcome! Log In Create A New Profile

Advanced

Re: Issue with proxy_cache_key after rewrite

Piotr Sikora
December 24, 2010 08:34PM
Hi,

> So i've added the following:
> proxy_cache_key "$scheme$host$request_uri";

Try using "$scheme$host$uri$is_args$args" ;)

> when i remove the proxy_cache_key from the config i get the following key:
> http://interal_host:internal_port/documents/test.pdf
>
> so something here seems to be "strange". Because the default key is:
> default: $scheme$proxy_host$request_uri;

No, default key isn't calculated from variables...
It's something like: "${proxy_scheme}://$proxy_host$uri$is_args$args"

Also, "$proxy_host" returns whatever you've got in your "proxy_pass"
directive, so in case you've got "proxy_pass http://127.0.0.1:8000" it will
return "127.0.0.1:8000".

> first: $scheme seems to be http when beeing used, but http:// when
> default.

See above.

> second: the $request_uri is not rewritten when defined as key, but it
> seems
> to be rewritten by default.

"$request_uri" isn't used in the default cache key.

Best regards,
Piotr Sikora < piotr.sikora@frickle.com >


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

Issue with proxy_cache_key after rewrite

Sven 'Darkman' Michels December 24, 2010 06:02PM

Re: Issue with proxy_cache_key after rewrite

Piotr Sikora December 24, 2010 08:34PM

Re: Issue with proxy_cache_key after rewrite

Eugaia December 24, 2010 08:44PM

Re: Issue with proxy_cache_key after rewrite

Maxim Dounin December 24, 2010 10:52PM

Re: Issue with proxy_cache_key after rewrite

Sven 'Darkman' Michels December 25, 2010 08:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 71
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