title: nginx location deny by file extension syntax
body: <p>I wrote two different settings, one for denying access to dotfiles, and the other for denying access to a list of file extensions.</p>
  
  <p>But, is there any syntax that could deny dotfiles in the list of other file extensions?</p>
  
  <pre><code>location ~* \.(7z|bak|bash|bz2|config|dist|engine|fla|git|gz|inc|inc|info|ini|install|iso|log|make|module|profile|psd|py|rar|rb|sh|sql|swp|tar|zip)$ {
  deny all;
  }
  
  location ~ /\. { deny all; access_log off; log_not_found off; }
  </code></pre>