0

I have my webserver configured with lighttpd/1.4.31.

About 80% of all entries in lighttpd's

/var/log/lighttpd/access.log
consist of my own ip address.

I would like to disable my ip address logging access entries to access.log.

How can I achieve this?

3
  • To clarify the question: You want to exclude all log entries including a certain IP address (e.g. yours)? First question: Why? Thats the task of logs: write everything that happens. For evaluations, it makes more sense to exclude certain IPs.
    – sebix
    Jun 9, 2015 at 7:18
  • @sebix: Yes I want to disable logging my own ip address, because it makes analyzing logs more simple I think.
    – kzpm
    Jun 10, 2015 at 13:28
  • An easier way to not print log lines containing certain words is grep -v '<ip>' <file>
    – mzhaase
    Nov 22, 2016 at 14:19

1 Answer 1

1

After enabling the accesslog-module using lighty-enable-mod accesslog, modify conf-enabled/10-accesslog.conf as follows:

server.modules += ( "mod_accesslog" )
accesslog.filename = "/var/log/lighttpd/access.log"
$HTTP["remoteip"] == "127.0.0.1" {
    accesslog.filename = "/dev/null"
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .