John,<br><br>See Ezra&#39;s response in the thread here:<br><a href="http://thread.gmane.org/gmane.comp.web.nginx.english/8978/focus=8990">http://thread.gmane.org/gmane.comp.web.nginx.english/8978/focus=8990</a><br><br>That explanation is just for a single downtime notice, but you can use a variation of his solution to accomplish what you want.&nbsp; For example:<br>
<br>server {<br>&nbsp;&nbsp;&nbsp; ...<br>&nbsp;&nbsp;&nbsp; if (-f $document_root/system/back_soon.html) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite&nbsp; ^(.*)$&nbsp; /system/back_soon.html last;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; if (-f $document_root/system/down_for_a_while.html) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite&nbsp; ^(.*)$&nbsp; /system/down_for_a_while.html last;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; ...<br>}<br><br>This will show the back_soon.html page if it exists.&nbsp; If it doesn&#39;t exist and the down_for_a_while.html page does, then that will be displayed.&nbsp; Otherwise, processing will continue normally.<br>
<br><br><div class="gmail_quote">On Thu, Jan 8, 2009 at 2:05 PM, Resicow <span dir="ltr">&lt;<a href="mailto:resicow@gmail.com">resicow@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Nginx Community, and Happy New Year...<br>
<br>
Is it possible to set the value of a variable based on the contents of a text file?<br>
<br>
So if there is site downtime, I can place a file in a directory that nginx will see and will know to serve a downtime notice, but then can nginx read the contents of the file to determine which downtime notice to serve?<br>

<br>
Thanks,<br>
<br>
John<br>
<br>
</blockquote></div><br>