Hey all. Ive been hosting some software for a while now, some private, some public stuff.

Recently ive gotten myself a domain name, and i’m trying to come up with a good way to have access to both the public AND the private on the same URL. Simpleton that i am i thought about putting the public in an inline frame with a banner with links at the top, but im sure there are better ways.

Any ideas how to do this from this community?

Edit : After all these comments, i stumbled upon Nginx. After some startup problems, i now have Nginx running in a docker on the same remote server. Plenty of questions left but most notably (and hereby clarified) : Is there something like a management page-thingy i can install that lets me manage the content of the various containers? Think sonarr, a torrent client, nginx, etc.

  • Midas
    link
    fedilink
    141 year ago

    Not sure if I completely understand but I think you want public service 1 accessible on subdomains s1.domain.com and internal service 2 on s2.domain.com?

    Just point the A record for s2 to an internal ip address (or a tailscale ip). The only thing dns does is translate a (sub)domain to an ip address. So outside of your network s2.domain.com wouldn’t resolve but inside your network it would.

    • BlackEco
      link
      fedilink
      English
      41 year ago

      That’s what I did:

      • There is *.selfhosting.domain.tld that points to my router’s IP address, which then redirects to an nginx+certbot reverse proxy
      • Then there is *.local.domain.tld that points to my local IP with Caddy

      The only challenging part was to configure Caddy to issue SSL certificates using the DNS challenge since *.local.domain.tld isn’t exposed to the outside world.

    • Encrypt-Keeper
      link
      fedilink
      2
      edit-2
      1 year ago

      Or just use one, and then run a local DNS resolver like pihole or AdGuard home and just make a record for the same host locally. The local DNS resolver will resolve the local request before it reaches the public DNS.

    • That one Dutch guyOP
      link
      fedilink
      11 year ago

      subdomains would work, though ive never worked on it without a gui. Time to do some learning i guess :)

      • @ThreeHalflings@lemmy.world
        link
        fedilink
        11 year ago

        OK, I didn’t read before answering, probably ignore my answer below but I’ll leave it up incase someone learns something from it.

    • @teuto@lemmy.teuto.icu
      link
      fedilink
      11 year ago

      I prefer to use a local DNS for internal services just so there is less publically available information about my internal network. No need to let everyone know what address space I use or which vlan certain services are on. Also means you don’t have to wait for public DNS servers to update.