title: nginx configuration won't deliver static assets
body: <p>I want to deliver static assets via a virtual directory, but I'm stuck at the following two problems.</p>
  
  <ol>
  <li>I'm redirected to an URL where nginx wants to add a trailing slash to the file name and </li>
  <li>the system thinks that I want a directory listing instead of a single file, resulting in nginx doing the wrong thing.</li>
  </ol>
  
  <p>Example from the error.log file:</p>
  
  <pre><code>2014/04/24 11:21:37 [error] 6808#6952: *15 directory index of "E:/fileserver/intranet/" is forbidden, client: 192.168.110.79, server: intraTest, request: "GET /intraStatic/employees/0C0C3E08-5056-A300-0E2C2FF5D437C6A3.png/ HTTP/1.1", host: "intraTest"
  </code></pre>
  
  <p>Snippet from my config file:</p>
  
  <pre><code>location ~ /intraStatic/ {
      autoindex  off;
      alias  e:/fileserver/intranet/;
      break;
  }
  </code></pre>
  
  <p>Since the log includes the path mentioned in the alias I know that the location block is not ignored, but I can't access the files in there even though the <strong>file system permissions are just fine</strong> and the file exists and hasn't been corrupted by anything.</p>
  
  <p>Since Google just responds with results where each one is even more useless than the previous ones I can only hope that someone here can shed some light on the matter.</p>
  
  <p>Thanks in advance for your replies!</p>