Linode Forum Index Linode Forum
Linode Community Forums
 


Possible fastcgi misconfiguration

Click here to go to the original topic

 
       Linode Forum Index -> Web Servers and Web App Development
Author Message
ChemicalKicks



Joined: 27 Nov 2011
Posts: 15

Posted: Sun Jan 01, 2012 7:32 pm    Post subject: Possible fastcgi misconfiguration  

I have an arcade installed on my forum, the games pass their score to [forum]/arcade.php however this file doesn't actually exist. Under Apache this system worked but with NginX the process is falling over.

Forum URL
www.the-sps.org

Arcade URL
www.the-sps.org/arcade

The following URL should pass of as the Arcade URL above but throws up a 404
www.the-sps.org/arcade.php

I'm rubbish at explaining it but this guy Kevin over at XenForo did a pretty good job. You'll maybe need to read a couple of posts up to get the context.

Code: server {
   listen            80 default_server;
   server_name         the-sps.org;
   access_log         off;
   error_log         /srv/www/the-sps.org/logs/error.log;
   root            /srv/www/the-sps.org/public_html;
   index            index.php index.html;

   location / {
    try_files $uri $uri/ /index.php?$uri&$args;
    index index.php index.html;
   }
   
   location /internal_data/ {
    internal;
   }
   
   location /library/ {
    internal;
    }

   location ~ \.php$ {
      fastcgi_split_path_info   ^(.+\.php)(/.+)$;
      fastcgi_pass      127.0.0.1:9000;
      fastcgi_param      PATH_INFO   $fastcgi_path_info;
      fastcgi_param      PATH_TRANSLATED   $document_root$fastcgi_script_name;
      include         fastcgi_params;
   }
}
Back to top  
ChemicalKicks



Joined: 27 Nov 2011
Posts: 15

Posted: Wed Jan 04, 2012 11:48 am    Post subject:  

I've just noticed something.

Route handling seems to work with any other file extension just not .php

For example
http://the-sps.org/arcade.mp3 works you can actually add any extension you like and it'll work
http://the-sps.org/arcade.php doesn't
Back to top  
 
       Linode Forum Index -> Web Servers and Web App Development
Page 1 of 1