I’d like to be able to disable request logging done by
lighttpd much like query logging in dnsmasq can be disabled . This is handy for running from SD card in order to make it last as long as possible.
lighttpd writes access logs to
/var/log/lighttpd/access.log and it is not possible to disable this in robust way - any modification done to
/etc/lighttpd/lighttpd.conf will be erased on upgrade.
I run a script that queries the local server (http://localhost/admin/api.php) every couple of seconds (to get statistics) so /var/log/lighttpd/access.log is being written into very often. This wears the SD card.
I tried to workaround it by placing
accesslog.file = "/dev/null" to
/etc/lighttpd/external.conf however this does not work.
After filing https://github.com/pi-hole/docker-pi-hole/issues/484 I realized that Pi-hole itself needs a capability to disable the logging before it can be implemented in Docker image.