Use it when a website errors, is slow, or does not load.
Web Server Troubleshooting
1. curl -vI https://<name> — status and timing.
2. DNS/TCP/TLS issues → name, firewall, certificate.
3. 4xx → access/error log for that request.
4. 5xx → backend status and its logs.
5. Fix and retest.
DNS → TCP → TLS → vhost → permissions → backend → response
For Web Services → Web Server Troubleshooting, continue with the first unproven Topic check: Capture exact time, URL, method, headers/SNI, client source and expected response before changing anything. If that boundary is healthy, advance to the adjacent check: Test boundaries in order: DNS/path, socket, TLS, site routing, local file/upstream, application. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
ss -ltnpPrimary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
symptom/time → client/DNS/path → listener/process → TLS/vhost/location → local file or upstream → application → response/log correlation → original retest
Healthy evidence: the exact failing request is reproducible, evidence identifies the first failing step, the minimal correction restores the original path and neighboring checks remain healthy
Step 2 Commands Verify boundary
curl -v http://localhost
ss -tlnp | grep -E ':80|:443'
journalctl -u nginx -n 50
Step 3 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Capture exact time, URL, method, headers/SNI, client source and expected response before changing anything.
- Test boundaries in order: DNS/path, socket, TLS, site routing, local file/upstream, application.
- Correlate access/error/service/upstream evidence to the same request and identify the first failure.
- Make the smallest cause-specific persistent change, then repeat the original request and regression checks.
Verification chain. symptom/time → client/DNS/path → listener/process → TLS/vhost/location → local file or upstream → application → response/log correlation → original retest
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: testing changes Host/SNI/path, service restarts mask state, logs are uncorrelated, local-only success is treated as end-to-end evidence, or generic 4xx/5xx codes are assumed to identify root cause
Step 5 Common mistakes Narrow the fault
- Firewall/SELinux blocking the port while the service is running.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Status codes guide you: 403 permissions/SELinux/index, 404 path/vhost, 500 application, 502 backend down, 503 overloaded, 504 timeout. Check the server's error log at the same second as the request.
systemctl status nginx|apache2|httpd— web server statenginx -t / apachectl configtest— configuration testss -ltnp | grep -E ':80|:443'— listening portscurl -vI https://<name>— response, headers and TLStail -f /var/log/nginx/error.log— error log (or apache2/httpd)
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
Troubleshooting closes at the first failed web boundary and only after the original request succeeds without masking an adjacent regression.
In depth
Make the access log answer "where did the time go?"
log_format timing '$remote_addr [$time_local] "$request" $status $body_bytes_sent '
'rt=$request_time uct=$upstream_connect_time urt=$upstream_response_time '
'ua="$http_user_agent" host=$host';
access_log /var/log/nginx/access.log timing;
The nginx log module documents log_format and defines $request_time as the time from reading the first client bytes to writing the log after the last bytes were sent. The $upstream_* timing variables come from the upstream module.
$ awk '{for(i=1;i<=NF;i++) if($i ~ /^rt=/){split($i,a,"="); if(a[2]>1) print}}' /var/log/nginx/access.log | tail
10.0.10.55 [27/Nov/2026:10:21:33 +0100] "GET /report HTTP/1.1" 200 81234 rt=4.812 uct=0.001 urt=4.805 ...
| Pattern | Meaning |
|---|---|
rt ≈ urt, both high | Backend (application) is slow |
rt high, urt low | Slow client or large response over a slow network |
uct high | Backend connection slow (backlog full, TLS to upstream) |
urt = - | No upstream used (static file, cached, or error before proxying) |
Status codes from nginx itself
| Code | Typical cause | Check |
|---|---|---|
| 403 | File permissions for the nginx user, missing index with autoindex off, SELinux label | namei -l, error log |
| 404 | root/alias path wrong | Error log shows the full path tried |
| 413 | Upload larger than client_max_body_size | Raise per location |
| 499 | Client closed the connection (gave up) | Usually slow backend |
| 502 | Backend refused/crashed, socket path wrong | connect() failed in error log |
| 504 | Backend timeout | proxy_read_timeout, backend performance |
Test configuration and see the effective config
nginx -t # syntax and file checks
nginx -T | less # full effective configuration including includes
journalctl -u nginx --since -10min
tail -f /var/log/nginx/error.log
Reload (systemctl reload nginx) only after nginx -t passes; a failed reload keeps the old configuration running, a failed restart takes the site down.
*The nginx request timing entry is a constructed access-log example, not a captured HTTP transaction.*
How it works at runtime
Web Server Troubleshooting is part of Web Services → Web Server Troubleshooting. Web Server Troubleshooting isolates failures from DNS and transport through web-server process/listener, TLS/vhost routing, filesystem or reverse proxy, upstream application and the exact client-visible response.
Topic-specific state model. Web Server Troubleshooting isolates failures from DNS and transport through web-server process/listener, TLS/vhost routing, filesystem or reverse proxy, upstream application and the exact client-visible response.
Interpretation rule. - HTTP status code alone ≠ root cause.
- Service restart recovery ≠ durable remediation.
- Local curl success ≠ external client success.
- One corrected URL/site ≠ neighboring virtual hosts or proxy routes are healthy.
Method
Web server troubleshooting:
| Status | Typical cause |
|---|---|
| 403 | File permissions, SELinux label, autoindex off with no index file |
| 404 | Wrong root/alias, location matching |
| 413 | client_max_body_size |
| 500 | Application error — check app logs |
| 502 | Upstream down/refused, PHP-FPM socket permissions |
| 504 | Upstream slow — timeouts |
nginx -t; journalctl -u nginx --since -10m
tail -f /var/log/nginx/error.log
curl -sv -H 'Host: app.example.com' http://127.0.0.1/
ss -ltnp | grep -E ':80|:443'
ausearch -m AVC -ts recent | grep -E 'httpd|nginx'
Limits and how it fails
Primary failure point. Troubleshooting closes at the first failed web boundary and only after the original request succeeds without masking an adjacent regression.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Web Server Troubleshooting owns isolation; hand off to DNS, Firewall, Certificates & TLS, Apache/Nginx, permissions or application Topics once that boundary is confirmed.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Web Services → Web Server Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://nginx.org/en/docs/ · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Web Server Troubleshooting operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Web Server Troubleshooting.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Web Server Troubleshooting isolates failures from DNS and transport through web-server process/listener, TLS/vhost routing, filesystem or reverse proxy, upstream application and the exact client-visible response. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin exact client/server + time + request/file operation → identify authoritative configuration → read back effective service/listener/session state → trace protocol selection/auth/identity → verify backend/upstream boundary → correlate logs → make smallest persistent change → repeat original workload + regression check. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | symptom/time → client/DNS/path → listener/process → TLS/vhost/location → local file or upstream → application → response/log correlation → original retest | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Troubleshooting closes at the first failed web boundary and only after the original request succeeds without masking an adjacent regression. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux web/file-service evidence can establish this proof path: symptom/time → client/DNS/path → listener/process → TLS/vhost/location → local file or upstream → application → response/log correlation → original retest | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove unobserved clients, names, identities, routes, sessions, backends or time periods. Troubleshooting closes at the first failed web boundary and only after the original request succeeds without masking an adjacent regression. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven service boundary, capture adjacent effective state and protocol/application evidence, make only the demonstrated persistent change, then repeat the original client workload plus a regression check. | Continue to the next unresolved boundary while preserving the original test condition. |
Web Server Troubleshooting · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Web Server Troubleshooting |
|---|---|
| Topic path | Web Services → Web Server Troubleshooting |
| Runtime state | Web Server Troubleshooting isolates failures from DNS and transport through web-server process/listener, TLS/vhost routing, filesystem or reverse proxy, upstream application and the exact client-visible response. |
| Fast checks | - Capture exact time, URL, method, headers/SNI, client source and expected response before changing anything. - Test boundaries in order: DNS/path, socket, TLS, site routing, local file/upstream, application. - Correlate access/error/service/upstream evidence to the same request and identify the first failure. - Make the smallest cause-specific persistent change, then repeat the original request and regression checks. |
| Verification chain | symptom/time → client/DNS/path → listener/process → TLS/vhost/location → local file or upstream → application → response/log correlation → original retest Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. |
| Failure boundary | Troubleshooting closes at the first failed web boundary and only after the original request succeeds without masking an adjacent regression. Boundary chain: unit config/drop-ins → dependency/order/condition → exec/process → readiness/active state → owned socket/file/device → dependent client/workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |