Pcornel
Browse topics
Options
Recent
Favorites
Web Infrastructure · Technical reference

Web Server Troubleshooting

Direct answer

Web server troubleshooting follows the request: DNS, TCP, TLS, virtual host, permissions, application backend — using the HTTP status code and logs to find the failing step.

When to use this

Use it when a website errors, is slow, or does not load.

First 30 seconds

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.

Operational verification

DNS → TCP → TLS → vhost → permissions → backend → response

Evidence · next step

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
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Key commandss -ltnp
Scope / prerequisiteUse it when a website errors, is slow, or does not load.
Verify · 1
What next?3 suggested next steps
Catalog command links1
Evidence1
On this pageJump to a specific section
Operational command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points

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.

Key checks
  • systemctl status nginx|apache2|httpd — web server state
  • nginx -t / apachectl configtest — configuration test
  • ss -ltnp | grep -E ':80|:443' — listening ports
  • curl -vI https://<name> — response, headers and TLS
  • tail -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 ...
PatternMeaning
rt ≈ urt, both highBackend (application) is slow
rt high, urt lowSlow client or large response over a slow network
uct highBackend connection slow (backlog full, TLS to upstream)
urt = -No upstream used (static file, cached, or error before proxying)

Status codes from nginx itself

CodeTypical causeCheck
403File permissions for the nginx user, missing index with autoindex off, SELinux labelnamei -l, error log
404root/alias path wrongError log shows the full path tried
413Upload larger than client_max_body_sizeRaise per location
499Client closed the connection (gave up)Usually slow backend
502Backend refused/crashed, socket path wrongconnect() failed in error log
504Backend timeoutproxy_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.*

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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:

StatusTypical cause
403File permissions, SELinux label, autoindex off with no index file
404Wrong root/alias, location matching
413client_max_body_size
500Application error — check app logs
502Upstream down/refused, PHP-FPM socket permissions
504Upstream 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'
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

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%
Technical changelog & impact

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.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

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.

Aliases that resolve here
web server troubleshootingapache nginx troubleshootinghttp troubleshooting linux
Embedded reference data

Quick lookup tables

Web Server Troubleshooting operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Web Server Troubleshooting.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateWeb 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 verificationPin 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 chainsymptom/time → client/DNS/path → listener/process → TLS/vhost/location → local file or upstream → application → response/log correlation → original retestTrace requested/configured state through effective state to the observed workload result.
Failure boundaryTroubleshooting 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 evidenceCorrelated 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 retestUse this observation only for the specific claim it actually supports.
Evidence limitIt 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 checkContinue 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 boundaryWeb Server Troubleshooting
Topic pathWeb Services → Web Server Troubleshooting
Runtime stateWeb 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 chainsymptom/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 boundaryTroubleshooting 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 ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?