Nginx not running with no error message

前端 未结 8 1149
深忆病人
深忆病人 2021-01-30 06:15

I am trying to start my nginx server. When I type \"$> /etc/init.d/nginx start\", I have a message appearing \"Starting nginx:\", and then nothing happens. There is no error mes

8条回答
  •  一向
    一向 (楼主)
    2021-01-30 07:10

    For what it's worth: I just had the same problem, after editing the nginx.conf file. I tried and tried restarting it by commanding sudo nginx restart and various other commands. None of them produced any output. Commanding sudo nginx -t to check the configuration file gave the output sudo: nginx: command not found, which was puzzling. I was starting to think there were problems with the path.

    Finally, I logged in as root (sudo su) and commanded sudo nginx restart. Now, the command displayed an error message concerning the configuration file. After fixing that, it restarted successfully.

提交回复
热议问题