nginx 没有记录任何错误,无法启动

led*_*edy 3 nginx logging

在尝试将 nginx 复制到另一个后,我担心 nginx 无法启动。

nginx -t说配置语法没问题。

在 nginx.conf 中,它被告知记录错误:error_log /var/log/nginx/error.log;

error.log 存在并在启动时重新创建,但始终为空。

/etc/init.d/nginx start在或之后nginx,shell 中没有任何通知或错误,并且 error.log 中也没有一行。无论如何,ps -A|grep nginx告诉我什么都没有开始。

在哪里可以找到错误消息或如何找出问题所在。

nginx 似乎没有“详细”模式:-(

cho*_*loo 5

只需键入(根据需要替换您的conf的路径)

nginx -c /etc/nginx/nginx.conf
Run Code Online (Sandbox Code Playgroud)

它会将错误打印到屏幕上。

  • 这就是我所做的。这没有告诉我什么,没有通知,没有错误或信息:-( (2认同)