Nginx Windows | Keepalive timeouts location based

Maxim Dounin mdounin at mdounin.ru
Tue Aug 26 17:02:09 UTC 2014


Hello!

On Tue, Aug 26, 2014 at 12:50:08PM -0400, c0nw0nk wrote:

> I can't tell if this is working or not so i thought i would just ask and
> perhaps someone can inform me but with nginx keep alive timeouts can we set
> different timeout values per each location or file type being accessed ?
> 
> Example :
> location ~ \.flv$ {
> flv;
> keepalive_timeout  60s;
> }
> location ~ \.mp4$ {
> keepalive_timeout  3600s;
> }

Yes, this will work.  The keepalive timer is set when nginx 
finishes processing of a request and switches the connection to 
the keepalive state.  The request configurations determines the 
timeout value to be used.  Most notably, this allows to disable 
keepalive after some specific requests.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list