<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>