這是我第一次在 docker 中使用 certbot 和 nginx
- nginx版本:1.23.1
- nginx 構建:docker (macbre/nginx-http3)
- OpenSSL 1.1.1(兼容;BoringSSL)(與 BoringSSL 一起運行)
nginx 在嘗試使用 ocsp 穩定時拋出此錯誤
nginx: [warn] "ssl_stapling" ignored, not supported
cert 似乎支持 ocsp
openssl x509 -in cert.pem -noout -ocsp_uri
# http://r3.o.lencr.org
nginx ssl 配置
# =============================================================================
# default Certificates
ssl_certificate /certs/dir/cert.pem;
ssl_certificate_key /certs/dir/key.pem;
# =============================================================================
ssl_dhparam /certs/dir/dhparam.pem;
# =============================================================================
# # OCSP staplingenter code here
ssl_stapling on;
ssl_stapling_verify on;
# # verify chain of trust of OCSP response using Root CA and Intermediate certs
ssl_trusted_certificate /certs/dir/chain.pem;
# # replace with the IP address of your resolver
resolver 1.1.1.1 8.8.8.8 8.8.4.4 valid=1200s;
resolver_timeout 3s;
# =============================================================================
# TLS
ssl_protocols TLSv1.3;
ssl_prefer_server_ciphers off;
# =============================================================================
# 0-RTT QUIC connection resumption
ssl_early_data on;
# =============================================================================
# https://ssl-config.mozilla.org/#server=nginx&version=1.17.9&config=intermediate&openssl=1.1.1d&guideline=5.4
# Optimize session cache
# ssl_session_timeout 1d;
ssl_session_timeout 4h;
# about 40000 sessions
ssl_session_cache shared:MozSSL:10m;
# Enable session tickets
ssl_session_tickets off;
那些沒有幫助:
- http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_stapling
- Nginx“ssl_stapling”被忽略,在 OCSP 回應者“ocsp.comodoca.com”中找不到主機
- https://www.openssl.org/docs/man1.1.1/man1/ocsp.html
- https://www.nginx.com/resources/wiki/start/topics/tutorials/installoptions 等等
- nginx 代理不快取 OCSP 回應
- Nginx OCSP_basic_verify:未找到簽名者證書
和許多這個串列:https ://stackoverflow.com/search?q=nginx ocsp
有沒有人遇到過這個問題?
或者有人能告訴我如何克服這個嗎?
我想用 nginx 設定 ocsp
uj5u.com熱心網友回復:
OpenSSL 1.1.1(兼容;BoringSSL)(與 BoringSSL 一起運行)
根據這個討論,使用 BoringSSL 時似乎不完全支持 OCSP 裝訂。雖然有一個補丁可以向 nginx 添加對 OCSP 裝訂的支持,但它需要將 OCSP 回應作為檔案提供,它無法從 OCSP 回應程式的 nginx 中自動檢索它。參考:
由于使用 BoringSSL 而不是 OpenSSL,一些指令可能不起作用,例如 ssl_conf_command。此外,通過 ssl_stapling 直接 OCSP 裝訂;ssl_stapling_verify 開啟;也不行。你應該使用 ssl_stapling ;ssl_stapling_file /path/to/ocsp;。OCSP 檔案可以通過...生成
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/515433.html
