<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body 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 / { }
<div>I try to setup 503 as you suggest, but I don'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"><<a
moz-do-not-send="true" href="mailto:vt@chgk.info">vt@chgk.info</a>></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 /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 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>
</body>
</html>