How to turn off or specify the nginx error log location?

后端 未结 6 1324
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-01 11:09

I compiled the nginx on Ubuntu myself. I start my nginx with -c nginx.conf parameter. In my nginx.conf file, I try to turn off error log with but failed.

err         


        
6条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 11:43

    The syntax for disabling the error log is ok, but the docs state that a default logfile is used before the config is read. (which seems reasonable because how would it otherwise tell you you have an error in your config)

    Try creating this file by hand with the correct permissions for the user that runs nginx. Or try starting the server as root.

提交回复
热议问题