title: How to make nginx try_files log file when it is not found?
body: <pre><code>server {
      server_name foo.com;
  
      listen 80;
  
      root '/var/www';
  
      location /divergent {
          try_files 'bar' =400;
      }
  }
  </code></pre>
  
  <p>In this example, I would like to get a message such as:</p>
  
  <pre><code>2015/03/27 17:53:49 [error] 25248#0: *1 open() '/var/www/bar' failed (2: No such file or directory), client: 37.187.147.109, server: foo.com, request: "GET /bar HTTP/1.1", host: "foo.com"
  </code></pre>
  
  <p>I would like to get the above message; I do get it sometimes, sometimes I do not. I do not understand what makes the message to propagate.</p>
  
  <p>HTTP block is configured to log all messages:</p>
  
  <pre><code>http {
      error_log /var/log/nginx/error.log debug;
  
      # ...
  }
  </code></pre>