title: PHP-FPM and Nginx rewrite causing download
body: <p>I have an Nginx HTTP server with PHP-FPM set up and almost everything works fine.  I want to be able to go to <code>path/to/file</code> and it give me <code>index.php?url=path/to/file</code>, which it does.  However, it downloads the actual PHP, it won't execute it in the browser.  I'm not sure what is causing this.</p>
  
  <p>Nginx configuration:</p>
  
  <pre><code>server {
      listen 80;
      server_name sandbox.domain.tld;
      access_log /path/to/domain/log/sandbox.access.log;
      error_log /path/to/domain/log/sandbox.error.log;
  
      location / {
          root /path/to/sandbox;
          index index.php;
  
          if (!-e $request_filename) {
              rewrite ^/beta/(.+)$ /beta/index.php?url=$1 break;
          }
      }
  
      location ~ \.php$ {
          fastcgi_pass 127.0.0.1:9000;
          fastcgi_index index.php;
          include /usr/local/nginx/conf/fastcgi_params;
          fastcgi_param SCRIPT_FILENAME /path/to/sandbox$fastcgi_script_name;
      }
  </code></pre>