:80 { root * /srv/docs encode zstd gzip try_files {path} {path}/ file_server # Serve the 404 page with a REAL 404 status. The older # `try_files ... /404.html` form returned HTTP 200 for every missing # path, which silently broke uptime checks, smoke tests, and Search # Console (they all saw a "live" page). handle_errors { @404 expression {err.status_code} == 404 handle @404 { rewrite * /404.html file_server } } }