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

前端 未结 19 1069
予麋鹿
予麋鹿 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:03

    Try set a user in nginx.conf, maybe that's why he can not start the service:

    User www-data;
    
    0 讨论(0)
  • 2021-01-29 20:03

    Just write this your work get done

    sudo rm /etc/nginx/sites-enabled/default
    
    sudo service nginx restart
    
    systemctl status nginx
    

    Happy Learning

    0 讨论(0)
  • 2021-01-29 20:04

    Check df -h if you are under centOS system

    0 讨论(0)
  • 2021-01-29 20:05
    $ ps ax | grep nginx<br>
    $ kill -9 PIDs
    $ service nginx start
    



    or set back /etc/nginx/sites-available/default

    location / {
         # First attempt to serve request as file, then
         # as directory, then fall back to displaying a 404.

         try_files $uri $uri/ =404;
    }

    0 讨论(0)
  • 2021-01-29 20:07

    try :

    sudo service nginx restart
    
    0 讨论(0)
  • 2021-01-29 20:10

    In my case, it's because of apache server is running somehow. So I stop apache then restart nginx. Work like a charm!

    sudo /etc/init.d/apache2 stop
    sudo systemctl restart nginx
    
    0 讨论(0)
提交回复
热议问题