but TBH i also wiped all my comments clean using powerdeletesuite

    • arvere@lemmy.ml
      link
      fedilink
      English
      arrow-up
      9
      ·
      edit-2
      11 months 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
        cake
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        11 months 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.

    • arvere@lemmy.ml
      link
      fedilink
      English
      arrow-up
      6
      ·
      11 months ago

      sharing actual text makes it searchable and easier to archive for the future

    • arvere@lemmy.ml
      link
      fedilink
      English
      arrow-up
      3
      ·
      11 months ago

      [-] thunderbox666 « 1 point 2 months ago Anything that has a web service, such as nextcloud or home assistant, can be setup on a domain or sub domain

      So you would setup the domain (for example let’s say you have myhome. duckdns.org) to point to your server running nginx reverse proxy, and then configure all your services in there

      So you might setup homeassistant.myhome.duckdns.org and point it to the internal address you use for home assistant, eg http://192.168.1.15:8123

      Then you might add nextcloud as nextcloud.myhome.duckdns.org to point to https://192.168.1.15 These can all be on the same machine as nginx reverse proxy or on another machine all together

      Some of these services might also need extra configuration but most will also have guides on their site on what you need to configure to work with a reverse proxy

    • Redex@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 months ago

      Damn this is incredibly convenient, I was just playing around trying to setup a home server the past few days and this was exactly what I’ve been looking for.