title: Nginx passing parameters to a PHP file
body: <p>I'm trying to <strong>pass all the requests</strong> that hits a specific <strong>location</strong>, to a <code>PHP</code> file <strong>with the request URL</strong> via Nginx config file, I've almost done this but I cannot pass the URL to the PHP file.</p>
  
  <p>I've tried <code>var_dump($_REQUEST); var_dump($_ENV); var_dump($argv);</code> but returns NULL or emtpy array results.</p>
  
  <pre><code>location /p/ {
  
       try_files $uri $uri/ @php;         
  }
  
  location @php {
          fastcgi_pass   unix:/var/run/php5-fpm.sock;
          fastcgi_index  index.php;
          fastcgi_param  SCRIPT_FILENAME  /var/process/internal/t.php; # this script catches all requests
          fastcgi_param  QUERY_STRING $uri;
          include fastcgi_params;
  }
  </code></pre>