How to delete all log files containing visitors IP addresses every 24 hours?
I want to enforce strict privacy rules on my LEMP droplet and look for a way to automatically delete all log files that include my visitors data (IP address etc.) after a 24h period?
P.S.: I found a way to completely turn off IP logging but then fail2ban can’t protect my droplet anymore, so a 24h logging period seems like a good compromise.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×