My domain is: turbomrak.ddns.net
My web server is (include version): nginx/1.19.0
The operating system my web server runs on is (include version): Ubuntu 20
I can login to a root shell on my machine (yes or no, or I don't know): yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): neither of those commands exist on my system, but the autorenewing works
Hi,
I'm banging my head against this for over a month not really getting anywhere on account of me not understanding how the underlying technology works at all. I have a question with the relevant config files open on stackoverflow here, but the answer I got only further confused me.
Long story short, I have turbomrak.ddns.net registered with noip.com, ports 80 and 443 forwarded to a local machine turbomrak.lan where I have nginx setup with autorenewing certificate from letsencrypt which has been working flawlessly without me touching anything for over a year and still does.
I remember making the letsencrypt certificate work and autorenewing for turbomrak.ddns.net brought me alternatively to tears and seething rage until I got there in the end (using a script from a now defunct blog which did it all for me without me understanding what's really going on I'll admit). This is not a critique of how letsencrypt works, but an actual description of my linux related "abilities". Which is why I would rather not go through the same process for every new local machine I would wish to access from outside my lan.
What I would like to achieve is being able to convert the existing config into an reverse proxy to allow me access to multiple local machines while preserving current status quo.
disclaimer: My knowledge of nginx config is non-existent. I've no idea if what I want is possible how I envision it, please enlighten me.
At this point I'd literally pay for having it altered to work like this:
turbomrak.ddns.net working as is
turbomrak.ddns.net/machine1 proxied to local1.lan
turbomrak.ddns.net/machine2 proxied to local2.lan
etc
while using 1 certificate for turbomrak.ddns.net
I tried adding
location = /machine1 {
proxy_pass local1.lan:someport
}
at various positions in my nginx config which alternatively didn't work, loaded the turbomrak.ddns.net regardless or displayed an error about file not found.
2nd best thing would be:
turbomrak.ddns.net working as is
turbomrak.ddns.net:1234 proxied to local1.lan
turbomrak.ddns.net:2345 proxied to local2.lan
etc
I tried creating new server blocks like this:
server {
listen 1234 ssl;
location / {
proxy_pass http://local1.lan:someport;
}
which didn't work at all
What I finally ended up with which sort of works is registering new ddns.net domain at noip.com then created a new server block like this:
server {
listen 443 ssl;
server_name new_domain.ddns.net;location / {
proxy_pass http://local1.lan:someport;
}
}
which works when I access https://new_domain.ddns.net, but of course complains the certificate is for turbomrak.ddns.net not new_domain.ddns.net
Knowing my shortcomings I'm prepared to accept that's the best I'll get, but could anyone at least please let me know how "safe" is this? As in I do not really care about the browsers complaining about the certificate being for different domain, as I am actually hundred percent sure the certificate is valid.