Re: Internal marked 503 error page returns default 404

2015-08-25 Thread Francis Daly
On Tue, Aug 25, 2015 at 02:39:14AM +, ryd994 wrote: Hi there, > Why not use @named location directly? > > error_page 503 @unavailable; > location @unavailable { > alias /absolute/path/to/file; > } the "alias" directive cannot be used inside the named location f -- Francis

Re: Internal marked 503 error page returns default 404

2015-08-24 Thread ryd994
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 wrote: Hi Francis, Thank you for your response. After some furth

Re: Internal marked 503 error page returns default 404

2015-08-24 Thread Joó Ádám
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 { tr

Re: Internal marked 503 error page returns default 404

2015-08-22 Thread Francis Daly
On Sat, Aug 22, 2015 at 04:31:35AM +0200, Ádám Joó wrote: Hi there, > My goal is to have all existing files with the exception of > unavailable.html served with 200, and serving unavailable.html with > 503 for anything else and itself. > > The location is marked as internal because otherwise a d

Internal marked 503 error page returns default 404

2015-08-21 Thread Ádám Joó
Hi, I have the following configuration: server { location = /unavailable.html { internal; } try_files $uri =503; error_page 503 /unavailable.html; } My goal is to have all existing files with the exception of unavailable.html served with 200,