Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
VGSOURCES
Get listed

ApachePATCH 2026.10.15

How to Configure OCSP Stapling on Apache and Nginx

By VGSources Team 10 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Apache needs two things for OCSP stapling: SSLUseStapling On and a mandatory SSLStaplingCache. Nginx needs ssl_stapling on;, a working resolver, and (when verification is enabled) a trust file containing the issuer, root, and intermediate certificates. In both servers, the certificate chain, DNS and outbound access to the certificate authority’s OCSP responder, cache state, and the live TLS handshake determine whether a response is actually stapled.

This guide gives separate Apache and Nginx procedures, explains where each directive belongs, and shows how to verify the result from outside the server. Directive availability and defaults vary with the installed web-server and OpenSSL versions, and a certificate authority can change its responder URL. Check the deployed certificate’s Authority Information Access (AIA) extension before rollout.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What OCSP stapling changes in a TLS connection

Online Certificate Status Protocol (OCSP) lets a client ask a certificate authority whether a certificate has been revoked. Without stapling, a browser or other TLS client may have to contact the authority during connection setup. With stapling, the web server periodically obtains a signed OCSP response and sends that response to the client during the TLS handshake. The client can then evaluate the certificate status without making a separate request to the authority.

The server does not invent the responder address. It reads the OCSP URL advertised in the certificate’s AIA extension, resolves that hostname, reaches the responder, and retains a response until it needs to refresh it. A valid certificate chain and a reachable responder are therefore prerequisites; enabling a directive alone does not guarantee that the handshake will contain a response.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses | Anti UV Ray, For Computers & Gaming, Square Frame, Eyewear for Men and Women
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Apache and Nginx implement the same TLS feature with different configuration models:

Area Apache (mod_ssl) Nginx
Enable stapling SSLUseStapling On ssl_stapling on;
Response storage A configured shared-memory SSLStaplingCache is mandatory. Nginx fetches and manages responses internally; an optional ssl_stapling_file can supply a DER response from disk.
DNS requirement Resolver behavior follows the host’s normal resolver setup. A resolver directive should be specified so the OCSP responder hostname can be resolved.
Stapling verification Controlled by mod_ssl and its certificate chain. ssl_stapling_verify on; uses certificates configured with ssl_trusted_certificate.
Primary configuration scope Cache is global; stapling is normally enabled globally and can be overridden in a virtual host. Directives belong in the relevant http or server context.

Prepare the certificate and network first

Confirm that the certificate advertises an OCSP responder

Inspect the certificate installed on the server and locate its AIA OCSP entry. For a PEM certificate file, a commonly available OpenSSL check is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
openssl x509 -in certificate.pem -noout -ocsp_uri

The returned hostname and URL are the destination the server must reach. If no OCSP URI is present, there is no responder endpoint for stapling to use; replacing or reissuing the certificate is a certificate-management decision, not an Apache or Nginx setting.

Assemble a usable chain

The server certificate normally needs its issuing intermediate certificates in the file presented to clients. An incomplete chain can prevent clients from building trust and can also prevent stapling validation. Keep the leaf certificate first, followed by the required intermediates, in the file referenced by Nginx’s ssl_certificate. Apache’s certificate and chain directives vary by installed version and distribution, so use the chain layout expected by that installation.

For Nginx verification, prepare a separate trust file containing the server certificate’s issuer, the root certificate, and every required intermediate certificate. The Nginx module documentation specifically requires those certificates to be trusted through ssl_trusted_certificate when stapling verification is enabled.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

Allow DNS and outbound HTTP

The server must resolve the responder hostname and make outbound HTTP connections to it. Firewall policy, an HTTP proxy requirement, a blocked egress path, or a resolver that cannot answer the hostname can leave the server running while no response is stapled. Test from the same host and network namespace used by the web-server workers, not only from an administrator workstation.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Record the software versions

Directive support and defaults depend on the installed Apache or Nginx release and the linked OpenSSL library. Record those versions before changing production configuration and consult the matching mod_ssl or Nginx module documentation. Certificate authorities can also change responder URLs and operational behavior, so re-check AIA data when certificates are renewed.

Configure OCSP stapling on Apache

1. Enable stapling and create the mandatory cache

At global SSL configuration scope, add both directives:

SSLUseStapling On
SSLStaplingCache shmcb:/var/run/ocsp(32768)

