Pcornel
Browse topics
Options
Recent
Favorites
Web Infrastructure · Technical reference

Web Services

Direct answer

Linux web services are mainly Apache httpd and Nginx serving static content, running applications (PHP-FPM, app servers) or acting as reverse proxies, usually with TLS.

When to use this

Use it as the entry point when a website is down, slow or returns errors.

First 30 seconds

1. curl -vI https://<name> — status code and TLS?

2. Server running and listening?

3. Config test, then the error log.

4. Backend (php-fpm, app) up for 502/504?

5. Firewall and SELinux for 403/connection issues.

Operational verification

client request → DNS → TCP/TLS → virtual host → content or backend → response

Evidence · next step

For Web Services, continue with the first unproven Topic check: Pin host, service, config source, listener address/port, requested scheme/host/path and test client. If that boundary is healthy, advance to the adjacent check: Read back effective service configuration and verify which process owns the intended socket. 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 commandsystemctl status nginx apache2 httpd
Scope / prerequisiteUse it as the entry point when a website is down, slow or returns errors.
What next?3 suggested next steps
Child topics (this level)9
Evidence1
On this pageJump to a specific section
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

service configuration → effective unit/process → socket/listener → address/port/firewall → HTTP/TLS selection → virtual host or proxy route → upstream/application → client-visible response

Healthy evidence: the expected process owns the intended listener, configuration is loaded, the requested host/path selects the intended site or proxy and the client receives the expected status/content

Step 2 Verification and output interpretation Verify boundary

Verification path. Verify listener and selected virtual host, then inspect certificate presented for the exact hostname/SNI, chain/trust result, dates and negotiated protocol. Test HTTP response and, for proxies, the upstream transaction separately. Compare server config-test output with the running process generation and logs. For certificate issues, inspect subject/SAN, issuer chain and trust path rather than relying on browser wording alone. Preserve the exact client hostname because SNI and verification depend on it.

Existing fast checks for this Topic. - Pin host, service, config source, listener address/port, requested scheme/host/path and test client.

  • Read back effective service configuration and verify which process owns the intended socket.
  • Trace one exact request through TLS/HTTP selection, logs and any proxy upstream to the application response.
  • Make the smallest persistent change, reload/restart only as required, then repeat the original client request and an adjacent regression test.

Verification chain. service configuration → effective unit/process → socket/listener → address/port/firewall → HTTP/TLS selection → virtual host or proxy route → upstream/application → client-visible response

Step 3 Commands Verify boundary
systemctl status nginx apache2 httpd
curl -I http://localhost
nginx -t
apachectl configtest
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: service is active but not listening, a default site wins selection, TLS/SNI selects another identity, proxy routing targets the wrong upstream, or a local curl succeeds while the real client path fails

Next 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.

Step 5 Common mistakes Narrow the fault
  • Reloading without a config test.
  • Default sites left enabled.
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
Drill down

Subtopics

Go one level deeper into this subject.

Subtopic Apache

Apache HTTP Server operation on Linux centers on the effective httpd/apache2 configuration graph, loaded modules, MPM/process model, listeners, virtual-host selection, permissions and request logging.

Subtopic Nginx

Nginx on Linux is verified from parsed configuration and master/worker runtime state through listen/server_name selection, location processing, TLS, static-file or upstream handling and the client-visible response.

Subtopic Caddy

Caddy web server: Caddyfile, automatic HTTPS with ACME, reverse_proxy, php_fastcgi, file_server, HTTP/3 by default, admin API and validate/reload commands.

Subtopic Virtual Hosts

Virtual Hosts maps multiple web identities to shared listeners using request attributes such as address/port, Host and often TLS SNI; diagnosis must prove which site actually wins selection.

Subtopic Reverse Proxy

A Linux reverse proxy terminates a client-facing request and creates a separate upstream request; both legs have independent DNS, TLS, timeout, header and health boundaries.

Subtopic HTTP Load Balancing

Layer 7 load balancing with nginx and HAProxy: algorithms, active and passive health checks, persistence, draining, timeouts, retries, X-Forwarded-For/PROXY protocol and L4 vs L7.

