Yet another "No input file specified." thread

hobson42 nginx-forum at nginx.us
Fri Sep 25 02:52:14 MSD 2009


Hi folks. 
I've been tearing what little hair I have left out trying to find the problem with this. 
nginx version 0.7.61 installed from Jeff Waughs site.  On Ubuntu 9.4 Jackalope. 

/etc/nginx/nginx.conf - standard, as issued. #
/etc/nginx/sites-enabled/default  contains
server {
	listen 80;
	server_name localhost ;
	access_log  /var/log/nginx/localhost.access.log;
	location / {
		root   /var/www/nginx-default;
		index  index.html index.htm;
	}
	location ~ \.php$ {
		fastcgi_pass   127.0.0.1:9000;
		fastcgi_index  index.php;
		include /etc/nginx/fastcgi_params;
	}
}

/etc/nginx/fastcgi_params contains 
fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;

fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;
fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;

fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;      
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param  REDIRECT_STATUS    200;

Symptoms
http://localhost/missing.htm  - error 404      correct
http://localhost           - serves index.htm     correct
http://localhost/present.htm  - served correctly         
http://localhost/present.php  - can give two errors
   if fastcgi gateway is running I get  "No input file spcified." 
   if the fastcgi gateway is not up, I get Bad Gateway, 
So I know the gateway is running, I telnet'ed into it - and it kicked me out. 

if I run the present.php file on the command line it runs as expected. 

I'm sure it is something so very simple that I'm kick myself - I just can't see what. 

Any help with this much appreciated. 

Ian

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,9100,9100#msg-9100






More information about the nginx mailing list