Two Domains, Two NGINX SSL Reverse Proxies, 1 IP


Hi there,

I was wondering if anyone would be able to help?

I’ve been happily running a Nginx SSL Reverse Proxy server (followed this guide: for some time now ( Since the cert expired (forgot to setup autorenew) I’ve attempted to setup another instance to cover a similar domain (

These run separate ESXi Ubuntu instances, with different LAN IPs but the same WAN.

When I am attempting to setup, I am finding conflicts when attempting to create the certificate (pulling other cert domains in error)

I’ve currently setup port forwarding 80/443 to both setups (realizing that isn’t going to work). Both domains have A Records (* and @ pointing to WAN)

Could someone nudge in the right way? Ideally I’d like to keep them on separate VM’s with separate certs ( - public facing, - local only)

My domain is: /
I ran this command:
My web server is (include version): nginx version: nginx/1.14.0 (Ubuntu)
The operating system my web server runs on is (include version): Ubuntu 18.04
My hosting provider, if applicable, is: DNS - Namecheap
I can login to a root shell on my machine (yes or no, or I don’t know): Y


If one name is run by one system and the other name is run by the other system, then you simply need to proxy the requests that don’t reach the corresponding system from the system that does get the request.
Assuming for this example:

  • System A handles domain A
  • System B handles domain B
  • All inbound port 80 requests are being forwarded to system A

When system A hears connection attempts for domain A, it handles them locally.
When system A hears connection attempts for domain B, then system A simply needs to proxy domain B requests to system B (via internal IP).