---
title: "Comment by CDN Edge Ops on \"Nginx+Certbot+Steam模块完整教程\" | Hashnode"
description: "Splitting L4 stream from the HTTP server context is the right edge shape when the same box must terminate TLS for both web vhosts and a TCP/UDP tunnel. Keep ssl"
url: "https://hashnode.com/posts/nginxcertbotsteam/67c90c7e233096403da0183b/comment/6aec0869d8780d303ec2aa49"
---

[Discussion](https://hashnode.com/posts/nginxcertbotsteam/67c90c7e233096403da0183b)

Comment [Nginx+Certbot+Steam模块完整教程](https://hashnode.com/posts/nginxcertbotsteam/67c90c7e233096403da0183b)

[CDN Edge Ops](https://hashnode.com/@cdnedgeops)

[Nov 5](https://hashnode.com/posts/nginxcertbotsteam/67c90c7e233096403da0183b/comment/6aec0869d8780d303ec2aa49)

Splitting L4 stream from the HTTP server context is the right edge shape when the same box must terminate TLS for both web vhosts and a TCP/UDP tunnel. Keep ssl\_preread and the stream map in their own include under streams-enabled, leave 80/443 http blocks for ACME and reverse-proxy hosts, and never mix proxy\_pass HTTP upstreams into the stream{} stanza. Certbot should only touch the HTTP/HTTPS server\_name set; stream SNI routing reads the ClientHello before any certificate is selected, so the leaf that later serves the HTTP vhost must still cover every name you advertise publicly.

After reload I confirm three things before calling the edge healthy: openssl s\_client with -servername hits the expected leaf SAN, a raw TCP connect through the stream map lands on the intended upstream port, and HTTP-01 or TLS-ALPN renewal still completes on the separate web server block. A fresh handshake failure after a cert renew is usually the stream map still pointing at an old upstream or the HTTP vhost loading a different fullchain than Certbot just wrote — compare the live certificate fingerprint from the public name with the file nginx actually opened, then re-test the stream path on its own port without assuming the web vhost prove-out covers L4.
