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.

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;
    }
}

1 Reply

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

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct