title: Nginx - Exclude specific file or folder from logging to access.log
body: <p>I'm using an access and error log in Nginx.</p>
  
  <p>I have extremely large number of requests for stats which take up too much storage space in access.log and are not required.</p>
  
  <p>Is it possible to exclude a specific file or folder from logging to access.log?</p>
  
  <p>I would like to exclude all requests to <code>/stats/</code></p>
  
  <pre><code>server {
      listen  80 default_server;
      listen  443 ssl default_server;
      server_name ***.co.uk www.***.co.uk;
  
      root  /var/www/***/html;
      index index.html index.php;
  
      access_log /var/www/***/log/access.log;
      error_log /var/www/***/log/error.log;
  }    
  </code></pre>