mitchellkrogza / Fail2Ban.WebExploits

This custom Fail2Ban filter and jail will deal with all scans for common Wordpress, Joomla and other Web Exploits being scanned for by automated bots and those seeking to find exploitable web sites.
Other
169 stars 36 forks source link

Custom Log Format #2

Open crebuh opened 6 years ago

crebuh commented 6 years ago

Hi,

how can I adjust the regex to match our custom log file format from nginx?

This is our logfile format (because we have multiple sites running on one instance):

log_format custom_format '$server_name $remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent" "$gzip_ratio"'

Thx!

mitchellkrogza commented 6 years ago

Hi @crebuh can you try this log format log_format custom_format '$server_name $remote_addr - $remote_user $host [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent" "$gzip_ratio"'