No Input File Specified

Edho Arief edho at myconan.net
Mon Mar 5 02:18:19 UTC 2012


2012/3/5 Sageth <nginx-forum at nginx.us>:
> Hi, I'm fairly new to Nginx (an Apache convert) and have run into an
> issue where my site works, but one particular POST function fails with
> "No Input File Specified."  The POST is a port of an old IPBv2 script to
> submit scores into a database via the URL:
> http://www.example.com/game/123/index.php?act=Arcade&do=newscore
>
> I have verified permissions
>
> In Apache, the RewriteRule was:
> RewriteRule ^game/(.*)/(.*)\.php$ index.php?act=Arcade&do=newscore [L]
>
> In nginx, I have:
> rewrite ^/game/(.*)/(.*)\.php$ /index.php?act=Arcade&do=newscore last;
>
> Here's my site's .conf (some info masked).  Can anyone help point me in
> a direction? I'm not sure what I'm missing and I've spent a solid 12
> hours on it, so would greatly appreciate any help.
>
> server {
>        listen   80;
>        server_name     www.example.com;
>        root            /var/www/example;
>        location / {
>                try_files $uri $uri/ @gss;
>        }
>        location ~ \.php$ {
>          try_files $uri /index.php?$args =404;
>          if ($uri !~ "^/uploads/") {
>                fastcgi_pass   unix:/var/run/php-fcgi.pid;
>          }

You need more than this here. Also rather than checking whether than
it starts with /uploads/ after entering uploads, you should create
separate location block to handle this url.



More information about the nginx mailing list