Yet another "No input file specified." thread

Igor Sysoev is at rambler-co.ru
Fri Sep 25 11:48:24 MSD 2009


On Fri, Sep 25, 2009 at 01:26:43AM +0100, Nuno Magalh??es wrote:

> On Fri, Sep 25, 2009 at 00:21, Rob Schultz <rschultz7 at gmail.com> wrote:
> [...]
> 
> >>        location ~ \.php$ {
> >>                fastcgi_pass   127.0.0.1:9000;
> >>                fastcgi_index  index.php;
> >>                include /etc/nginx/fastcgi_params;
> >>        }
> 
> Try using something like:
> 
> 	location ~ \.(php|html)$ {
> 		fastcgi_pass   localhost:yourPort;
> 		include fastcgi_params;
> 	# add aditional parameters only after the include, so they'll override
> 		fastcgi_index  index.php;
> 		fastcgi_param  SCRIPT_FILENAME /path/to/your/docroot$fastcgi_script_name;
> 		fastcgi_param DOCUMENT_ROOT /path/to/your/docroot;
> 		fastcgi_intercept_errors on; # for easier debug
> 	}
> 
> Mainly, the document_root param should be afer the include, otherwise
> you're using your server's doc_root instead of your site's doc_root. I
> think...

No, it's enough to add "root" in

    location ~ \.php$ {
        root /path/to/your/docroot;
        ...


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list