title: Nginx php-fpm subdirectory
body: <p>I want to run php-fpm via nginx, but for different locations I want to specify different roots:</p>
  
  <p>for path:
  <code>
  http://localhost/ -&gt; /usr/share/nginx/html
  http://localhost/pma -&gt; /var/www/default/phpMyAdmin/
  http://localhost/pga -&gt; /var/www/default/phpPgAdmin/
  </code></p>
  
  <p>My configuration doesn't work properly:</p>
  
  <pre><code>server {
      listen       80;
      server_name  localhost;
      root         /usr/share/nginx/html;
  
      try_files $uri =404;
      index index.php index.html;
  
      location / {
      }
  
      # redirect server error pages to the static page /40x.html
      #
      error_page  404 /404.html;
          location = /40x.html {
      }
  
      # redirect server error pages to the static page /50x.html
      #
      error_page   500 502 503 504  /50x.html;
          location = /50x.html {
      }
  
      location /pma {
          root /var/www/default/phpMyAdmin;
          try_files $uri =404;
          index index.html index.php;
      }
  
      location ~ \.php$ {             
          try_files $uri =404;
          include        fastcgi_params;
  
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          fastcgi_pass   127.0.0.1:9000;
          fastcgi_index  index.php;
          fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
      }
  
      # deny access to .htaccess files, if Apache's document root
      # concurs with nginx's one
      #
      location ~ /\.ht {
          deny  all;
      }
  }
  </code></pre>
  
  <p>I always receive 404 error.</p>