On Mon, Feb 20, 2012 at 12:19 AM, Nginx User <nginx@nginxuser.net> wrote:
> On 19 February 2012 19:44, Edho Arief <edho@myconan.net> wrote:
>> Also have you tried this one? Instead of plain "return 503;" in server block:
> No, I haven't and don't plan to at this time because I have a setup
> that works fine as posted earlier with images, css etc all loading as
> required.
>
For completeness, the version without if (single page - all requests
returning 503, least overhead etc - put other static resources on
different domain/server):
server {
# listen etc
...
error_page 503 @503;
return 503;
location @503 {
root /;
# Immediately serves 503 page, not $uri.
# The fallback should never happen.
try_files /file/system/path/to/503.html =500;
}
...
}
--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx