Improved nginx.conf for Ruby On Rails

Kenneth Kalmer kenneth.kalmer at
Tue Oct 7 14:35:45 MSD 2008

On Mon, Oct 6, 2008 at 7:07 PM, W. Andrew Loe III <andrew at> wrote:
> Special tweaks include enabling the first request of rails cached
> stylesheets to be served by the mongrel, but all future requests
> served by the web server. Far Futures expires. Support for 503'ing and
> displaying a maintenance page.
> A lot of this was taken from Ezra Zygmuntowicz's post last year.

Just to add to Ezra's config file, checkout a lengthy post at
on some fine print for the proxy_next_upstream directive. This is
probably only applicable to Rails apps that have long running
requests, like intensive reports or integration into slow third party


Kenneth Kalmer
kenneth.kalmer at

More information about the nginx mailing list