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
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.