title: nginx alias+location directive
body: <pre><code>server {
      listen      80;
      server_name  pwta; 
      root html;
  
      location /test/{
          alias html/test/;
          autoindex on;
      }
      location ~ \.php$ {
          fastcgi_pass   127.0.0.1:9000;
          fastcgi_index  index.php;
          fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
          include        fastcgi_params;
      }
  }
  </code></pre>
  
  <p>This configuration works.  However, if <code>location /test/</code> is replaced e.g. <code>location /testpath/</code> it doesn't work (No input file specified). I assumed base on the explanation of alias directive that the "location" part is dropped and thus <code>/testpath/info.php</code> would result in <code>html/test/info.php</code>.</p>
  
  <p>Thanks for any suggestion.</p>