我已经在Cent OS 7中安装了Nginx服务器,安装后它通过给予打开
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 status nginx.service'和'journalctl -xn' .
我该如何解决?