Subtopic TLS

Web-service TLS is the server-side binding of certificate/key, protocol policy and SNI identity to a listening web endpoint; it must be verified as presented by the running service.

Subtopic 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.

Subtopic PHP-FPM

PHP FastCGI Process Manager: pools, pm static/dynamic/ondemand sizing, sockets and permissions, status and ping pages, slowlog, timeouts and the nginx/Apache FastCGI connection.

Key points

Read the HTTP status: 502/504 point to the backend, 403 to permissions or SELinux, 404 to paths or virtual host, TLS errors to certificates. Always test the config before reloading.

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)
ReferenceWhy it matters1 section · depth on demand

How it works in operation

Web Services — operational mechanics and state ownership. systemd resolves unit files/drop-ins, dependencies/order, conditions and environment, then forks/execs or activates the service and tracks its main process/readiness according to Type. active does not necessarily mean the application listener, dependency or workload is healthy; oneshot, notify, socket activation and restart policies change state semantics.

ReferenceImportant terms & boundaries6 sections · depth on demand

What this shows and what it does not

Web service troubleshooting is resolved only when the exact request reaches the intended listener, selects the intended site/proxy policy and produces the expected application response from the real client path.

In depth

Web services on Linux: request routing from listen to server

Whichever web server you use, a request is matched to a configuration in two steps. First by the address and port it arrived on, then by the host name it asks for. The nginx documentation on request processing describes it:

  • nginx first tests the IP address and port against the listen directives.
  • Among the servers that match, it tests the Host header against server_name.
  • If nothing matches, or there's no Host header, the request goes to the default server for that address and port. That's the first server, unless one is marked default_server.

Apache works the same way: it compares ServerName and ServerAlias among the virtual hosts that match the address, and uses the first listed one when no name matches.

Apache and nginx compared

Apache httpdnginx
Configuration unit<VirtualHost>server { }
NamesServerName, ServerAliasserver_name
Default siteThe first vhost for the addressThe first server, or default_server
Per-directory overrides.htaccess (if allowed)None; all in the main configuration
Process modelMPMs: event (default), worker, preforkEvent-driven workers
Typical roleApplications with modules (PHP via FPM, mod_*)Reverse proxy, static files, TLS termination

Operational commands

TaskApachenginx
Test the configurationapachectl configtestnginx -t
Show the parsed vhostsapachectl -Snginx -T
Reload gracefullysystemctl reload apache2 / httpdsystemctl reload nginx
Logs/var/log/apache2/, /var/log/httpd//var/log/nginx/
host$ sudo nginx -t
nginx: configuration file /etc/nginx/nginx.conf test is successful
host$ sudo nginx -T 2>/dev/null | grep -E "^\s*(listen|server_name)" | sort | uniq -c
host$ curl -s -o /dev/null -w "%{http_code} %{remote_ip}\n" -H "Host: unknown.example.net" http://10.30.0.11/
444 10.30.0.11
host$ sudo apachectl -S 2>&1 | head -6
host$ ss -tlnp | grep -E ':80 |:443 '
host$ sudo tail -f /var/log/nginx/access.log

Catch unknown names explicitly

The test with an unknown Host header shows which server answers requests for names you didn't configure. Without an explicit default, that's simply the first site, which may expose an application under any name pointed at your address. A catch-all server returning 444 (nginx) or a minimal default vhost prevents that.

Documented example, not captured output.

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

Known-good, transitional and broken reference

Web Services — comparative operational reference for Web Services. What it does not show: systemd active/running or host-global state alone does not show the workload context is healthy Next check: move one step toward the original workload using Use systemctl show/status plus journal/PID/socket evidence, validate the resource the service owns, then run the original client/application operation. Platform/scope: Linux distribution/systemd version; unit names, presets and service hardening differ by distribution/package.

How it works at runtime

Web Services is part of Web Services. Linux Web Services covers the host-side HTTP service stack from package and unit configuration through listener binding, virtual-host or server-block selection, TLS termination, reverse-proxy behavior, logs and the original client request.