Apache’s mod_ssl documentation is explicit: “Configuration of a cache is mandatory for OCSP stapling.” The shmcb provider creates a shared-memory cache; /var/run/ocsp is an example path and 32768 is the example cache size shown above, not a universal capacity recommendation.

Use the cache location supplied by your operating system or Apache build. Debian/Ubuntu, Red Hat-family systems, source builds, and other layouts place global SSL settings and runtime directories in different locations. The directory or shared-memory target must be available to the Apache parent process and remain present across restarts according to the distribution’s runtime-directory rules.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men | Office Gifts for Women, iPhone Stand, Gadgets for Men, Office Decor, Gaming Desk Accessories for Samsung Fold 8, Switch, iPad
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

2. Put the directives in the right scope

Keep SSLStaplingCache in the global server configuration, where all eligible virtual hosts can use it. Enable stapling globally with SSLUseStapling On when most HTTPS virtual hosts should staple. A virtual host can opt out with:

SSLUseStapling Off

Use that override only for a host that should not staple. A host that remains enabled still needs a certificate with an OCSP responder and a chain Apache can validate.

3. Treat responder and cache controls as tuning, not substitutes

mod_ssl exposes controls for responder timeout, standard and error cache lifetimes, maximum response age, clock-skew handling, and responder-error behavior. The relevant settings include SSLStaplingResponderTimeout, SSLStaplingStandardCacheTimeout, SSLStaplingErrorCacheTimeout, SSLStaplingResponseMaxAge, SSLStaplingFakeTryLater, and SSLStaplingReturnResponderErrors. Change these only when you have a defined operational reason and have checked the documentation for your installed version. A longer cache lifetime cannot repair a missing responder URL, a broken chain, or a cache that never initialized.

4. Validate and reload without dropping connections

  1. Run the configuration checker supplied by your Apache installation, commonly apachectl configtest or the distribution’s equivalent.
  2. Correct syntax, path, permission, and module errors before touching the live service.
  3. Perform a graceful reload using the service manager or Apache control command used by your distribution. A graceful reload lets existing connections finish while new handshakes use the new settings.
  4. Allow the server to contact the responder and populate the cache before judging the result. An immediately restarted process may not yet have a cached response.

Configure OCSP stapling on Nginx

1. Enable stapling and configure a resolver

In the applicable http or server context, add:

ssl_stapling on;
resolver 1.1.1.1 1.0.0.1 valid=300s;

Nginx states that a resolver directive should be specified to resolve the OCSP responder hostname. The addresses above are example recursive resolvers; use resolvers permitted by your network and security policy. valid=300s controls how long Nginx may cache a DNS answer in this example and should match your operational requirements.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Place the directive in http when many virtual hosts share the policy, or in an individual server block when only selected sites should staple. Check for an inherited resolver in the effective configuration; an unexpected inherited value can send lookups to a resolver that production workers cannot reach.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

2. Supply the trust material used for verification

Enable verification and point Nginx at a trust bundle:

ssl_stapling_verify on;
ssl_trusted_certificate /etc/nginx/tls/ca-chain.pem;

The trust file must contain the issuer of the server certificate, the root certificate, and all required intermediate certificates. It is not merely the public certificate sent to clients. If the file omits an intermediate or contains an unrelated chain, Nginx may fetch a response but reject it during verification.

3. Present a complete client chain

Configure ssl_certificate with the server certificate followed by the intermediates needed by clients. Keep the verification bundle used by ssl_trusted_certificate conceptually separate: one file is the chain presented in the handshake, while the other is the trust material Nginx uses to validate the stapled response.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Use a stapling file only when you intentionally manage the response

Nginx also supports ssl_stapling_file. When this option is used, the file must contain DER output produced by the openssl ocsp command. This is an alternative to Nginx fetching the response itself; it adds a process for obtaining, renewing, replacing, and permissioning the file. If that process leaves an expired or missing file, the handshake will not have a usable response.

5. Test and reload

  1. Run nginx -t and resolve every reported path, syntax, certificate, and permission error.
  2. Gracefully reload Nginx through the service manager or the control command used by your installation.
  3. Confirm that worker processes can resolve and reach the responder and can read the trust bundle.
  4. Allow a fetch to complete, then inspect a new TLS handshake from a client outside the server.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verify the response in a real TLS handshake

Use OpenSSL against the public endpoint

Apache’s SSL/TLS how-to recommends the OpenSSL command-line program for checking whether an OCSP response is sent. A typical check is:

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
openssl s_client -connect example.com:443 -status

