Welcome! Log In Create A New Profile

Advanced

Re: proxy_cache_valid depending on $host

Phil Endecott
January 26, 2021 12:22PM
Maxim Dounin wrote:
> On Mon, Jan 25, 2021 at 04:26:49PM +0000, Phil Endecott wrote:
>> 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.

Thanks again, that is the obvious solution and it does seem to work.
I was imagining the the server_name would be matched only against the
Host: header in a regular HTTP request, not the hostname in the request
line in a proxy request - but it seems to do what I want.


Regards, Phil.




_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy_cache_valid depending on $host

Phil Endecott January 25, 2021 11:28AM

Re: proxy_cache_valid depending on $host

Maxim Dounin January 25, 2021 11:40AM

Re: proxy_cache_valid depending on $host

Phil Endecott January 26, 2021 12:22PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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