<p>In application I want to increase connection timeout as there is functionality to upload huge files. Currently I found the next properties:</p>

<pre><code> proxy_connect_timeout     20;
 proxy_send_timeout        20;
 proxy_read_timeout        20;
</code></pre>

<p>But the thing is that I looking to not allow so long connection through all endpoint but only for particular one.</p>

<p>Is there some way to configure Nginx "connection timeout" for particular request pattern?</p>

Speise
<p>Yes!  One of the nice things about nginx is that you can set values in a hierarchy depending on locations, paths, parameters, source IP addresses ... basically on any metadata.</p>

<pre><code>server {
    listen 443 ssl http2;
    ....
    # default timeouts here
    proxy_connect_timeout &lt;smallval&gt;;
    proxy_send_timeout &lt;smallval&gt;;
    proxy_read_timeout &lt;smallval&gt;;

    location /biguploadshere {
        proxy_connect_timeout &lt;bigval&gt;;
        proxy_send_timeout &lt;bigval&gt;;
        proxy_read_timeout &lt;bigval&gt;;
    }
}
</code></pre>
