pull down to refresh

how to setup one domain

Lots of different ways, if you're using a traditional web host you can set up a sub-domain for each, for example app1.some.domain app2.some.domain - each subdomain points to a different folder... caveat is your apps need to be static files

Directives may be available rather than subdomains that achieve the same thing... a directive would be some.domain/app1 routing to a given path

If the apps are services that need to run and not just static files, or if you simply want more control vs. generic webhosting... I recommend getting a cheap VPS... Hetzner, OVH, RackNerd etc...

A VPS is just a Linux VM

With that VM up you point your domain DNS to it, either as subdomains or a a root record to its ip (each subdomain would be its own dns record... app1.some.domain whereas a root record just points *.some.domain to your VPS IP)

On the VPS you need a reverse proxy to route to the specific apps, Caddy is the easiest to work with, its directives are simple to read and it automatically handles SSL certificates (free via LetsEncrypt)

Sample Caddy File:

example.com {
    # App 1: Static Files
    # handle_path strips "/app1" so Caddy looks for "index.html" 
    # inside "/var/www/app1/", not "/var/www/app1/app1/index.html"
    handle_path /app1/* {
        root * /var/www/app1
        file_server
    }

    # App 2: Reverse Proxy
    # handle_path strips "/app2" before forwarding to the backend
    handle_path /app2/* {
        reverse_proxy localhost:8080
    }

    # Optional: Fallback for the root domain "/"
    handle {
        respond "Welcome! Visit /app1 or /app2"
    }
}

PorkBun is a pretty good registrar, as cheap as anywhere and its transparent when the renewal price is higher than the registration price... its pretty common for registrations to be at a teaser rate then renewals are jacked up. They know that sticky domains will pay more to renew than for someone tinkering will pay to regsiter.

37 sats \ 3 replies \ @kepford 6h

Wish I had tried RackNerd sooner. Saving a lot of money.

reply

Yea their specials page with annual pricing can have some real bangers

For no commitment OVH is a little better, been using OVH more and more since the nvme storage can be a tiebreaker

reply
37 sats \ 1 reply \ @kepford 5h

Indeed. If you know how this stuff works and don't need to lean on support these options will save a lot.

reply

LLM's have really made VPSs indispensable even for the infrastructure averse, I kind of want to make an AI enabled shell for connecting to VPS's for normies and installing software... but got too much shit to do already

reply
17 sats \ 0 replies \ @jasonb OP 6h

Thank you! This is very helpful and I think it is going to save me a bundle!

reply