基于后端响应将nginx缓存内容提供给浏览器

时间:2017-06-05 15:38:31

标签: apache nginx

我可以从Nginx向tomcat或Apache服务器发出请求,然后在收到此请求的响应后,我将决定是从Nginx缓存服务还是从后端服务器(即Apache)服务

1 个答案:

答案 0 :(得分:0)

在服务器中使用proxy_cache_use_stale会有所帮助。 你可以像这样使用它

location / { ... proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; }

了解更多here

相关问题