No input file specified on nginx and php-cgi

Posted by Sandeep Bansal on Server Fault See other posts from Server Fault or by Sandeep Bansal
Published on 2013-10-26T16:51:34Z Indexed on 2013/10/26 21:59 UTC
Read the original article Hit count: 446

Filed under:
|
|

I'm trying to run nginx and php-cgi on my Windows PC, I've got up to the point where I want to move the html directory back two directory's so I can sort of create a structure.

The only problem I have now is that PHP doesn't pick up any .php file. I have tried loading a static html file (localhost/test.html) and it works fine but localhost/info.php doesn't work at all.

Can anyone give me some guidance on this? The part of the server block can be found below.

server {
        listen       80;
        server_name  localhost;
        root   ../../www;
        index  index.html index.htm index.php;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location ~ \.php$ {
          fastcgi_pass   127.0.0.1:9123;
          fastcgi_index  index.php;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          include        fastcgi_params;
        }

Thanks

© Server Fault or respective owner

Related posts about Windows

Related posts about nginx