netstat -an未发现监听9000端口。
查看/var/log/php5-fpm.log一切正常。
查看/etc/php5/fpm/pool.d/www.conf,发现listen =/var/run/php5-fpm.sock。
修改nginx下的sites配置
location ~ \.php$ {
fastcgi_pass127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
为
location ~\.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
重启php5-fpm与nginx
转载于:https://blog.51cto.com/taojinqu/1288590