Hi guys!
on my server cents 7 have the probably the same problem.....
from nginx/error.log
2014/12/10 23:14:25 [error] 3031#0: *1 FastCGI sent in stderr: “Unable to open primary script: /scripts/test.php (No such file or directory)” while reading response header from upstream, client: 192.168.0.102, server: 192.168.0.150, request: “GET /test.php HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php-fpm/php-fpm.sock:”, host: “192.168.0.150”
here is the nginx/default.conf
<^> server {
listen 80;
server_name 192.168.0.150;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.php index.html index.htm;
}
error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
# location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
#pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ .php$ {
root /usr/share/nginx/html;
fastcgiindex index.php;
fastcgipass unix:/var/run/php-fpm/php-fpm.sock;
fastcgiparam SCRIPTFILENAME /scripts$fastcgiscriptname;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}<^>
any ideas?
Could you post your configuration?
Also, are you checking the logs to see if there’s additional information?
Here is my nginx default.conf file:
and this is my nginx error.log file: