nginx无法解析php脚本

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/m0_38004619/article/details/79904791

nginx无法解析php脚本

1、查看nginx.conf是否配置正确

正确格式:
location ~ .php$ {
root   /usr/share/nginx/html; #可以放在全局里
fastcgi_pass   127.0.0.1:9000; #php-fpm默认端口不要改成80
fastcgi_index   index.php;
fastcgi_param  SCRIPT_FILENAME  /usr/share/nginx/html/$fastcgi_script_name;
include        fastcgi_params;

}

2、查看php-fpm是否启动  ps -aux |grep php

已启动:












猜你喜欢

转载自blog.csdn.net/m0_38004619/article/details/79904791