<p dir="ltr">Hi Adam,</p>
<p dir="ltr">Why not use @named location directly?</p>
<p dir="ltr">error_page 503 @unavailable;<br>
location @unavailable {<br>
alias /absolute/path/to/file;<br>
}</p>
<p dir="ltr"><br>
</p>
<p dir="ltr">Notice the path is not related to document root.<br>
</p>
<p dir="ltr"><br>
On Tue, Aug 25, 2015, 05:33 Joó Ádám <<a href="mailto:adam@jooadam.hu">adam@jooadam.hu</a>> wrote:</p>
<blockquote><p dir="ltr">Hi Francis,</p>
<p dir="ltr">Thank you for your response. After some further reading I think now I<br>
get the processing cycle. I would rather not create a separate root<br>
for one file, so I settled with the following:</p>
<p dir="ltr"> location = /unavailable.html {<br>
return 503;<br>
}</p>
<p dir="ltr"> location @unavailable {<br>
try_files /unavailable.html =500;<br>
}</p>
<p dir="ltr"> try_files $uri =503;</p>
<p dir="ltr"> error_page 503 @unavailable;<br></p>
<p dir="ltr">Thanks,<br>
Ádám</p>
<p dir="ltr">_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</p>
</blockquote>
<p dir="ltr"><br>
</p>