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

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

    I solved this issue using the -p parameter when starting nginx e.g:

    /home/ubuntu/nginx/sbin/nginx -c /home/ubuntu/nginx/conf/nginx.conf -p /home/ubuntu/nginx
    

    This will prepend any log paths specified in the config with the prefix directory.

提交回复
热议问题