<p>On Apr 16, 2012 6:03 PM, "michael_teter" <<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>> wrote:<br>
><br>
> Thanks for the quick response. My error log shows nothing, but my<br>
> access log does show the visit.</p>
<p>Use higher level error logging. See <a href="http://nginx.org/en/docs/ngx_core_module.html#error_log">http://nginx.org/en/docs/ngx_core_module.html#error_log</a>. </p>
<p>><br>
> Here's the relevant part of my config:<br>
><br>
><br>
> server {<br>
> listen 80;<br>
> server_name <a href="http://www.ourname.com">www.ourname.com</a>;<br>
> rewrite ^(.*) https://$server_name$1 permanent;<br>
> }<br>
> server {<br>
> listen 443;<br>
> server_name <a href="http://www.ourname.com">www.ourname.com</a>;<br>
> #try_files $uri /maintenance.html @passenger;</p>
<p>Why are you not using this line? It's the perfect use case for "try_files". Note that I believe that you should remove the leading "/" from "/maintenance.html".</p>
<p>> root /home/michael/ourname/public;<br>
><br>
> # MT added 20120416<br>
> error_page 503 /maintenance.html;<br>
> if (-f $document_root/../tmp/stop.txt) {<br>
> set $maintenance 1;<br>
> }<br>
><br>
> if ($maintenance) {<br>
> return 503;<br>
> }</p>
<p>This is a lot more work than using the above "try_files". See also <a href="http://wiki.nginx.org/IfIsEvil">http://wiki.nginx.org/IfIsEvil</a>. </p>
<p>><br>
> passenger_enabled on;<br>
> #rails_env development;<br>
> rails_env production;<br>
> location @passenger {<br>
> passenger_enabled on;<br>
> root /home/michael/ourname/public;<br>
> }<br>
><br>
> ssl on;<br>
> ssl_certificate /home/michael/ssl_keys/ourname.com_ssl.crt;<br>
> ssl_certificate_key /home/michael/ssl_keys/Cert1.key;<br>
> #return 403;<br>
> }<br>
><br>
> Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,225392,225395#msg-225395">http://forum.nginx.org/read.php?2,225392,225395#msg-225395</a><br>
><br>
> </p>
<p>Jim</p>