Hi this is a more generic question on setting up letsencrypt with nginx in a reverse proxy configuration.
Ive a setup as follows:
we have a single dedicated IP and use DNS through a provider
internet -> router -> LAN ( server 1 + server 2)
the router handles port forwarding
we use nginx for web serving and proxying
server 1 is working properly with letsencrypt for virtual web servers on this machine
server 1 is also acting as a reverse proxy for virtual web servers on server 2
server 2 is working properly for virtual web servers without ssl
but having a problem implementing ssl for virtual web servers server 2
was able to get letsecnrypt to generate certificates using the DNS challenge for the virtual web server on server 2 but cannot find a configuration to work
from my limited understanding i think it relates to ssl termination at server 1 instead of server 2
may I have some guidance for the nginx configuration on server 1 and server 2 where server 1 is acting as a reverse proxy for server 2
Server 1 can't proxy SSL connections to Server 2 (without some tricky SNI prereading hacks). Instead, Server 1 must terminate the SSL connection by itself.
If you wish to further encrypt the connection between Server 1 and Server 2, you can choose to do that, but that's a separate connection that the visitor does not see.