title: NGINX not following alias directive
body: <p>I am trying to get nginx to server some static files.  I put in what I believe should be the proper directive to alias the url, but nginx is refusing to server the page.  My server.conf is as follows:</p>
  
  <pre><code>server {
  
          listen 80 default_server;
          listen [::]:80 default_server ipv6only=on;
  
          root /usr/share/nginx/html;
          index index.html index.htm index.php;
  
          # Make site accessible from server.fqdn.suffix
          server_name server.fqdn.suffix;
  
          location /static/ {
              autoindex on;
              alias /usr/share/nginx/html/poindexter/inspire/static/;
          }
  
          # Include the basic h5bp config set
          include /etc/nginx/h5bp/basic.conf;
  }
  </code></pre>
  
  <p>I assumed that this would redirect to the <code>/usr/share/nginx/html/poindexter/inspire/static/</code> directory.  And for the autoindex it seems to work.  But when you click on a file it generates a 404 error.  I took an strace and sure enough, it is not honoring the alias.  </p>
  
  <pre><code>[pid  2542] &lt;... epoll_wait resumed&gt; {{EPOLLIN, {u32=1822502928, u64=139901792235536}}}, 512, 4294967295) = 1
  [pid  2542] accept4(10, {sa_family=AF_INET, sin_port=htons(37845), sin_addr=inet_addr("198.55.232.86")}, [16], SOCK_NONBLOCK) = 24
  [pid  2542] epoll_ctl(21, EPOLL_CTL_ADD, 24, {EPOLLIN|EPOLLET, {u32=1822503697, u64=139901792236305}}) = 0
  [pid  2542] epoll_wait(21, {{EPOLLIN, {u32=1822503697, u64=139901792236305}}}, 512, 10000) = 1
  [pid  2542] recvfrom(24, "GET /static/css/bootstrap.min.cs"..., 1024, 0, NULL, NULL) = 772
  [pid  2542] open("/usr/share/nginx/html/static/css/bootstrap.min.css", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
  [pid  2542] write(8, "2014/03/05 21:59:23 [error] 2542"..., 328) = 328
  [pid  2542] writev(24, [{"HTTP/1.1 404 Not Found\r\nServer: "..., 172}, {"&lt;html&gt;\r\n&lt;head&gt;&lt;title&gt;404 Not Fou"..., 116}, {"&lt;hr&gt;&lt;center&gt;nginx&lt;/center&gt;\r\n&lt;/bo"..., 46}], 3) = 334
  [pid  2542] setsockopt(24, SOL_TCP, TCP_NODELAY, [1], 4) = 0
  [pid  2542] recvfrom(24, 0x14e9240, 1024, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable
  </code></pre>
  
  <p>I would really appreciate any help I could get.  I am very stuck.</p>