我已经运行nginx -t
并且返回成功。
启动时,我看到有关 nginx 无法启动的消息,并且当我尝试nginx
或时它不会启动service nginx start
相反,我收到一条消息来检查journal -xn
和systemctl
。这是我检查这些时得到的结果...有人可以帮助我运行它吗?
root@e:/home/matt# systemctl status nginx.service • nginx.service -
A high performance web server and a reverse proxy server Loaded:
loaded (/lib/systemd/system/nginx.service; enabled) Active: failed
(Result: exit-code) since Mon 2015-02-16 13:36:23 EST; 22s ago
Process: 1071 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on;
master_process on; (code=exited, status=1/FAILURE)
Feb 16 13:36:23 e nginx[1071]: nginx: [emerg] "daemon" directive is
duplicate in /etc/nginx/nginx.conf:87 Feb 16 13:36:23 e nginx[1071]:
nginx: configuration file /etc/nginx/nginx.conf test failed Feb 16
13:36:23 e systemd[1]: nginx.service: control process exited,
code=exited status=1 Feb 16 13:36:23 e systemd[1]: Failed to start A
high performance web server and a reverse proxy server. Feb 16
13:36:23 e systemd[1]: Unit nginx.service entered failed state.
root@e:/home/matt# journalctl -xn
-- Logs begin at Mon 2015-02-16 13:34:47 EST, end at Mon 2015-02-16 13:41:06 EST. -- Feb 16 13:36:23 e systemd[1]: Failed to start A high
performance web server and a reverse proxy server.
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nginx.service has failed.
--
-- The result is failed. Feb 16 13:36:23 e systemd[1]: Unit nginx.service entered failed state. Feb 16 13:39:01 e CRON[1086]:
pam_unix(cron:session): session opened for user root by (uid=0) Feb 16
13:39:01 e CRON[1087]: (root) CMD ( [ -x /usr/lib/php5/sessionclean ]
&& /usr/lib/php5/sessionclean) Feb 16 13:39:01 e CRON[1086]:
pam_unix(cron:session): session closed for user root Feb 16 13:41:06 e
nginx[1129]: nginx: [emerg] "daemon" directive is duplicate in
/etc/nginx/nginx.conf:87 Feb 16 13:41:06 e nginx[1129]: nginx:
configuration file /etc/nginx/nginx.conf test failed Feb 16 13:41:06 e
systemd[1]: nginx.service: control process exited, code=exited
status=1 Feb 16 13:41:06 e systemd[1]: Failed to start A high
performance web server and a reverse proxy server.
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nginx.service has failed.
--
-- The result is failed. Feb 16 13:41:06 e systemd[1]: Unit nginx.service entered failed state.