mirror of
https://github.com/frappe/bench.git
synced 2024-11-13 16:56:33 +00:00
fix(config): Fix fail2ban filter (#1308)
* Add missing nginx-proxy filter * Add all nginx log files to fail2ban filter, regardless of frappe site * Adds per site nginx logs in /var/log
This commit is contained in:
parent
1e0054bc14
commit
94a25d3da7
@ -113,6 +113,11 @@ server {
|
||||
|
||||
{% endfor -%}
|
||||
|
||||
# logs in var
|
||||
access_log /var/log/nginx/{{ site_name }}_access.log main;
|
||||
error_log /var/log/nginx/{{ site_name }}_error.log;
|
||||
|
||||
|
||||
# optimizations
|
||||
sendfile on;
|
||||
keepalive_timeout 15;
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
fail2ban_nginx_access_log: /var/log/nginx/access.log
|
||||
fail2ban_nginx_access_log: /var/log/nginx/*access.log
|
||||
maxretry: 6
|
||||
bantime: 600
|
||||
findtime: 600
|
||||
findtime: 600
|
||||
|
@ -5,7 +5,10 @@
|
||||
vars_files:
|
||||
- ../defaults/main.yml
|
||||
tasks:
|
||||
|
||||
- name: Setup filter
|
||||
template: src="../templates/nginx-proxy-filter.conf.j2" dest="/etc/fail2ban/filter.d/nginx-proxy.conf"
|
||||
- name: Setup jail
|
||||
template: src="../templates/nginx-proxy-jail.conf.j2" dest="/etc/fail2ban/jail.d/nginx-proxy.conf"
|
||||
- name: restart service
|
||||
service: name=fail2ban state=restarted
|
||||
service: name=fail2ban state=restarted
|
||||
|
Loading…
Reference in New Issue
Block a user