Nginx not running with no error message

前端 未结 8 1143
深忆病人
深忆病人 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:04

    1. Check for your configuration files by running the aforementioned command: sudo nginx -t.

    2. Check for port conflicts. For instance, if apache2 (ps waux | grep apache2) or any other service is using the same ports configured for nginx (say port 80) the service will not start and will fail silently (err... the cousin of my friend had this problem...)

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题