Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have implemented rate limiting with Nginx (which works excellently, by the way) and would like to display a custom 503 error page.

I have followed examples on the web without luck.

I am running a simple configuration that looks something like this:

listen x.x.x.x:80
root /usr/local/www/;
error_page 503 /503.html;

location / {
  limit_req zone=default burst=5 nodelay;
  proxy_pass http://mybackend;

The idea is that our rate limited users would be shown a special page explaining what was going on. The rate limiting is working, but the built-in 503 page is rendering.

Any ideas?

share|improve this question
up vote 5 down vote accepted


location = /503.html {
  root /path/to/the/page;
share|improve this answer
Thanks! That was it! – Michael Gorsuch May 12 '10 at 19:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.