Replace example.com:443 with the public host and port. In the output, look for an OCSP response section and a successful response status. Running the command against the public name matters: testing a backend address, a different virtual host, or a TLS-terminating load balancer can inspect a different certificate and configuration.

Separate configuration errors from an empty cache

A syntactically valid configuration can still produce no response while the cache is cold. Repeat the handshake after a reasonable interval and inspect the web-server error log. On Apache, look for cache initialization and responder errors. On Nginx, look for resolver failures, trust-chain failures, and errors opening certificate or stapling files. A response that appears intermittently often indicates cache expiry, responder reachability, or multiple front ends with inconsistent configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot a missing stapled response

What you observe Likely cause Checks and corrective action
No OCSP section in the OpenSSL handshake Stapling is disabled, the wrong virtual host answered, or no response has been fetched yet. Confirm the requested hostname, enable the directive in the effective configuration, perform a graceful reload, and check logs after allowing cache initialization.
Apache starts but never staples SSLStaplingCache is absent, points to an unusable path, or cannot be initialized. Add the mandatory global cache, use the distribution’s valid runtime path, check permissions, and inspect Apache startup and SSL logs.
Nginx logs resolver errors No usable resolver is configured, or workers cannot reach the configured DNS servers. Set resolver in the effective http/server context and test DNS reachability from the worker environment.
Nginx fetches but rejects the response ssl_stapling_verify is enabled but ssl_trusted_certificate lacks the issuer, root, or an intermediate. Rebuild the trust bundle with the complete required chain and verify the file path and permissions.
Clients report chain or trust problems The file presented by ssl_certificate omits an intermediate or is ordered incorrectly. Place the leaf certificate first and append the intermediates required by clients; do not assume the separate trust bundle is sent to clients.
Responder connection failures Outbound HTTP is blocked, the AIA URL is stale, or the responder is temporarily unavailable. Read the certificate’s current AIA URL, test DNS and outbound access from the server, and review firewall or proxy policy. Recheck the URL after certificate renewal.
A response was configured with ssl_stapling_file but is absent or rejected The file is missing, unreadable, expired, or not DER output from openssl ocsp. Regenerate the DER response, install it at the configured path with worker-readable permissions, and establish a renewal process.
Only some clients or hosts show stapling Different virtual hosts, front ends, certificates, or server versions are serving the name. Test each public hostname, compare effective configurations and certificate chains, and verify every TLS terminator in the connection path.

Apache and Nginx operational differences

Apache’s mandatory shared cache

Apache’s most important implementation distinction is that stapling is not complete without SSLStaplingCache. The cache is a global resource, while SSLUseStapling can be enabled or disabled per virtual host. A cache-path mistake can therefore affect several sites at once.

Nginx’s explicit resolver and trust store

Nginx makes two dependencies visible in configuration: the resolver used to find the responder and the trust bundle used to verify the response. This is convenient for controlled environments, but it also means a configuration copied between networks may fail if its DNS servers are unreachable or its trust file does not match the deployed certificate chain.

Certificate files serve different purposes

Both servers need a chain that clients can build. Nginx additionally distinguishes the chain sent in ssl_certificate from the certificates trusted for stapling verification in ssl_trusted_certificate. Treating those as interchangeable is a common source of verification errors.

A rollout checklist

  • Read the deployed certificate’s AIA extension and record the OCSP URL.
  • Confirm DNS resolution and outbound HTTP access from the web-server host or worker network.
  • Verify that the client-facing certificate file contains the leaf and required intermediates.
  • For Apache, configure a valid global SSLStaplingCache and enable SSLUseStapling On.
  • For Nginx, enable ssl_stapling on; and configure a reachable resolver.
  • For Nginx verification, configure ssl_stapling_verify on; and a complete ssl_trusted_certificate bundle.
  • Run the server’s configuration test before reloading.
  • Gracefully reload, allow the cache or fetch process to initialize, and inspect error logs.
  • Use OpenSSL against each public hostname and verify that the handshake contains a current OCSP response.
  • Repeat the checks after certificate renewal, DNS changes, firewall changes, or migration to another TLS terminator.

Bottom line

On Apache, start with the mandatory shared cache and then enable stapling in the appropriate virtual hosts. On Nginx, start with the stapling directive, a resolver that workers can reach, and a trust bundle containing the issuer, root, and intermediates. In either server, only a live handshake test proves delivery; configuration syntax by itself does not.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

ApacheNGINXOCSP staplingSSL certificatesTLSweb server security

Leave a reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.