[Pkg-nginx-maintainers] [bug] nginx-extras (1.13.1-2) Debian9

Mpampis Kostas charkost.rb at gmail.com
Sat Jul 1 11:48:32 UTC 2017


Hi,

I confirmed that nginx creates the /var/log/nginx/error.log in Deb8 as 
well.

This happens because during start-up nginx creates and uses a log which 
is specified
in the ./configure build step using the --error-log-path option. This 
log path ends up
been hardcoded inside the nginx binary which is shipped by the 
nginx-extras package.

The first line in your log comes from the initialization of the newly 
introduced (in Deb9)
libnginx-mod-nchan dynamic module which uses the aforementioned start-up 
log.

The second line comes from the signal process (probably you ran 
something like 'nginx -s reload')
which happens to use the start-up log too.

In both cases, the log specified by the "error_log" directive has not 
yet been opened
thus the only available log at that time was the start-up log.

There is a 5 year old upstream ticket describing the same issue: 
https://trac.nginx.org/nginx/ticket/147

You can either recompile nginx using --error-log-path=stderr or create 
an error log symlink to /dev/null:

$ ln -s /dev/null /var/log/nginx/error.log

Regards,
Mpampis


On 06/26/2017 02:18 PM, !? wrote:
> Hi. Yet another bug report which doesn't happen before upgrade.
> This start happening after upgrade to Deb9 from Deb8.
>
> I have "error_log /dev/null;" in nginx.conf.
>
> But nginx start making log files to "/var/log/nginx/error.log".
> Why is this? How can I completely disable logging?
>
> [info] 28690#28690: Using 32768KiB of shared memory for nchan in /etc/nginx/nginx.conf:123
> [notice] 28722#28722: signal process started
> etc.
>
> _______________________________________________
> Pkg-nginx-maintainers mailing list
> Pkg-nginx-maintainers at lists.alioth.debian.org
> https://lists.alioth.debian.org/mailman/listinfo/pkg-nginx-maintainers




More information about the Pkg-nginx-maintainers mailing list