Web serving adds listener/socket binding, virtual-host selection, reverse-proxy upstream routing and HTTP semantics.

Topic-specific state model. Linux Web Services covers the host-side HTTP service stack from package and unit configuration through listener binding, virtual-host or server-block selection, TLS termination, reverse-proxy behavior, logs and the original client request.

Technical metadata. Linux distribution + service/version + client/server/time + DNS/route/firewall + listener/socket + HTTP/TLS/vhost/proxy or NFS/SMB session + identity mapping + backend path/upstream + original workload result.

Interpretation rule. - A service reporting active ≠ a listener exists on the intended address and port.

  • A listening socket ≠ the requested virtual host or reverse-proxy route is selected.
  • An HTTP 2xx response ≠ the intended backend, content or authorization path is correct.
  • A local request ≠ the external DNS, firewall, TLS and client path are healthy.

Quick reference

Linux web stack components:

RoleCommon software
Web server / reverse proxyNginx, Apache httpd, Caddy, HAProxy
App runtimePHP-FPM, Gunicorn/uWSGI (Python), Node.js, Java (Tomcat)
TLS automationcertbot, acme.sh, Caddy built-in
Logsaccess/error logs, journald

Typical layout: Nginx terminates TLS and serves static files, proxies dynamic requests to an app server on localhost or a Unix socket. Check listeners with ss -ltnp and configs with nginx -t / apachectl configtest before every reload.

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. Web service troubleshooting is resolved only when the exact request reaches the intended listener, selects the intended site/proxy policy and produces the expected application response from the real client path.

Model. A valid certificate does not show the server presents it, the client trusts its chain or the hostname matches. openssl parsing success does not show key/certificate pairing or live deployment.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Configuration intent and lifecycle. Protect private keys with least privilege and controlled deployment. Build certificate chains in the order expected by the server and keep trust-store management separate from leaf certificate deployment. Reverse proxy settings should define upstream scheme/host headers/timeouts deliberately. Reload should be preferred over disruptive restart when supported and safe.

Distribution/platform context. Web Services owns Linux web-server operation; Firewall, Certificates & TLS, DNS and application-specific Topics own their deeper boundaries.

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. 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
linux web servicesweb server linuxhttp services linux
Embedded reference data

Quick lookup tables

Web Services operational reference

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

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateLinux Web Services covers the host-side HTTP service stack from package and unit configuration through listener binding, virtual-host or server-block selection, TLS termination, reverse-proxy behavior, logs and the original client request.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 chainservice configuration → effective unit/process → socket/listener → address/port/firewall → HTTP/TLS selection → virtual host or proxy route → upstream/application → client-visible responseTrace requested/configured state through effective state to the observed workload result.
Failure boundaryWeb service troubleshooting closes only when the exact request reaches the intended listener, selects the intended site/proxy policy and produces the expected application response from the real client path.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: service configuration → effective unit/process → socket/listener → address/port/firewall → HTTP/TLS selection → virtual host or proxy route → upstream/application → client-visible responseUse 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. Web service troubleshooting closes only when the exact request reaches the intended listener, selects the intended site/proxy policy and produces the expected application response from the real client path.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 Services · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryWeb Services
Topic pathWeb Services
Runtime stateLinux Web Services covers the host-side HTTP service stack from package and unit configuration through listener binding, virtual-host or server-block selection, TLS termination, reverse-proxy behavior, logs and the original client request.
Fast checks- Pin host, service, config source, listener address/port, requested scheme/host/path and test client. - Read back effective service configuration and verify which process owns the intended socket. - Trace one exact request through TLS/HTTP selection, logs and any proxy upstream to the application response. - Make the smallest persistent change, reload/restart only as required, then repeat the original client request and an adjacent regression test.
Verification chainservice configuration → effective unit/process → socket/listener → address/port/firewall → HTTP/TLS selection → virtual host or proxy route → upstream/application → client-visible response Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary.
Failure boundaryWeb service troubleshooting closes only when the exact request reaches the intended listener, selects the intended site/proxy policy and produces the expected application response from the real client path. 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?