Fix broken Apache config

This commit is contained in:
Alex Cabal 2025-01-18 17:32:38 -06:00
parent 5b5c75b2c8
commit 8f2df6ac12
3 changed files with 20 additions and 1 deletions

View file

@ -85,7 +85,7 @@ Define conf_rewrite_root ${web_root}/config/apache/rewrites
ErrorLog /var/log/local/www-error.log ErrorLog /var/log/local/www-error.log
DirectorySlash Off DirectorySlash Off
RewriteEngine on RewriteEngine on
CustomLog "|/usr/bin/rotatelogs -f -p ${webroot}/scripts/rotate-www-logs /var/log/local/apache/www-access.log 86400" combined CustomLog "|/usr/bin/rotatelogs -f -p ${web_root}/scripts/rotate-www-logs /var/log/local/apache/www-access.log 86400" combined
SSLEngine on SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/${domain}/fullchain.pem SSLCertificateFile /etc/letsencrypt/live/${domain}/fullchain.pem

View file

@ -0,0 +1,11 @@
# Use `fail2ban` to attemp to ban badly-behaved crawlers.
# If a client accesses `/honeypot`, then they are banned for 24 hours.
# `/honeypot` is linked from a hidden link in the header, and disallowed in `robots.txt`, so respectful crawlers won't be affected.
[INCLUDES]
before = apache-common.conf
[Definition]
datepattern = [^\[]*\[({DATE})
failregex = ^(?:<IP6>|<IP4>).+"GET /honeypot HTTP/.+$

View file

@ -0,0 +1,8 @@
[se]
enabled = true
filter = se
port = http,https
bantime = 24h
maxretry = 1
logpath = /var/log/local/apache/current.log