已经在服务器上装了nginx和php,php-fpm(监听9000端口)
可以正常显示html,但是每当输入url打开一个php时,无法正常解析,导致变成下载模式
nginx.conf如下
现在打开php直接变成404...Orz
干脆贴出来吧,估计是这一段的问题,搞了好久都没进展....
location ~ \.php$ {
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 fastcgi_params;
}
这样写试一下 用nginx -t命令检查你的nginx配置文件是否有错误
location /index.php {
}