Talk: Nginx

From NixOS Wiki
Revision as of 20:27, 18 February 2022 by Vater (talk | contribs) (→‎how to log as less as possible: new section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

how to log as less as possible

error_log

https://nginx.org/en/docs/ngx_core_module.html#error_log

log as less as possible errors

  services.nginx.logError = ''stderr emerg'';

log as less as possible errors and write them to nowhere

  services.nginx.logError = ''/dev/null emerg'';

?log as less as possible errors for (a or maybe) all virtualHosts and write them to nowhere?

  services.nginx.virtualHosts."domain.tld".extraConfig = ''
error_log /dev/null emerg;
  '';

access_log

https://nginx.org/en/docs/http/ngx_http_log_module.html#access_log

  services.nginx.virtualHosts."domain.tld".extraConfig = ''
access_log off;
  '';