but TBH i also wiped all my comments clean using powerdeletesuite

  • arvere@lemmy.ml
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    1 year ago

    [-] thunderbox666 « 1 point 2 months ago

    Pretty much any subdomain will go to the nginx server and it will only do something if youve configured that subdomain in the config - everything else just gets ignored, or you can setup a catchall to handle all the unconfigured stuff

    so you will need something like this (might not be exact, been a long time since i had to configure NGINX haha)

    server {
    server_name ha.mydomain.duckdns.org;
    location / {
    proxy_pass http://hostnameOrIP1:port1;
    }
    }
    server {
    server_name nextcloud.mydomain.duckdns.org;
    location / {
    proxy_pass http://hostnameOrIP2: port
    }
    }
    

    an easier way would be to use Nginx Proxy Manager which gives you a nice GUI to add and manage all the sites.

    • gornius@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      1 year ago

      To add to an answer, caddy is better fit for reverse proxy in my opinion. It’s like easier to configure version of nginx. With nginx proxy_pass you also have to configure other headers like x_forwarded_to, and you will also need to do some magic to get websockets working.

      And also caddy automatically generates certs using ACME, by default.