mirror of
https://github.com/frappe/bench.git
synced 2025-01-23 07:08:23 +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 -%}
|
{% endfor -%}
|
||||||
|
|
||||||
|
# logs in var
|
||||||
|
access_log /var/log/nginx/{{ site_name }}_access.log main;
|
||||||
|
error_log /var/log/nginx/{{ site_name }}_error.log;
|
||||||
|
|
||||||
|
|
||||||
# optimizations
|
# optimizations
|
||||||
sendfile on;
|
sendfile on;
|
||||||
keepalive_timeout 15;
|
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
|
maxretry: 6
|
||||||
bantime: 600
|
bantime: 600
|
||||||
findtime: 600
|
findtime: 600
|
@ -5,6 +5,9 @@
|
|||||||
vars_files:
|
vars_files:
|
||||||
- ../defaults/main.yml
|
- ../defaults/main.yml
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
|
- name: Setup filter
|
||||||
|
template: src="../templates/nginx-proxy-filter.conf.j2" dest="/etc/fail2ban/filter.d/nginx-proxy.conf"
|
||||||
- name: Setup jail
|
- name: Setup jail
|
||||||
template: src="../templates/nginx-proxy-jail.conf.j2" dest="/etc/fail2ban/jail.d/nginx-proxy.conf"
|
template: src="../templates/nginx-proxy-jail.conf.j2" dest="/etc/fail2ban/jail.d/nginx-proxy.conf"
|
||||||
- name: restart service
|
- name: restart service
|
||||||
|
Loading…
x
Reference in New Issue
Block a user