Modify variable into log_format

I have simple config: http { log_format main ‘”rmethod”:”$request_method” “uri”:”$uri” “args”:”$args”; access_log /tmp/nginx_access.log main; … } Problem is that args contains sensitive information. Can I hide some query parameters? For example: $args value is cmd=list&username=qwe&ext=625&sensitive_info=sfsfsd&cred=Black0ps5762 After using regex ^(.*)((?:sensitive_info=.*)&)(.*)$ will form a new variable by capture groups: args = $1$3. Is it possible?

Fail2ban on Debian Buster – the right way to configure?

Fail2ban can be configured in so many places. $ fail2ban-client -i Fail2Ban v0.10.2 reads log file that contains password failure report and bans the corresponding IP addresses using firewall rules. On Debian Buster I can edit my settings in several config files: /etc/fail2ban/jail.d/defaults-debian.conf /etc/fail2ban/fail2ban.conf /etc/fail2ban/jail.conf /etc/fail2ban/action.d/ Some tutorials recommend: cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local The Documentation of…