geerlingguy / ansible-role-nginx

Ansible Role - Nginx

Home Page:https://galaxy.ansible.com/geerlingguy/nginx/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Add possibility to anonymise logs

madonius opened this issue · comments

It would be good to have the option to remove the IP addresses from the logs.

@geerlingguy would this feature be a welcomed PR?
I would be willing to implement it, as I need it for a project.

Is there a specific reason why don't you just use custom log format? Example without IP addresses:

nginx_log_format: |
  '[$time_local] '
  '"$request" $status $body_bytes_sent "$http_referer" '
  '"$http_user_agent"'

That's a good suggestion—just switch it out and no need to modify the defaults for the role.

commented

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.