Score:0

NGINX TLS Passthrough and Termination on the same server bound to the same port?

us flag

I have an NGINX reverse proxy that handles TLS termination for my domain, and in the future will need to handle TLS pass-through for a separate domain. I only have one public IP for both domains, and need both 80/443 to be able to go to both domains. Due to privacy considerations, I will not be using TLS termination for the other domain.

My solution so far is TLS pass-through using ssl_preread set up with the stream directive in /etc/nginx/nginx.conf. My problem with this is that nginx appears to be unable to bind to port 443 in the nginx.conf when I have vhosts in sites-enabled also binding to that port. And since I cannot use the stream directive in sites-enabled, it looks like my plan won't work.

Unless I am missing something, I need another way to do TLS passthrough and termination on the same server using the same ports (80,443).

Is this possible? What other ways can I accomplish this?

Server: Debian 11 with NGINX 1.20

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.