Php Nginx服务器在centos 7中不工作
我已经在CentOS7中安装了Nginx服务器,在安装之后,它是通过Php Nginx服务器在centos 7中不工作,php,linux,nginx,server,Php,Linux,Nginx,Server,我已经在CentOS7中安装了Nginx服务器,在安装之后,它是通过 sudo systemctl start nginx.service 指挥部。我必须运行.php文件,因此我修改了文件->nginx.conf。 我补充了以下内容 location / { root /usr/share/nginx/html; index index.php index.htm index.html; } location ~ \.php$ {
sudo systemctl start nginx.service
指挥部。我必须运行.php文件,因此我修改了文件->nginx.conf。
我补充了以下内容
location / {
root /usr/share/nginx/html;
index index.php index.htm index.html;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
include fastcgi_params;
}
进入文件->nginx.conf。
然后通过命令->
sudo systemctl restart nginx.service
但它给出了错误->
nginx.service的作业失败。请参阅“systemctl状态nginx.service”和
“journalctl-xn”了解详细信息
我怎样才能解决它 尝试检查另一个进程未在同一端口上运行。运行“systemctl status nginx”并查看错误是什么?那我们就可以帮忙了。