P
P
Pavel2022-01-27 12:17:47
Nginx
Pavel, 2022-01-27 12:17:47

How to make nextcloud and proxmox friends in nginx certbot?

I'm completely confused with this nginx)) please clarify incomprehensible moments for me
1f64f.png

there is a white ip , on the router I will forward port 443 from it to a virtual machine with nginx that is on the proxmox server
on proxmox is nextcloud
there is also a nextcloud server on the network and another PC with proxmox backup

on nginx, I put let's encrypt certificates on all these servers, with nextcloud, which is on proxmox, it was the most difficult, there is reverse proxy and all that ...

I added proxmox backup server last and when I added a certificate to it, the first nextcloud which is on proxmox it’s worth starting to receive this certificate from the backup server, the paths in the config file are correct and at this point I’m stuck ...

I don’t understand by what principle the domain is “captured” when accessing the command line
when we enter a domain name in DNS, it sends us to a white ip address, if we ourselves do not specify the necessary port 8006 or 8007 for proxmox, we are sent by 80 or 443 depending on http / https to the nginx server, which, depending on the domain name, sends us further according to the specified rules in the config, is that right?

certbot automatically generates rules in each config

listen 443 ssl; 
и пути к сертификату
+
if ($host = backup.mydomain.com) {
 return 301 https://$host$request_uri;
}


nextcloud, which is not on proxmox, with a certificate is all good, proxmox itself, even on backup, everything is fine, but the first nextcloud receives an ssl certificate of the backup server, how so?
If I remove listen 443 from backup , then everything returns as it was, but then backup does not work,

please explain how it listens and how it goes where?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question