title: howto setup window nginx virtual directory with php support?
body: <p>Ngigx + PHP-FPM setup and working in root-directory, but I'm having trouble getting virtual directories to work.</p>
  
  <p>I want //localhost/pb/test.php to execute c:\opt\php\public\test.php but it breaks with "no input file specified". In fact, not even .html files works, but once working, I want the php-directive to work under /pb as well.</p>
  
  <p>current nginx.conf:</p>
  
  <pre><code>server {
      listen       80;
      server_name  localhost;
  
      location / {
          root   html;
          index  index.html index.htm index.php;
      }
  
  location /pb/ {
      root   /opt/php/public;
          index  index.html index.htm index.php;
  }
  
  location ~ \.php$ {
          fastcgi_pass    127.0.0.1:9123;
          fastcgi_index   index.php;
          fastcgi_param   SCRIPT_FILENAME  $document_root$fastcgi_script_name;
      include         fastcgi_params;
  }
  }
  </code></pre>