Repository navigation
v0.2.1
Fixes two problems found by installing 0.2.0 on servers at a cloud provider. Each could leave a site without alerts it should have had.
Fixed
- The example rules missed probes on sites with a custom error page or a front controller. They matched paths with
uri, which nginx replaces: witherror_page 404 /404.html;(the default configuration of Rocky Linux 9 has it) a request for/.envthat ends in a 404 is logged withuriset to/404.html, and withtry_files ... /index.phpevery request hasuriset to/index.php.rules.example.yamland the templates underexamples/now match paths with the newrequest_path.sensitive-file-exposedstill matchesurion purpose: it is about the file nginx actually served. Rules of your own that matchuribehave as before; switch them torequest_pathif your site has either of the two. - With SELinux enforcing, nginx could not send its log to the unix socket, so no alert was ever raised. This is the default state of Fedora, RHEL and Rocky Linux. The new
deploy/httpdog-selinux.cilholds the one rule that allows it; install it withsudo semodule -i httpdog-selinux.cil.
Added
request_path: the path the client asked for, which isrequest_uriwithout the query string. With the JSON format httpdog adds it to every log line that hasrequest_uri, so nginx'slog_formatneeds no change; thecombinedformat has it too, with the same value asuri. The webhook body carries it inevent.
Documentation
docs/log-format.mdexplains the three path fields (request_path,request_uri,uri) and when to use which.docs/limits.mdlists the six cloud servers 0.2.0 was installed on, including two with SELinux enforcing.