Can anyone help me with ? I would like to only store shortened IP addresses in access.log for the last 24 hours. How could I do this?

@christian Not certain what you mean by "shortened IP addresses", but there's not really any way to customize httpd(8) log format beyond a few different preset styles (common, combined and connection).

Also note that by default, weekly access.log file rotation is configured, see /etc/newsyslog.conf and man newsyslog.conf. You could rotate logs more frequently (it can also delete old logs).

Alternatively, it might be easier to do "no log" in httpd.conf instead, and log via some other means.

@brynet Thank you. By shorten I mean I want to replace the last octet to anonymize the address.

Sign in to participate in the conversation




Hosting: Germany, Uptime:




Hosting: Deutschland, Verfügbarkeit: