Nginx处于活动状态,但重新启动php7.2-fpm Nginx仍然失败

时间:2019-01-09 15:23:19

标签: nginx ubuntu-18.04

按照https://www.youtube.com/watch?v=4beEybPzYqQ上的YouTube教程安装Wordpress和LEMP堆栈。

每步都没有错误,除非运行systemctl restart php7.2-fpm nginx会返回错误:

Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.

所以,我做了systemctl status nginx.service,它返回了

 ● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-01-09 16:30:12 EET; 34min ago
     Docs: man:nginx(8)
  Process: 18582 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCE
  Process: 18584 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
  Process: 18583 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
 Main PID: 18585 (nginx)
    Tasks: 9 (limit: 4915)
   CGroup: /system.slice/nginx.service
           ├─18585 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;

还有journalctl -xe

-- 
-- Unit anacron.service has finished starting up.
-- 
-- The start-up result is RESULT.
jaan  09 17:04:45 zae anacron[21177]: Anacron 2.3 started on 2019-01-09
jaan  09 17:04:45 zae anacron[21177]: Normal exit (0 jobs run)
jaan  09 17:09:01 zae CRON[21298]: pam_unix(cron:session): session opened for us
jaan  09 17:09:01 zae CRON[21299]: (root) CMD (  [ -x /usr/lib/php/sessionclean 
jaan  09 17:09:01 zae systemd[1]: Starting Clean php session files...
-- Subject: Unit phpsessionclean.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit phpsessionclean.service has begun starting up.
jaan  09 17:09:01 zae CRON[21298]: pam_unix(cron:session): session closed for us
jaan  09 17:09:01 zae systemd[1]: Started Clean php session files.
-- Subject: Unit phpsessionclean.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit phpsessionclean.service has finished starting up.
-- 
-- The start-up result is RESULT.

对我来说一切都很好吗? 我检查了系统日志,但是在运行systemctl status php7.2-fpm.service时它什么也没显示。

/var/log/nginx/error.log也出于某种原因完全为空。

我应该从哪里开始寻找原因? 任何帮助表示赞赏。

1 个答案:

答案 0 :(得分:1)

好吧。我只是删除了所有与mysql-server,php,nginx相关的文件,包括依赖项,重新启动...以及现在以某种方式可以正常运行。