Unfortunately this works great when nginx is *directly* giving a 503 code, but when used with return 503 : error_page 503 /system/maintenance.html; return 503; The custom page isn't taken into account... Posted at Nginx Forum: http://forum.nginx.org/read.php?2,25859,27528#msg-27528