Reverse cache not working on start pages (solution founD)
peter_booth at me.com
Thu Oct 12 09:32:52 UTC 2017
Sounds like the problem is that you don’t have nginx configured to enforce canonical urls.
What do I mean by this?
Imagine that every page on the site has one and only one “correct URL”
So someone might type
and expect to see the same page. A site that enforces canonical URLs would do a redirect
from the non-canonical URL so the web server end up being queried of the canonical URL,
which would be cached correctly.
There is one good and one blah reason to do this. The first (good) reason is about predictability,
and making easy to solve problems. The second reason is for better SEO, though there are
other techniques to solve it.
There are so many things that can go wrong or trip us up on websites which is why ensuring
predictability whenever possible reduces the population of potential error causes.
> On Oct 12, 2017, at 4:52 AM, Dingo <nginx-forum at forum.nginx.org> wrote:
> I found the solution, but I don't understand what it does. When I add:
> proxy_cache_key "$host$uri$is_args$args";
> To a location block it magically works. I have no clue what happens, it was
> just a snippet I found on the Internet used by some other guy setting up a
> reverse proxy with cache.
> And thanks to Maxim and pbooth for trying to help me.
> Posted at Nginx Forum: https://forum.nginx.org/read.php?2,276670,276833#msg-276833
> nginx mailing list
> nginx at nginx.org
More information about the nginx