Nginx proxy timeout fix

March 23, 2010    linux nginx proxy

This is something that is an easy fix. Nginx is a great web server not only for your primary site but for a proxy as well since it is made to serve a lot of requests very fast.

So it is as simple as this

location / {
  proxy_pass https://staging;
  proxy_read_timeout 500;
  proxy_next_upstream error;

The key lines are proxy_read_timeout and proxy_next_upstream.

comments powered by Disqus