Welcome! Log In Create A New Profile

Advanced

Change proxy_cache options depending on status code received

Serban Teodorescu
September 08, 2022 11:00AM
Hello,

I’d like to configure nginx to put up a standard maintenance page depending on the status code received from the upstream (currently for 502, 503 and 504, cached for 3 minutes).

This works pretty simple and well, but I would like to ensure the maintenance page is being served directly on all urls.

Currently the cache_key contains $request_uri ar the end, of course, to make sure the caching is working properly when everything is fine.

Would you be able to please point into the right direction?

Thank you!
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

Change proxy_cache options depending on status code received

Serban Teodorescu September 08, 2022 11:00AM

Re: Change proxy_cache options depending on status code received

Serban Teodorescu September 08, 2022 11:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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