为什么我的nginx失败了?


0
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)

Answers:


0

你的日志描述它:

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指令是重复的”)。检查并纠正它!

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.