<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
How about this (not tested)?<br>
<blockquote cite="mid:4AE2BB09.6020801@cerego.co.jp" type="cite">&nbsp;&nbsp;
error_page&nbsp;&nbsp; 503 @maintenance;
  <br>
  <br>
&nbsp;&nbsp; location @maintenance {
  <br>
&nbsp;&nbsp;&nbsp;&nbsp; auth_basic off;
  <br>
&nbsp;&nbsp;&nbsp;&nbsp; root /var/www/foobar/nginx_error_test/system;
  <br>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp; if ($content_type ~* javascript) {
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite . /system/maintenance.json last;
  <br>
&nbsp;&nbsp;&nbsp;&nbsp; }
  <br>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp; if ($content_type ~* xml) {
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite . /system/maintenance.xml last;
  <br>
&nbsp;&nbsp;&nbsp;&nbsp; }
  <br>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp; rewrite . /system/maintenance.html last;
  <br>
&nbsp;&nbsp; }
  <br>
  <br>
&nbsp;&nbsp; if (-f $request_filename) {
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;
  <br>
&nbsp;&nbsp; }
  <br>
  <br>
&nbsp;&nbsp; if (-f $request_filename.html) {
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite (.*) $1.html last;
  <br>
&nbsp;&nbsp; }
  <br>
  <br>
}
  <br>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<div
 style="font-family: sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 1.1; font-size-adjust: none; font-stretch: normal; width: 300px; color: rgb(51, 51, 51);">
<p><strong>Phillip B Oldham</strong><br>
ActivityHQ<br>
<a href="mailto:phill@theactivitypeople.co.uk">phill@activityhq.com</a></p>
<hr size="1">
<p style="font-size: 90%;"><strong>Policies</strong></p>
<p style="font-size: 90%;">This e-mail and its attachments are intended
for the above named recipient(s) only and may be confidential. If they
have come to you in error, please reply to this e-mail and highlight
the error. No action should be taken regarding content, nor must you
copy or show them to anyone.</p>
<p style="font-size: 90%;">This e-mail has been created in the
knowledge that Internet e-mail is not a 100% secure communications
medium, and we have taken steps to ensure that this e-mail and
attachments are free from any virus. We must advise that in keeping
with good computing practice the recipient should ensure they are
completely virus free, and that you understand and observe the lack of
security when e-mailing us.</p>
<hr size="1">
</div>
</div>
</body>
</html>