Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
There are several reasons for the No input file specified error:
1. You have not set the SCRIPT_FILENAME variable in the nginx config;
2. An incorrect root argument was specified in the nginx config;
3. The open_basedir variable in /etc/php5/fpm/php.ini or in the php5-fpm pool config contains a path that does not match the root argument in the nginx config;
4. The user with the rights of which php5-fpm is running or a specific php5-fpm pool does not have access rights to the directory or file with the php script;
An example of the correct nginx + php5-fpm config:
server {
....
root /var/www/mysite.com;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
try_files $uri = 404;
fastcgi_pass unix:/var/lib/php5-fpm/mysite.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question