Prod and Dev servers both on port 80

I have 2 (potentially 3) servers on my LAN (dev, test, prod) that have nginx on port 80. I want a wildcard * certificate to be shared, but my understanding is that I can only forward port 80 (incoming requests) to one of these servers. Yet I'd like to use certbot for certificate management.

What are my options? Seems like prod should use the standard port, with certbot configured for that server (prod - production), and then manually copy the certs to dev and test.

What's the best practice on this?



Why not setup a reverse proxy in front of your 3 servers? That way, you could setup the wildcard certificate only on that server and do host-based routing to your LAN hosts.

Otherwise, a wildcard certificate can only be obtained by the DNS challenge ( As such, forwarding port 80 is not required to obtain it. It's probably better to obtain 3 different certificates than trying to share one across 3 hosts.


Use SNI to separate the traffic.
Yes, initially, only one IP will receive the HTTP requests; But it can proxy to the others (provided that they each have unique names).

OR add another system to do that (as _az suggested).

1 Like

If you terminate the TLS connection at the reverse proxy, there's no need to share anything, assuming the internal network is fully secure.

A reverse proxy doesn't need to be a separate entity. It could just be one of the two (or three) dev/test/prod servers.

I'm working with @kirkroyster on this. For context, we're operating with a SonicWall firewall. So, I imagine we can do something in there. I just haven't learned what that is, yet!

Unless it can terminate the TLS connections and SNI proxy the traffic, it will just have to forward HTTP/
HTTPS to an internal IP that will do that.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.