Yet another "No input file specified." thread

Nuno Magalhães nunomagalhaes at eu.ipp.pt
Fri Sep 25 04:26:43 MSD 2009


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...

HTH

-- 
()  ascii-rubanda kampajno - kontraŭ html-a retpoŝto
/\  ascii ribbon campaign - against html e-mail





More information about the nginx mailing list