April 16, 2015 07:04AM

I'm running nginx as a reverse proxy for a website, and we have an occasional problem where one of the back end servers occasionally sends an errant 301 with caching headers as the home page for the site. nginx then caches this and responds to any requests with this redirect to the wrong place.

I've rtfm and clearly need to use proxy_no_cache and proxy_cache_bypass, but I'm none the wiser on how to actually format it for this, or indeed whether it's possible to control based on the http response code?

Subject Author Posted

Prevent caching of 301 redirects

petestorey April 16, 2015 07:04AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

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