2024年09月27日 建站教程
nginx无法启动php如何解决?下面web建站小编给大家简单介绍一下解决方法!
解决方法如下:
找到nginx配制文件位置是/etc/nginx/sites-available/default
location ~ \.php$ {
root /var/www/html;
include snippets/fastcgi-php.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
修改完成nginx配制文件后,要重启nginx才生效
/etc/init.d/nginx restart
本文链接:http://so.lmcjl.com/news/14065/