title: NGINX: serve ONLY specific file types in all directories
body: <p>I need to <strong>only</strong> serve .vmdk and .vmx files on a virtual server, no matter what directory level. This is my current configuration (right now it serves all, but if I uncomment the lower part it serves nothing):</p>
  
  <pre><code>server {
      listen  80;
      server_name vmdk;
  
      access_log  /var/log/nginx/localhost.access.log;
      root /srv/vmdk/public;
  
      location ~ (./?|\vmdk|\vmx)$ {
              autoindex on;
      }
  
  
      #location / {
      #       deny all;
      #}
  
  }
  </code></pre>
  
  <p>How do I achieve this?</p>
  
  <p>If it is easier to achieve with Apache, then an example Apache configuration is also appreciated.</p>