0

I have installed proxmox and am running a simple ubuntu server where I have installed nginx. How and where do I setup ssl? I only want to use nginx to forward location to another web server. Can I set up Let's Encrypt ssl on the nginx server and forward to port 80 on the other web server or do I have to set up ssl on each of the targets?

I will have many dns names passing through the nginx proxy

Asken
  • 215
  • 1
  • 2
  • 8

2 Answers2

1

yes, you can setup Let's Encrypt ssl on the nginx server and forward to port 80 of other web server.

You may find the answer/discussion on this similar post helpful, nginx as reverse proxy with several domains hosts

Shadows13
  • 11
  • 1
0

Let's Encrypt creates temporary files inside .well-known directory for authentication. This doesn't work when you're using nginx as a proxy. I think easiest thing you can do is to rewrite .well-known to a local, accessible location.

I'm adaption these instructions from Setup Let’s Encrypt with Nginx Reverse Proxy.

Open nginx config file for the domain,

nano /etc/nginx/sites-available/domain.com.conf

Paste following code before proxy settings,

location /.well-known {
        alias /var/www/something/html/.well-known;
}

Restart nginx

systemctl restart nginx.service

Try it!