我正在关注有关设置 Nginx 的 youtube 视频我正在重新启动,当我获得需要编辑服务器块文件(启用站点/默认)的部分时,我完全按照他们在视频中所做的操作,但是当保存并尝试重新启动:
sudo service nginx restart
我收到此错误: nginx.service 的作业失败,因为控制进程以错误代码退出。有关详细信息,请参阅“systemctl status nginx.service”和“journalctl -xe”。
所以我跑了
systemctl status nginx.service
这给出了输出:
Active: failed (Result: exit-code) since Fri 2018-03-02 01:36:33 EST; 10min ago
我在 Ubuntu 16.04 Linux VPS 上运行所有这些
下面是 /etc/nginx/sites-enabled/default 文件的内容:
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you …Run Code Online (Sandbox Code Playgroud) nginx ×1