Nginx: Job for nginx.service failed because the control process exited

前端 未结 19 1126
予麋鹿
予麋鹿 2021-01-29 19:31

I got a problem which I have been trying to fix for a few days now and I don\'t know what to do, have been looking for answers but all of those I found didn\'t help me.

19条回答
  •  无人共我
    2021-01-29 20:18

    For my case, I need to run

    sudo nginx -t
    

    It will check if Nginx configuration is correct or not, if not, it will show you which configuration causes the error.

    Then you need to go to /etc/nginx/sites-available to fix the broken configuration.

    After that, you can restart Nginx without any problem.

    sudo systemctl restart nginx
    

提交回复
热议问题