I have one IP address but several physical servers.
So the thing to do is add a reverse proxy to pass the traffic to the right machines. So far so good.
Now I do have one (but more in future) machine(s) running webmin/virtualmin.
Awesome thing I can run multiple domains and have virtualmin handle the letsencrypts where applicable.
But not when behind nginx… as I learned the nginx reverse proxy needs the certificates on the reverse proxy itself to be able to pass the traffic.
Now the virtualmin has no problems updating the certs every 90 days… but I would like to automate the certs to be moved to the nginx reverse proxy for use.
Now maybe my approach is not the right one or there are better ways to do so, please let me know.
internet
-> router portforwarding 80 and 443 to nginx reverse proxy
–> nginx reverse proxy having the certs passing traffic to virtualmin vhosts port 80 (192.168.x.2)
—> domain.com (192.168.x.10 shared IP on Virtualmin_1)
—> another.com (192.168.x.10 shared IP on Virtualmin_1)
—> yetanother.com (192.168.x.11 shared IP on Virtualmin_2)
—> anymore.com (192.168.x.11 shared IP on Virtualmin_2)
…
I hope this explains a little… looking forward to read some good ideas. Tx.