<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">So each time, if I want to change to a maintained status, I have to add this line to the nginx configuration file and then restart the config? Is there a simpler way, so that I don't need to change the settings of the server.&nbsp;<div><br><div><div>On Apr 7, 2011, at 4:15 PM, Pascal Nitsche wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div bgcolor="#ffffff" text="#000000">
    Hello!<br>
    <br>
    To return a http status simply add "return STATUS_CODE;" to your
    config location. So to return a 503 type:<br>
    <br>
    return 503;<br>
    <br>
    MfG<br>
    <br>
    Am 07.04.2011 10:13, schrieb Spacelee:
    <blockquote cite="mid:BANLkTikro__52BC_W0rpOiZwoR+s8g3iLA@mail.gmail.com" type="cite">thanks, it works using try_files, and I put it in the
      location / { }&nbsp;
      <div>I try to setup 503 as you suggest, but I don't know how to
        trigger the 503 status?&nbsp;</div>
      <div><br>
      </div>
      <div><br>
        <div class="gmail_quote">On Wed, Mar 23, 2011 at 11:39 PM,
          Vitaly Tskhovrebov <span dir="ltr">&lt;<a moz-do-not-send="true" href="mailto:vt@chgk.info">vt@chgk.info</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">On 3/23/2011 6:35 PM, Space Lee wrote:<br>
            <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
              0.8ex; border-left: 1px solid rgb(204, 204, 204);
              padding-left: 1ex;">
              I have a question, if I want to use nginx to main the
              maintenance file, and what's the easiest way for me to
              change a web to maintained status when it's in emergency?<br>
            </blockquote>
            <br>
            try_files &nbsp;/www/maintenance.html $uri &nbsp;$uri/<br>
            <br>
            It will be better to return 503 in that case as well.<br>
            <br>
            -- <br>
            Regards, Vitaly Tskhovrebov<br>
            System Administrator<br>
            U.S. <a moz-do-not-send="true" href="tel:%2B1%20%28206%29%20905-9939" value="+12069059939" target="_blank">+1 (206) 905-9939</a><br>
            Russia <a moz-do-not-send="true" href="tel:%2B7%20911%20094-2035" value="+79110942035" target="_blank">+7 911 094-2035</a><br>
            <br>
            _______________________________________________<br>
            nginx mailing list<br>
            <a moz-do-not-send="true" href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
            <a moz-do-not-send="true" href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        <div><b>Space Lee</b></div>
        <br>
      </div>
      <pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://nginx.org/mailman/listinfo/nginx">http://nginx.org/mailman/listinfo/nginx</a>
</pre>
    </blockquote>
    <br>
  </div>

_______________________________________________<br>nginx mailing list<br><a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>http://nginx.org/mailman/listinfo/nginx<br></blockquote></div><br></div></body></html>