Hello! On Mon, Jan 25, 2021 at 04:26:49PM +0000, Phil Endecott wrote:
> Dear Experts, > > I wanted to write this: > > proxy_cache_valid 200 5m; > if ($host ~ foo) { > proxy_cache_valid 200 30d; > } > > but proxy_cache_valid is not allowed in "if" blocks. > Is there some work-around to have different cache validity times > for different hosts, in a caching proxy? Using different server{} blocks with different server_name's is the way to go, see http://nginx.org/r/server_name. -- Maxim Dounin http://mdounin.ru/ _______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx