Follow

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
Mastodon

English

This Maston instance is dedicated to all people interested in a united Europe, a post-national and truly democratic Europe.

But even if you are not so interested in European politics, you are welcome.

Hosting: Germany, Uptime: https://stats.uptimerobot.com/v8KKlhJ2E


Deutsch

Diese Mastodon-Instanz ist für alle, die interessiert sind an einem vereinten Europa, einem post-nationalen und wirklich demokratischen Europa.

Aber auch wenn Du Dich nicht so sehr für Europaplitik interessierst, bist Du herzlich willkommen.

Hosting: Deutschland, Verfügbarkeit: https://stats.uptimerobot.com/v8KKlhJ2E

Impressum