Nginx not running with no error message

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

    First, always sudo nginx -t to verify your config files are good.

    I ran into the same problem. The reason I had the issue was twofold. First, I had accidentally copied a log file into my site-enabled folder. I deleted the log file and made sure that all the files in sites-enabled were proper nginx site configs. I also noticed two of my virtual hosts were listening for the same domain. So I made sure that each of my virtual hosts had unique domain names.

    sudo service nginx restart

    Then it worked.

提交回复
热议问题