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

后端 未结 6 1346
爱一瞬间的悲伤
爱一瞬间的悲伤 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:39

    I just solved this by using this configure parameter:

    ./configure --prefix="$HOME/nginx" --error-log-path=/dev/stderr
    

    Since I never use this nginx as a daemon and always run it in a shell, it makes sense for it to log errors to stderr.

提交回复
热议问题