Help with nginx+letsencrypt reverse proxy config

I get the other users answer is better organised, but I don't understand the commands and can't adapt them to my config, not to mention they're written for docker config which is another order of "nope, don't get that at all" above where I am currently.

I pasted the block you suggested in my original config file to no avail. I then commented out pretty much everything and left only this:

server {
server_name turbomrak.ddns.net;
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
client_max_body_size 10240M;
root /var/www/nextcloud/;

location ~/machine1 {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://fr24.lan:8765;
}
}

and in both cases accessing turbomrak.ddns.net/machine1 results in blank page saying:
Unable to find the specified file. The source of the page contains no html whatsoever just the string itself + the second attempt (understandably) completely kills the nextcloud functionality.

in /var/log/nginx/error.log there is nothing, but in /var/log/nginx/access.log this shows up:

[01/Aug/2020:00:12:01 +0000] "GET /machine1 HTTP/2.0" 404 34 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.122 Safari/537.36"