IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New I am about to ask a series of very stupid questions about how the internet works.
I currently have a home server that is hosting a Nextcloud instance that is in use by several family members. It's locked down pretty strongly (only open port is the web interface, non encrypted and weakly encrypted traffic is disabled, passwords are exceedingly long line noise, updates are automatically installed daily) and I'd like to experiment a little more with it.

If I have a no-ip account such as foo.ddns.net pointing at the home server which is running NGINX, and I want to have a series of subdomains such as:

nc.foo.ddns.net
bw.foo.ddns.net
bl.foo.ddns.net

Can I just get away with just setting up multiple configuration files under NGINX each hosting its own subdomain, or do I need to install and configure a DNS (and expose it to the world) and have each entry pointing to the external address of my current server? I'm guessing the latter, but hoping for the former.
Ceterum autem censeo pars Republican esse delendam.
New dns just points to an ip address
so if you want to have a series of subdomains (not sure why)
you can add
nc.foo.ddns.net
bw.foo.ddns.net
bl.foo.ddns.net
to your /etc/hosts file pointing to your internal ip address
have your family also edit their own host entries on their own systems to match what you have.
Not sure about nginx but apache I would add virtual hosts for each of the names with a different docroot pointing to different parts of the webserver

seems like a lot of work for not much benefit but I am not sure of what problem you are trying to solve
"Science is the belief in the ignorance of the experts" – Richard Feynman
Expand Edited by boxley Jan. 17, 2021, 04:42:41 PM EST
Expand Edited by boxley Jan. 17, 2021, 04:42:58 PM EST
New I'm lazy.
Either I teach myself to hack NGINX config files so I can move my Nextcloud instance to foo.ddns.net/nc or I teach myself to hack DNS so I can move it to nc.foo.ddns.net. Don't really care much myself which one it is other than that it's the easy way; the main point is to allow me to hang more services off that server. Just kind of my own self-education project that leaves me vulnerable to getting my server pwned.

(Thinking about setting up a Bitwarden instance, a blog, possibly getting a real domain and setting up an email server, that kind of thing.)
Ceterum autem censeo pars Republican esse delendam.
New I think you can't avoid fiddling with the Nginx config
If I understood the original request correctly, you only have on IP so all those subdomains will resolve to that same address. It will be up to Nginx to sort out which site instance belongs to which subdomain.
New The difference is how it's handled.
I've already got Nextcloud up and working at foo.ddns.net - using subdomains like "nc.foo.ddns.net" is easier (single line change, literally) than moving it to foo.ddns.net/nc, which requires picking apart the config file with a fine tooth comb as near as I can tell.

From the docs I have grokked so far, you can put each subdomain in its own config file, completely separate from the other files, and they won't conflict with each other.

Edited to add - one of the things I loathe about being self-taught through experimentation and just randomly stumbling on to things is that I don't always know the proper terminology, have no idea where to look for things, and have this fear deep down inside that I'm leaving my pants around my ankles.
Ceterum autem censeo pars Republican esse delendam.
Expand Edited by InThane Jan. 19, 2021, 12:46:39 AM EST
New Unless nginx is very different from Apache, should be the easy option
DNS gets then to your box, config on the box gets them to the subdomain. I don't figure you want to talk your relatives through editing their hosts files.
--

Drew
New May need a cert for each
Unless you have a *.foo.ddns.net wildcard cert in place, each subdomain would need its own cert.
New Oh, wasn't thinking about certs
--

Drew
New Already using letsencrypt.
Shouldn't be a problem.
Ceterum autem censeo pars Republican esse delendam.
New You don't really want to run your own DNS server.
That gets you tangled up in delegation, transfers and other things to do with the name service system. If you have an account to let you create sub-domains under someone else's domain name, that is far far easier.

Nginx lets you do virtual hosts so you can just point all your names at the same IP address and let the web server and web browser figure it out. Which they will.

Wade.
     I am about to ask a series of very stupid questions about how the internet works. - (InThane) - (9)
         dns just points to an ip address - (boxley) - (3)
             I'm lazy. - (InThane) - (2)
                 I think you can't avoid fiddling with the Nginx config - (scoenye) - (1)
                     The difference is how it's handled. - (InThane)
         Unless nginx is very different from Apache, should be the easy option - (drook)
         May need a cert for each - (scoenye) - (2)
             Oh, wasn't thinking about certs -NT - (drook)
             Already using letsencrypt. - (InThane)
         You don't really want to run your own DNS server. - (static)

I think that might be an LRPDism candidate...
104 ms