Tratopedia
繁中
Settings

Text size

Language

Theme

High contrast

Version

v1.230.2

The release this page was built from. It is what the service worker caches under.

Slide deck

Back

Apache, Nginx and Caddy: which HTTPS web server

Caddy is the simplest HTTPS server: certificates and HTTP/3 come switched on. Nginx is the fastest and leanest under load. Apache fits shared hosting and old modules. Whichever you run, automate renewal: Let’s Encrypt certificates shrink to 64 days in 2027 and 45 in 2028.

  1. HTTPS web servers · 27 October 2026

    Apache, Nginx and Caddy compared

    A plain-English guide to choosing an HTTPS web server, for beginners and professionals.

    Apache, Nginx and Caddy · HTTPS web servers1 / 15

  2. The basics

    How HTTPS works in three steps

    The web server’s job: hold the certificate, speak TLS and pass requests to your site.

    1 · Connect

    The browser contacts the server on port 443 and agrees which TLS version to use.

    2 · Prove

    The server shows a certificate that proves it owns the domain name.

    3 · Encrypt

    Both sides create shared keys, and everything after that is encrypted.

    Apache, Nginx and Caddy · HTTPS web servers2 / 15

  3. The basics

    Six terms you will meet

    TermMeaning
    TLSThe encryption protocol behind HTTPS. Use versions 1.2 and 1.3 only.
    CertificateA signed file that proves a server owns its domain name.
    ACMEThe standard that lets software request and renew certificates automatically.
    HSTSA header that tells browsers to always use HTTPS for your site.
    HTTP/2Faster loading by sending many requests over one connection.
    HTTP/3HTTP over QUIC and UDP, with quicker setup on poor networks.

    Apache, Nginx and Caddy · HTTPS web servers3 / 15

  4. The three servers

    Meet the three servers

    Shares from W3Techs, 27 October 2026.

    ServerVersionIn one lineShare of websites
    Apache2.4.69 · 1 Oct 2026The most compatible: per-folder .htaccess and a huge module library21.2%
    Nginx1.30.6 · 14 Oct 2026The fastest: built for heavy traffic and for sitting in front of other apps30.1%
    Caddy2.11.7 · 3 Oct 2026The simplest: HTTPS certificates are handled for you1.2%

    Apache, Nginx and Caddy · HTTPS web servers4 / 15

  5. The short answer

    Caddy for simplicity. Nginx for scale. Apache for compatibility.

    The next slides explain why, then compare TLS, certificates and speed.

    Apache, Nginx and Caddy · HTTPS web servers5 / 15

  6. Caddy

    Caddy: automatic HTTPS

    Best for: small and medium sites, home labs and teams without an operations person.

    Strengths

    Certificates are requested, installed and renewed on their own.

    • HTTP/3 is on by default, with TLS 1.2 and 1.3.
    • A short, readable Caddyfile, with HTTP redirected to HTTPS for you.

    Watch out for

    More memory use, and lower speed than Nginx under heavy load.

    • Wildcard certificates need a custom build with a DNS module.
    • You still add the HSTS header yourself.

    Apache, Nginx and Caddy · HTTPS web servers6 / 15

  7. Nginx

    Nginx: built for scale

    Best for: high-traffic sites, load balancing and reverse proxies in front of many apps.

    Strengths

    The highest throughput and lowest memory use of the three.

    • Mature load balancing, rate limiting and TCP and UDP proxying.
    • Stable 1.30 adds ECH and sticky sessions.

    Watch out for

    HTTP/3 is still marked experimental by the project.

    • Certificates need a separate ACME client, or the newer nginx-acme module, which cannot do wildcards.
    • Upgrade to 1.30.6 or later: five flaws, all rated medium, were fixed on 14 October 2026.

    Apache, Nginx and Caddy · HTTPS web servers7 / 15

  8. Apache

    Apache: built for compatibility

    Best for: shared hosting, older PHP applications and setups that rely on Apache modules.

    Strengths

    Per-folder .htaccess files, ideal for shared hosting.

    • The largest module library, including mod_rewrite and mod_security.
    • Built-in mod_md can request and renew certificates over ACME.

    Watch out for

    No official HTTP/3. Put Nginx, Caddy or a CDN in front for it.

    • A third-party mod_http3 exists, but it needs an Apache patch not yet merged upstream.
    • mod_md is still labelled experimental, and wildcards need a DNS script.

    Apache, Nginx and Caddy · HTTPS web servers8 / 15

  9. Comparison

    TLS defaults and HTTP/3 support

    ApacheNginxCaddy
    TLS versionsDepends on OpenSSL; set it yourself1.2 and 1.3 since 1.27.31.2 and 1.3
    HTTP/2Yes, with mod_http2Yes, with http2 on;Yes, on by default
    HTTP/3Not in official releasesYes, marked experimentalYes, on by default
    HSTS headerYou add itYou add itYou add it

    Apache, Nginx and Caddy · HTTPS web servers9 / 15

  10. Comparison

    Getting certificates automatically

    Automatic certificatesWildcard certificatesInternal CA
    ApacheYes: mod_md, or an external ACME clientA DNS scriptPoint mod_md at your own ACME server
    NginxAn ACME client, or the nginx-acme moduleAn external ACME client only (DNS-01)An internal ACME CA plus a client
    CaddyYes: built in, on by defaultBuild with a DNS moduleYes: tls internal

    Apache, Nginx and Caddy · HTTPS web servers10 / 15

  11. Comparison

    Certificate lifetimes are getting shorter

    • 90 daysLet’s Encrypt’s default lifetime today
    • 64 daysThe default from 10 February 2027
    • 45 daysThe default from 16 February 2028
    • What to do: use an ACME client that supports ARI, and monitor expiry dates. A fixed “renew every 60 days” schedule will stop working.

    Apache, Nginx and Caddy · HTTPS web servers11 / 15

  12. Comparison

    Speed: Nginx leads, most of all on static files

    Source: GetMind’s own test, September 2026. Indicative only; test your own setup.

    TestNginxCaddy
    Static files, requests per secondabout 142,000about 70,000
    Reverse proxy, requests per secondabout 43,500about 33,600

    Apache, Nginx and Caddy · HTTPS web servers12 / 15

  13. Sample setup

    A complete HTTPS site in a few lines of Caddyfile

    HTTP-to-HTTPS redirects and HTTP/2 and HTTP/3 come on without a line. Nginx needs a longer file plus a certificate tool; Apache needs mod_md directives or an external client.

    LineWhat it does
    example.com, www.example.comNames the site; Caddy gets and renews its certificate
    encode zstd gzipCompresses responses
    header Strict-Transport-Security max-age=63072000Adds HSTS for two years
    reverse_proxy 127.0.0.1:3000Passes requests to your app on port 3000

    Apache, Nginx and Caddy · HTTPS web servers13 / 15

  14. Checklist

    Four things to check this month

    Upgrade

    Nginx 1.30.6 or later, Apache 2.4.69 and Caddy 2.11.7.

    Drop OCSP stapling

    Let’s Encrypt turned off its OCSP responders in August 2025, so stapling no longer helps with its certificates.

    Automate renewal

    Use an ACME client that supports ARI, and monitor expiry dates.

    Leave ingress-nginx

    The community Kubernetes controller retired in March 2026. Move to Gateway API.

    Apache, Nginx and Caddy · HTTPS web servers14 / 15

  15. Decision

    Which one should you choose?

    Your situationPickWhy
    Personal site or home labCaddyAutomatic HTTPS and almost no upkeep
    Busy site or load balancerNginxHighest speed and lowest memory use
    Shared hosting or older PHPApache.htaccess and existing modules
    KubernetesGateway APIThe community ingress-nginx controller is retired

    Apache, Nginx and Caddy · HTTPS web servers15 / 15