Topic: Unable to get php-fpm to work with nginx on CentOS 6
Hello,
I'm trying to use your latest php-fpm package in conjunction with the EPEL version of nginx on a minimal install CentOS6.
I've installed everything, setup everything, but php-fpm is not processing php files and simply returns "no input file specified".
For /etc/php-fpm.conf I did not change anything, but I adjusted /etc/php-fpm.d/www.conf to have
user=nginx
group=nginx
For /etc/php.ini I added date.timezone and cgi.fix_pathinfo=0
My /etc/nginx/nginx.conf is:
user nginx nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
server {
listen 80;
server_name _;
root /var/www/public;
index index.php index.html;
location ~* \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
}
I know PHP-FPM listening on 127.0.0.1:9000 is getting called when I go to the url, but it seems no matter what I do to set fastcgi_param SCRIPT_FILENAME, PHP-FPM is not recognising it as an input path?.
If you can shed some light into this, it would be great. I am wondering whether perhaps PHP-FPM is not looking for SCRIPT_FILENAME but something else.
Regards,
Ronald