Re: Reverse cache not working on start pages (solution founD)

2017-10-12 Thread Lucas Rolff
If your server gets hacked due to a single website, you have bigger problems, and mod_security won’t fix the issue. Consult with security professionals or give the task of managing your infrastructure to someone that can properly secure the environment. On 12/10/2017, 13.26, "nginx on behalf of

Re: Reverse cache not working on start pages (solution founD)

2017-10-12 Thread Dingo
You are right. I didn't know what canonical url:s where, but now I know. Yes there is in fact two servers. One server is running Apache with a website that has maybe 10 different DNS-domains pointing to it and then there is another server running IIS with lots of websites but usually only one DNS-d

Re: Reverse cache not working on start pages (solution founD)

2017-10-12 Thread Peter Booth
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 http://www.mydomain.com http://mydomain.com http://www.mydomain.com/index.html and

Re: Reverse cache not working on start pages (solution founD)

2017-10-12 Thread Dingo
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 th

Re: Reverse cache not working on start pages

2017-10-12 Thread Dingo
Thanks for the help, and I have found the solution now, so I will post it in this thread. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,276670,276832#msg-276832 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinf

Re: Reverse cache not working on start pages

2017-10-12 Thread Dingo
I believe that there is sometimes a problem with the cache when i connect through a private IP-address instead of always using the public address. Since I started to always use the public address and a hairpin-nat, it always works. Maybe the cache has a problem when seeing me coming from different

Re: Reverse cache not working on start pages

2017-10-04 Thread Peter Booth
I found it useful to define a dropCache location that will delete the cache on request. I did this with a shell script that I invoked with lua (via openresty) but I imagine there are multiple ways to do this. Sent from my iPhone > On Oct 4, 2017, at 11:39 AM, Maxim Dounin wrote: > > Hello! >

Re: Reverse cache not working on start pages

2017-10-04 Thread Maxim Dounin
Hello! On Wed, Oct 04, 2017 at 06:01:35AM -0400, Dingo wrote: > Another update: > > I finally deleted /data/nginx/cache/*, and now everything seems to be > working. It looks like Nginx don't bother about what cache timeout I use. If > it is 1 day, as in the example from nginx.org, everything tha

Re: Reverse cache not working on start pages

2017-10-04 Thread Dingo
Another update: I finally deleted /data/nginx/cache/*, and now everything seems to be working. It looks like Nginx don't bother about what cache timeout I use. If it is 1 day, as in the example from nginx.org, everything that was cached at that time will be remembered for 1 day. I have no clue why

Re: Reverse cache not working on start pages

2017-10-04 Thread Dingo
A small update to my problem: I started Wireshark and saw that there was no any requests going to my server as long as I used the cache. The problem seems to be in the cached content. I changed: proxy_cache_valid 200 1d; to proxy_cache_valid 200 1m; But I don't seem to get any updates to the cac

Reverse cache not working on start pages

2017-10-04 Thread Dingo
Hi! I am unable to get reverse cache working on startpages. I am using Ubuntu 16.04 with everything updated. I have tried this example: https://www.nginx.com/resources/wiki/start/topics/examples/reverseproxycachingexample/ http { proxy_cache_path /data/nginx/cache levels=1:2keys_zone=S