Logs & troubleshooting 92
Reading access and error logs with grep, awk and sort to find what broke and when.
- nginx "proxy_cache" zone … is unknown
Fix nginx "proxy_cache" zone is unknown by matching the name to keys_zone in proxy_cache_path and checking that nginx reads the declaration file.
nginx 1.28.0 (Docker) · 2026-11 - Apache AH01067: Failed to read FastCGI header
Apache AH01067 means a FastCGI record header could not be read. Match AH01075 with PHP-FPM logs to distinguish a closed connection from a read timeout.
Apache httpd 2.4.71 · PHP-FPM 8.3.37 (Docker) · 2026-11 - Fix systemd status=243/CREDENTIALS on a service
systemd status=243/CREDENTIALS means preparing the service's credentials failed. Check first that the absolute path in LoadCredential exists.
systemd 255 docs and source · Ubuntu 24.04 (Docker) partial test · 2026-11 - Fix nginx duplicate upstream
Fix nginx duplicate upstream by finding the second upstream block with the same name, then merging the servers into one block or renaming one group.
nginx 1.28.0 (Docker) · 2026-11 - Fix Apache AH00132: file permissions deny server access
For a 403 with Apache AH00132, check that the request user can open the plain file at the end of the log line. Compare responses for mode 000 and 0644.
httpd 2.4.71 (Docker) · 2026-11 - Fix nginx location cannot be inside the exact location
Fix nginx location cannot be inside the exact location by moving the inner location out of the = block into a sibling position, then rerun nginx -t.
nginx 1.28.0 (Docker) · 2026-11 - Apache AH00113: cannot use a full URL in a 401 ErrorDocument directive
Apache can report Syntax OK while ignoring a full URL in ErrorDocument 401. Use a local URL path and check the notice from the same configuration test.
Apache httpd 2.4.71 (Docker) · 2026-11 - nginx the "large_client_header_buffers" size must be equal to or greater than "connection_pool_size"
Compare the size of one large_client_header_buffers buffer with connection_pool_size when nginx -t fails. Increasing the buffer count leaves the error in place.
nginx 1.28.0 (Docker) · 2026-11 - Apache AH01627: AuthType configured with no corresponding authorization directives
Fix Apache AH01627 on a protected path by restoring its Require rule. Compare the anonymous challenge with an authenticated GET after the change.
Apache httpd 2.4.71 (Docker) · 2026-11 - Fix systemd status=224/PAM
Trace systemd status=224/PAM from User= and PAMName= to the PAM policy. Use the journal to distinguish an account rejection from a session module failure.
Ubuntu 24.04 (Docker) · systemd 255 (255.4-1ubuntu8.19) · 2026-11 - Apache AH02291: Cannot access directory for main error log
Resolve the ErrorLog path against ServerRoot when Apache reports AH02291. Check its parent directory and repeat the same configuration test.
Apache httpd 2.4.71 (Docker) · 2026-11 - nginx empty regex in server name "~"
Fix empty regex in server name "~" in nginx. Check for a space after the tilde, attach the pattern to it, or use an exact host name.
nginx 1.28.0 (Docker) · 2026-11 - Fix systemd status=215/CPUAFFINITY
Compare CPUAffinity= with the CPUs granted to the service cgroup. Fix systemd status=215/CPUAFFINITY when the requested and permitted CPU lists do not overlap.
Ubuntu 24.04 (Docker) · systemd 255 (255.4-1ubuntu8.19) · 2026-11 - Fix systemd status=210/CHROOT
Trace the RootDirectory= path for systemd status=210/CHROOT. Distinguish a missing service root from a working directory or executable missing inside it.
Ubuntu 24.04 (Docker) · systemd 255 (255.4-1ubuntu8.19) · 2026-11 - nginx the "alias" directive cannot be used inside the named location
Fix an alias inside a named nginx location. Map files under a URI prefix, or keep the fallback internal and update the try_files target.
nginx 1.28.0 (Docker) · 2026-11 - Apache AH01102: error reading status line from remote server
Diagnose Apache AH01102 by requesting the same path directly from the backend. Check whether it sends a status line, closes the connection, or times out.
Apache httpd 2.4.71 · Python 3.12.16 (Docker) · 2026-11 - Fix systemd status=233/RUNTIME_DIRECTORY
systemd status=233/RUNTIME_DIRECTORY means runtime directory setup failed. Trace the RuntimeDirectory= path and check for a file that blocks creation.
Ubuntu 24.04.5 (Docker) · systemd 255 (255.4-1ubuntu8.19) · 2026-11 - Fix nginx invalid URL prefix in proxy_pass
Fix nginx invalid URL prefix by checking the proxy_pass scheme, choosing HTTP or HTTPS to match the backend, and retesting the configuration.
nginx 1.28.0 (Docker) · 2026-11 - Apache AH00037: Symbolic link not allowed or link target not accessible
Apache AH00037 returns a 403 when a symlink check fails. Compare requests for the file and the link, then check the directory Options and target path.
httpd 2.4.71 (Docker) · 2026-11 - Fix nginx "open_file_cache" must have the "max" parameter
Fix the nginx open_file_cache error by adding max=N to enable the cache or using off to disable it. Verify the change with nginx -t.
nginx 1.28.0 (Docker) · 2026-11 - Fix systemd status=209/STDOUT
Fix systemd status=209/STDOUT by checking where StandardOutput= points. Use the journal error to find a missing parent directory or a bad output path.
Ubuntu 24.04.5 (Docker) · systemd 255 (255.4-1ubuntu8.19) · 2026-11 - Fix nginx block directives are not supported in -g option
Move blocks such as events out of the nginx -g argument and into the right context in nginx.conf, then verify the corrected command with nginx -t.
nginx 1.28.0 (Docker) · 2026-11 - Fix systemd status=208/STDIN
Diagnose systemd status=208/STDIN by checking the journal, the StandardInput=file: path, and when the service's input becomes available.
Ubuntu 24.04.5 (Docker) · systemd 255 (255.4-1ubuntu8.19) · 2026-11 - Fix systemd status=2/INVALIDARGUMENT
Trace systemd status=2/INVALIDARGUMENT to the command that exited, read its journal error, and verify the corrected ExecStart arguments.
Ubuntu 24.04.5 (Docker) · systemd 255 (255.4-1ubuntu8.19) · 2026-11 - Fix nginx no servers are inside upstream
Fix nginx no servers are inside upstream by finding the empty group, adding an actual backend server, and checking the configuration with nginx -t.
nginx 1.28.0 (Docker) · 2026-11 - Apache AH01624: <RequireAll> directive contains only negative authorization directives
Fix Apache AH01624 by adding the intended IP allowlist to RequireAll, keeping the exclusion in place, and checking the configuration before applying it.
Apache httpd 2.4.71 (Docker) · 2026-11 - systemd "code=exited, status=5/NOTINSTALLED": cause and fix
status=5/NOTINSTALLED means the service program, usually a start script, exited with code 5, "not installed". Find its exit 5 check and its journal lines.
Ubuntu 24.04.5 (Docker) · systemd 255.4 · reproduced with systemd inside a container · 2026-11 - systemd "code=exited, status=1/FAILURE": find the cause
status=1/FAILURE means the program itself exited with code 1. Find the cause in what it logged - journalctl -u, then its own log file, then a manual run.
Ubuntu 24.04.5 (Docker) · systemd 255.4 · reproduced with systemd inside a container · 2026-11 - nginx log location: find and read access.log, error.log
Find the nginx log location, see why the Docker image needs docker logs, read one line of each log, and jump to the right fix for your symptom.
nginx 1.30.6 (Docker nginx:stable) · distro paths per nginx docs · 2026-11 - HTTP 420 Status Code Is Not Standard — What to Do
HTTP 420 is unassigned in the IANA status code registry. See what RFC 9110 says about unknown 4xx codes and how to read the body and headers of a 420.
IANA HTTP Status Code Registry (2025-09-15) · RFC 9110 · RFC 6585 · nginx 1.30.6 (Docker) · 2026-11 - Fix nginx "duplicate listen options for 0.0.0.0:80"
nginx "duplicate listen options for 0.0.0.0:80": two listen lines on one address:port both set socket options like reuseport or backlog. Keep them on one.
nginx 1.30.6 (Docker nginx:stable) · 2026-10 - Fix nginx [emerg] duplicate location "/path" in ...
nginx -t "[emerg] duplicate location" means one server block defines the same location path twice. Find both files with grep -Rn and keep one.
nginx 1.30.6 (Docker nginx:stable) · 2026-10 - Apache log file location and LogFormat explained
Apache logs are in /var/log/apache2 on Ubuntu, /var/log/httpd on Rocky and docker logs for the httpd image. Find them via ErrorLog and CustomLog.
httpd 2.4.69 (Docker) · Ubuntu 24.04 apache2 2.4.58 · Rocky Linux 9 httpd 2.4.62 · 2026-11 - Fix nginx "(24: Too many open files)"
nginx "accept4() failed (24: Too many open files)" means a worker hit its open-file limit. Check Max open files, then raise it with worker_rlimit_nofile.
nginx 1.30.6 (Docker nginx:stable) · 2026-10 - Fix systemd status=226/NAMESPACE (Failed at step NAMESPACE)
systemd 226/NAMESPACE means the service mount, UTS or IPC namespace failed. Find the missing ReadWritePaths or BindPaths path in the journal and fix it.
systemd official docs (latest) and v255 source · 2026-10 - Fix nginx directive has no opening "{"
nginx 'directive has no opening "{"' means a block directive such as location, if or upstream ended with ";" instead of "{". Fix the statement, test, reload.
nginx 1.30.6 (Docker) · 2026-11 - Count Failed sshd Logins per IP Address
Count sshd "Failed password" lines per IP. Why the popular $11 one-liner breaks on invalid-user lines, the $(NF-3) fix, and the same count from journalctl.
Ubuntu 24.04.5 LTS · systemd 255 · GNU Awk 5.2.1 · mawk 1.3.4 · tested on a sample auth log - Apache "reached MaxRequestWorkers": cause and tuning
AH00484 or AH00161 in error.log means every worker slot is busy. Reproduce the queueing, find the slow requests, then size MaxRequestWorkers against memory.
Ubuntu 24.04.5 · Apache 2.4.58 (event, prefork) · 2.4 docs - Add response times to the Nginx log and find slow requests
The default Nginx log has no timing. Add request_time and upstream_response_time with log_format, then find slow requests and slow paths with awk.
Ubuntu 24.04 · nginx 1.24.0 · GNU awk 5.2.1 · log generated behind a test backend - Fix systemd status=205/LIMITS (resource limit failed)
systemd status=205/LIMITS: a Limit*= resource limit could not be applied at start. Read the RLIMIT_ name and error in the journal, then fix the unit.
Ubuntu 24.04 (Docker) · setrlimit reproduction · systemd 255 source and official docs · 2026-11 - Fix nginx directive is not terminated by ";"
nginx 'directive is not terminated by ";"' means a "{" followed a directive with no semicolon. Fix the named line, and tell it apart from look-alike errors.
nginx 1.30.6 (Docker) · 2026-11 - Change Nginx limit_req from 503 to 429 Too Many Requests
limit_req rejects requests with 503 by default, like an outage. Confirm it in error.log, switch to 429 with limit_req_status, compare burst/nodelay.
Ubuntu 24.04 · Nginx 1.24.0 (tested with curl) - Fix nginx "invalid number of arguments in directive" error
nginx "invalid number of arguments" means a directive got too many or too few values. Look for a missing semicolon, an unquoted space or a missing argument.
nginx 1.30.6 (Docker) · 2026-11 - Fix Apache 403 AH01630 with Require all granted
One error.log line explains a 403. Fix AH01630 with Require, see why 2.2-style Order/Allow fails on 2.4, and tell AH01630 from AH01797 and AH00035.
Ubuntu 24.04.5 · Apache 2.4.58 (temporary instance on port 18701) - Fix systemd "status=216/GROUP" (group not found)
status=216/GROUP means systemd could not find or apply a group from Group= or SupplementaryGroups=. Check the names with getent group, then fix the unit.
Ubuntu 24.04.5 · Rocky Linux 9.3 (Docker, getent lookups) · systemd 255 source and docs · 2026-11 - Read HAProxy server status from the stats socket with show stat
Query the HAProxy stats socket with show stat, read status, check_status and lastchg per server, and see how they change when a server goes DOWN.
Ubuntu 24.04 · HAProxy 2.8.16 · socat 1.8.0.0 · Python 3.12 (test backends) - Nginx bind() to 0.0.0.0:80 failed (98: Address already in use)
Another process already listens on the port Nginx wants. Find it with ss, and see why a failed reload leaves the old configuration serving traffic.
Ubuntu 24.04.5 · Nginx 1.24.0 · iproute2 6.1.0 (ss) · reproduced on ports in the 18800 range - Fix systemd status=217/USER (User= account not found)
systemd status=217/USER means the User= account was not found or could not be switched to. Tell a missing account, DynamicUser= or PrivateUsers= apart.
Ubuntu 24.04 (Docker) · systemd 255 · user lookup and unshare reproduced · source and official docs · 2026-10 - Fix journalctl -b -1 "No journal boot entry found"
When journalctl -b -1 finds nothing after a reboot, check whether the journal is persistent or volatile, then switch it to persistent storage with a drop-in.
Ubuntu 24.04 · systemd 255 · settings per freedesktop.org journald.conf(5) and journalctl(1) docs - Fix Apache AH00558: Could not determine the server's FQDN
If apache2ctl configtest or a reload prints AH00558, add a global ServerName. It is only a warning: the server still answered 200 with and without it.
Ubuntu 24.04 · Apache 2.4.58 (unpacked package, tested on port 18701) - Redact ?token= from nginx access logs with map (tested)
Keep ?token= values out of nginx access logs with a map variable in log_format. Nine test requests show what still leaks, including the error log.
nginx 1.30.6 (Docker) · curl · 2026-10 - Fix HAProxy unable to load SSL private key from PEM file
HAProxy can't load the private key (3.x says No Private Key found)? Check the key is in the crt file, then its pair, passphrase and PEM lines.
HAProxy 3.4.7 (Docker) · OpenSSL 3.5.7 · 2026-10 - Apache AH00111: Config variable ${APACHE_RUN_DIR} is not defined
AH00111 Config variable ${APACHE_RUN_DIR} is not defined: apache2 was run directly on Ubuntu and skipped envvars. Use apache2ctl with the same options.
Ubuntu 24.04 (Docker) · Apache 2.4.58 · 2026-10 - Fix nginx "could not build server_names_hash" (bucket_size)
nginx "could not build server_names_hash" means one server_name is too long for the bucket. Set server_names_hash_bucket_size 128 once in http.
nginx 1.30.6·1.31.8 (Docker) · Ubuntu 24.04 nginx 1.24.0 · 2026-10 - Fix Apache AH01797: client denied by old Order/Deny rules
AH01797 is a 403 from 2.2-style Order/Deny, not from Require. Find the leftover rules, convert them to Require, and see why mixing them overrides Require.
Apache httpd 2.4.69 (Docker) · 2026-10 - nginx 1.31.7: new SSL_read() failed (104) lines after upgrade
Since nginx 1.31.7, a client resetting a TLS connection is logged as SSL_read() failed (104) at info level. Tested against 1.31.6 with three close methods.
nginx 1.30.6, 1.31.6, 1.31.7 (Docker) · Python 3.12 ssl client · 2026-10 - HAProxy JSON logs with log-format %{+json}o and +utf8
Put %{+json}o in an HAProxy log-format to JSON-encode named items. Seven requests compare it with a hand-built string; non-ASCII text needs +utf8.
HAProxy 3.2.26 (Docker) · jq 1.7 · 2026-10 - Fix nginx "conflicting server name ... on 0.0.0.0:80, ignored"
nginx "conflicting server name ... ignored": two server blocks share a name on one address:port and the later is ignored. Find it with nginx -T.
nginx 1.30.6·1.31.8 (Docker) · Ubuntu 24.04 nginx 1.24.0 · 2026-10 - Fix HAProxy "cannot bind socket" (Starting frontend / Binding)
HAProxy "cannot bind socket": a bind address or port failed to open. The reason in parentheses means port in use, missing IP or permission.
HAProxy 3.4.7 (Docker haproxy:lts) · Ubuntu 24.04 haproxy 2.8.30 · 2026-10 - Fix nginx: the "listen ... http2" directive is deprecated
nginx 1.25.1+ warns "listen ... http2" is deprecated. Drop http2 from each listen line and add http2 on; per server. On 1.24 (Ubuntu 24.04) http2 on fails.
nginx 1.30.6·1.31.8 (Docker) · Ubuntu 24.04 nginx 1.24.0 · 2026-10 - journalctl -o json and jq: count entries by unit and priority
Pipe journalctl -o json into jq to count entries per unit and priority, trim output with --output-fields, and handle array and null fields (sample journal).
Ubuntu 24.04 (Docker) · systemd 255 · jq 1.7 · 2026-10 - Fix Apache AH02565: Certificate and private key do not match
AH02565 means the first certificate and the key are not a pair. httpd -t still passes and graceful took Apache down, so compare public key hashes first.
httpd 2.4.69 (Docker) · OpenSSL 3.5.7 · 2026-10 - Fix Apache: threaded MPM, but PHP module not threadsafe
Apache refuses to start (AH00013) when a threaded MPM is loaded with a non-thread-safe mod_php. Switch back to prefork, or move to event plus PHP-FPM.
Ubuntu 24.04 · Apache 2.4.58 · PHP 8.3.6 (Docker) · 2026-10 - Fix nginx unexpected end of file, expecting } (nginx -t)
nginx -t says unexpected end of file, expecting "}" when a { in that file is never closed. The line number is the file's end; find the gap by brace depth.
nginx 1.30.6 (Docker) · 2026-10 - Fix Apache Invalid command 'RewriteEngine', perhaps misspelled
Invalid command 'RewriteEngine' means mod_rewrite is not loaded. On Ubuntu run a2enmod rewrite and restart; elsewhere uncomment LoadModule rewrite_module.
Apache 2.4.69 (Docker httpd:2.4) · Ubuntu 24.04 apache2 2.4.58 · 2026-10 - Fix Apache AH00072: make_sock: could not bind to address
Apache AH00072 make_sock: could not bind to address: a Listen socket failed. The (98), (99) or (13) prefix means port in use, missing IP or permission.
Apache 2.4.69 (Docker httpd:2.4) · Ubuntu 24.04 apache2 2.4.58 · 2026-10 - Fix nginx 500: rewrite or internal redirection cycle (try_files)
A 500 with rewrite or internal redirection cycle means the last try_files target is missing under root. Create that file or end try_files with =404.
nginx 1.30.6 (Docker) · 2026-10 - Apache AH01114 / AH00957: failed to make connection to backend
Apache AH01114 failed to make connection to backend (AH00957): the proxy could not connect and returned 503. Read the errno, then fix the address and port.
httpd 2.4.69 (Docker) · 2026-10 - Fix nginx: a duplicate default server for 0.0.0.0:80
nginx -t says a duplicate default server for 0.0.0.0:80? Two listen lines on the same port have default_server. Find the Ubuntu default site and keep only one.
Ubuntu 24.04 · nginx 1.24.0 (Docker) · 2026-10 - Fix nginx: no ssl_certificate is defined for listen ... ssl
nginx says no ssl_certificate is defined for listen ... ssl when a port's default server lacks a certificate. Add one there or use ssl_reject_handshake.
nginx 1.30.6 (Docker) · OpenSSL 3.5.7 · 2026-10 - HAProxy 'option httplog' not usable, falling back to tcplog: fix
HAProxy 'option httplog' not usable with frontend (needs 'mode http'): defaults httplog reached a mode tcp frontend. Add option tcplog there or split defaults.
HAProxy 3.4.7 (Docker haproxy:lts) · Ubuntu 24.04 haproxy 2.8.30 · 2026-10 - Fix systemd status=200/CHDIR (WorkingDirectory failed)
systemd status=200/CHDIR: the service could not enter WorkingDirectory=. The journal's last words separate a missing path, User= permissions or a missing home.
Ubuntu 24.04 (Docker) · chdir reproduction · systemd 255 source and official docs · 2026-10 - Fix nginx proxy_pass cannot have URI part in regex location
nginx rejects proxy_pass with a path (even a trailing /) in a regex location or if block. Drop the path and use rewrite … break, or use a prefix location.
nginx 1.30.6 (Docker) · 2026-10 - Fix nginx: no resolver defined to resolve (variable proxy_pass)
A variable in proxy_pass makes nginx resolve names per request. Fix no resolver defined and the 502 with a resolver line or an upstream block.
nginx 1.30.6 (Docker) · 2026-10 - Fix broken nginx JSON access logs with escape=json
An nginx JSON log_format without escape=json breaks on quotes, non-ASCII and control characters. Seven requests compare jq parsing in three escape modes.
nginx 1.30.6 (Docker) · jq 1.7 · Python 3.12 · 2026-10 - Fix nginx SSL_CTX_use_PrivateKey failed: key values mismatch
nginx fails with key values mismatch? Hash the public keys of the first certificate and the private key to tell a wrong key from a reversed chain.
nginx 1.30.6 (Docker) · OpenSSL 3.5.7 · 2026-10 - nginx 1.31.8 working_directory now relative to prefix: check it
nginx 1.31.8 resolves a relative working_directory against the prefix. A missing path leaves 1.31.7 running with no workers; 1.31.8 refuses to start.
nginx 1.31.7, 1.31.8 (official Docker images, prefix /etc/nginx) · 2026-10 - nginx cannot load certificate key (PEM_read_bio_PrivateKey)
Fix nginx cannot load certificate key by the function in brackets: BIO_new_file is path or permissions; PEM_read_bio_PrivateKey is wrong file or passphrase.
nginx 1.30.6 (Docker) · OpenSSL 3.5.7 · 2026-10 - Fix Apache AH01071: Got error 'Primary script unknown' (php-fpm)
Apache AH01071 'Primary script unknown': php-fpm found no file at the path Apache sent. Tell a missing .php request from an Apache/FPM path mismatch.
Apache 2.4.69 (Docker httpd:2.4) · PHP-FPM 8.3.36 (Docker) · Ubuntu 24.04 php8.3-fpm 8.3.6 · 2026-10 - Fix systemd status=203/EXEC by reading the error at the end
status=203/EXEC means systemd could not exec the file. The error ending the journal line points to the path, permissions, shebang or a noexec mount.
Ubuntu 24.04 (Docker) · execve reproduction · systemd official docs · 2026-10 - Fix journald "Suppressed N messages from" (RateLimitBurst)
"Suppressed N messages from <service>" means journald dropped that service's logs over a rate limit. Check the limit; fix the flood or raise RateLimitBurst.
Ubuntu 24.04 · systemd 255 (journald run alone in a container) · 2026-10 - HAProxy -c "Warnings were found" but exit 0: use -dW
haproxy -c prints "Warnings were found" yet exits 0. Add -dW to make warnings fail the check before a reload; -q hides the reason for errors.
HAProxy 2.8.31 (Docker) · 2026-10 - Fix Apache AH00124: exceeded the limit of 10 internal redirects
AH00124 "exceeded the limit of 10 internal redirects" means a rewrite loop, such as an .htaccess RewriteRule matching its own output. Add a RewriteCond.
Apache httpd 2.4.69 (Docker) · 2026-10 - Fix Nginx "upstream prematurely closed connection" (502)
Nginx 502 with "upstream prematurely closed connection" means the backend hung up mid-response. Tell a 502 from a truncated 200, then check the backend log.
nginx 1.28.3 (Docker) · Python 3.12 (test upstream) · 2026-10 - HAProxy Server DOWN: Check "Layer7 wrong status"
Reproduce the reasons HAProxy logs when it marks a server DOWN, tell them apart, then fix a health endpoint that returns 404 or 301, and tune inter, fall, rise.
Ubuntu 24.04 · HAProxy 2.8.16 · Python 3.12 (test backend) - HAProxy 503 "No server is available" — find the cause
Got a 503 "No server is available"? Read NOSRV and the termination state in the log, then use show stat to tell DOWN servers, no match and queue expiry.
Ubuntu 24.04 · HAProxy 2.8.16 · behavior per the HAProxy 2.8 configuration and management docs - Nginx 504 upstream timed out — Tell Which Timeout Fired
The end of the 504 line in error.log (connecting, reading, sending) names the timeout that fired. Defaults and access-log time variables, with real logs.
Ubuntu 24.04 · Nginx 1.24.0 · Python 3.12 (test backend) - Fix Nginx 413 Request Entity Too Large with client_max_body_size
Upload failing with 413? Find the too large body line in error.log and raise client_max_body_size. Covers the 1m default, which block wins and what 0 means.
Ubuntu 24.04 · Nginx 1.24.0 (tested with curl 8.5.0) - Fix Nginx 502 "upstream sent too big header"
A 502 caused by response headers larger than proxy_buffer_size. Read the error line, adjust buffer values, avoid combinations nginx rejects, and FastCGI.
Ubuntu 24.04 · Nginx 1.24.0 · Python 3.12 (test backend) - Tell the cause of an Nginx 502 Bad Gateway from error.log
The access log only says 502. Match four error.log messages to their causes and the command that confirms each, and tell them apart from a 504.
Ubuntu 24.04.5 · Nginx 1.24.0 · Python 3.12 (test backends) - Read a HAProxy log line: termination state and cR-- 408
Read a HAProxy httplog line field by field, decode termination states like SC--, sH-- and cR--, and handle cR-- 408 <BADREQ> from client timeouts.
Ubuntu 24.04 · HAProxy 2.8.16 · 2.8.31 (Docker) · explanations follow the HAProxy 2.8 configuration manual - Find which paths return 5xx in an Nginx access log
Count server errors per path with awk, merge query strings, and narrow by status code and time window — one-liners for the default combined format.
Nginx combined log format · GNU awk 5.2 · generated test log (Ubuntu 24.04)