sudo journalctl -xn
-- Logs begin at Fri 2016-03-11 10:51:11 UTC, end at Fri 2016-03-11 11:21:33 UTC. --
Mar 11 11:21:12 server sudo[1095]: pam_unix(sudo:session): session opened for user root by chris(uid=0)
Mar 11 11:21:12 server systemd[1]: Starting A high performance web server and a reverse proxy server...
-- Subject: Unit nginx.service has begun with start-up
-- Defined-By: systemd
- 支持:http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Unit nginx.service has begun starting up.
Mar 11 11:21:13 server nginx[1104]: nginx: [emerg] "fastcgi_pass" directive is duplicate in /etc/nginx/sites-enabled/def
Mar 11 11:21:13 server nginx[1104]: nginx: configuration file /etc/nginx/nginx.conf test failed
Mar 11 11:21:13 server systemd[1]: nginx.service: control process exited, code=exited status=1
Mar 11 11:21:13 server systemd[1]: Failed to start A high performance web server and a reverse proxy server.
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
- 支持:http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 单元 nginx.service 已失败。
-- The result is failed.
Mar 11 11:21:13 server systemd[1]: Unit nginx.service entered failed state.
Mar 11 11:21:13 server sudo[1095]: pam_unix(sudo:session): session closed for user root
Mar 11 11:21:33 server sudo[1113]: chris : TTY=pts/0 ; PWD=/etc/nginx/sites-available ; USER=root ; COMMAND=/bin/journal
Mar 11 11:21:33 server sudo[1113]: pam_unix(sudo:session): session opened for user root by chris(uid=0)
答案1
您的日志对此进行了描述:
3 月 11 日 11:21:13 服务器 nginx[1104]: nginx: [emerg] “fastcgi_pass” 指令在 /etc/nginx/sites-enabled/def 中重复
3月11日 11:21:13 服务器 nginx[1104]: nginx: 配置文件 /etc/nginx/nginx.conf 测试失败
您的配置文件无效,它包含一些错误(“fastcgi_pass 指令重复”)。请检查并更正!