Custom 503 Error Page
Igor Sysoev
igor at sysoev.ru
Fri Nov 27 09:02:42 MSK 2009
On Thu, Nov 26, 2009 at 11:32:17PM +0100, Spirit Spirit wrote:
> > error_page 503 @503;
> > location @503 {
> > rewrite ^(.*)$ /system/maintenance.html break;
> > }
> >
> > if (-f $document_root/system/maintenance.html) {
> > return 503;
> > }
>
> Great! Thanks to share it works great when I hardcode the return nbr. I
> don't understand why the following code doesn't work...
>
> error_page 503 @503;
> location @503 {
> set $page 503;
> rewrite ^(.*)$ /503.html break;
>
> }
>
> if ($page = 503) {
> return 503;
> }
> // or why not return $page;
>
> Any tips?
error_page 503 /system/maintenance.html;
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list