[Pkg-nginx-maintainers] Bug#1003250: nginx: consider logging to syslog by default

Andrea Pappacoda andrea at pappacoda.it
Fri Jan 7 00:24:45 GMT 2022


Package: nginx
Severity: wishlist

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi. First of all, thanks for maintaining this package, good job!

With Debian 11 systemd's persistent journal feature has been enabled by
default, so that services logging to the journal will all get persistent
logging, and this includes processes logging to syslog.

The nginx package in its default configuration currently shows no access/error
logs when running `journalctl -u nginx`, since logs are only saved to
/var/log/nginx/{access,error}.log.

What I propose is changing the default settings in /etc/nginx/nginx.conf and
setting `error_log` to `syslog:server=unix:/dev/log,nohostname`, so that logs
would be captured by the journal and automatically saved on disk. Regarding who
can access the logs, only users that are part of the adm group can read them,
just like the current setup.

This change would make nginx integrate more with the rest of the system, as
generally speaking all logs are accessible with `journalctl`.

Please let me know of any concerns you might have, I'm always happy to hear
feedback :)

Thanks again.


- -- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.15.0-2-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages nginx depends on:
pn  nginx-core | nginx-full | nginx-light | nginx-extras  <none>

nginx recommends no packages.

nginx suggests no packages.

-----BEGIN PGP SIGNATURE-----

iIoEARYIADIWIQRm3vFSgpkMIZnvqAGooSioqxzuSQUCYdeITBQcYW5kcmVhQHBh
cHBhY29kYS5pdAAKCRCooSioqxzuSQOlAQC7CIm7EvNiQtB1/mD5Gv9w4164sxaK
wKt/YcudH3bA2AEAujGpPT67JWdRCgfKs8P66okGpCnOHo1frK60Vs0pPAU=
=5yDb
-----END PGP SIGNATURE-----



More information about the Pkg-nginx-maintainers mailing list