thanks, it works using try_files, and I put it in the location / { } <div>I try to setup 503 as you suggest, but I don&#39;t know how to trigger the 503 status? </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 href="mailto:vt@chgk.info">vt@chgk.info</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On 3/23/2011 6:35 PM, Space Lee wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have a question, if I want to use nginx to main the maintenance file, and what&#39;s the easiest way for me to change a web to maintained status when it&#39;s in emergency?<br>
</blockquote>
<br>
try_files  /www/maintenance.html $uri  $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 href="tel:%2B1%20%28206%29%20905-9939" value="+12069059939" target="_blank">+1 (206) 905-9939</a><br>
Russia <a href="tel:%2B7%20911%20094-2035" value="+79110942035" target="_blank">+7 911 094-2035</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a 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>