Internal marked 503 error page returns default 404

ryd994 ryd994 at
Tue Aug 25 02:39:14 UTC 2015

Hi Adam,

Why not use @named location directly?

error_page 503 @unavailable;
location @unavailable {
        alias /absolute/path/to/file;

Notice the path is not related to document root.

On Tue, Aug 25, 2015, 05:33 Joó Ádám <adam at> wrote:

Hi Francis,

Thank you for your response. After some further reading I think now I
get the processing cycle. I would rather not create a separate root
for one file, so I settled with the following:

    location = /unavailable.html {
        return 503;

    location @unavailable {
        try_files /unavailable.html =500;

    try_files $uri =503;

    error_page 503 @unavailable;


nginx mailing list
nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list