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@jooadam.hu> 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;
Thanks,
Ádám
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx