Skip to content

Conversation

@mrrobot47
Copy link
Member

@mrrobot47 mrrobot47 commented Jan 12, 2026

Summary

Add SSL_STAPLING environment variable to allow disabling OCSP stapling for certificates without OCSP responder URLs.

Problem

Nginx logs warnings for certificates that don't have OCSP responder URLs:

nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate

This is common with self-signed certificates or certificates from CAs that don't provide OCSP.

Solution

Add SSL_STAPLING environment variable (default: on) that can be set to off to disable OCSP stapling.

Usage

environment:
  - SSL_STAPLING=off

Changes

  • nginx.tmpl: Added SSL_STAPLING env var support with conditional check before enabling ssl_stapling
  • README.md: Documented the new environment variable

Note: We also investigated fixing the nginx: [warn] protocol options redefined for 0.0.0.0:443 warning related to http2 on; directives. After testing multiple approaches (global http2, per-server-block http2, removing http2 from non-default blocks), we determined this is expected nginx 1.25.1+ behavior for multi-vhost SNI setups and cannot be fixed with template changes. The warning is benign and does not affect functionality.

Copilot AI review requested due to automatic review settings January 12, 2026 15:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes nginx warning logs by correcting the placement of the http2 directive and adding optional control for SSL stapling via environment variable.

Changes:

  • Moved http2 on; directive outside of listen blocks to prevent duplication warnings in nginx 1.25.1+
  • Added SSL_STAPLING environment variable to allow disabling OCSP stapling for certificates without OCSP support
  • Updated documentation to include the new SSL_STAPLING variable

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
nginx-proxy/nginx.tmpl Relocated http2 on; to server-level (3 locations) and added conditional SSL stapling based on SSL_STAPLING environment variable
nginx-proxy/README.md Added documentation for the new SSL_STAPLING environment variable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add SSL_STAPLING environment variable (default: on) to allow disabling
OCSP stapling for certificates without OCSP responder URLs.

Usage: Set SSL_STAPLING=off on containers to silence the warning:
'ssl_stapling ignored, no OCSP responder URL in the certificate'

This is useful for self-signed certificates or certificates from CAs
that don't provide OCSP responder URLs.
@mrrobot47 mrrobot47 force-pushed the fix/nginx-proxy-http2-ssl-stapling-warnings branch from e0b9765 to bdabb6b Compare January 13, 2026 09:50
@mrrobot47 mrrobot47 changed the title fix(nginx-proxy): Fix http2 duplication and add SSL_STAPLING control feat(nginx-proxy): Add SSL_STAPLING env var to control OCSP stapling Jan 13, 2026
@mrrobot47 mrrobot47 merged commit 806b081 into EasyEngine:develop Jan 13, 2026
15 of 16 checks passed
@mrrobot47 mrrobot47 deleted the fix/nginx-proxy-http2-ssl-stapling-warnings branch January 13, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant