Recently, lighttpd + fastcgi + php or nginx + fastcgi + php is often frustrated by php's "Noinputfilespecified.". let's talk about my situation.
Recently, lighttpd + fastcgi + php or nginx + fastcgi + php is often frustrated by the "No input file specified." of php. let me explain my situation.
First, in the configuration of php. ini
Cgi. fix_pathinfo = 1
Doc_root =
I have set a path for doc_root. as a result, php always prompts "No input file specified.". Only one VM can be used. After the change, it will be normal.
Configuration in nginx is troublesome.
Fastcgi_pass 127.0.0.1: 1234;
Fastcgi_index index. php;
Fastcgi_param SCRIPT_FILENAME/var/www/html $ fastcgi_script_name;
Each virtual machine must set an inaccessible directory based on its own virtual machine. ensure that the path is correct.
Fastcgi_param SCRIPT_FILENAME/var/www/html $ fastcgi_script_name; cannot be in front of fastcgi_pass 127.0.0.1: 1234.
Remember to restart the fastcgi service after modifying php. ini.
In fact, it was caused by carelessness. it was very easy to write and remind myself.