This is an old revision of the document!
Userhomes hosting
Name | Userhomes hosting |
---|---|
Ports | 8181 (tcp) |
View in NetBox. |
An nginx server configured to host users' www/
directory at <username>.tardis.ac
. This isn't exposed directly, but through Traefik - see here.
The sandbox VM exports users home directories as an NFS share, which is mounted by this VM. You can find the configuration here.
What if I want to use a custom domain?
This is totally possible by adding the domain and forwarding it manually to nginx. See the step-by-step below. Some steps require an admin, so please contact an admin if you would like this (we're friendly, I promise!).
Currently working examples of this include www.mathsoc.uk and www.emilymiller.xyz.
1. (Admin required) Add the domain to the users account. For instance, “example.com” and “www.example.com”
Note: subdomains like www. are not automatically included, so it's usually smartest to add them manually.
Further Note: wildcard domains aren't handled well by Caddy, so putting a wildcard domain will likely require extra configuration to make work. Roughly however, this should at least serve the site, albiet with a potentially broken SSL cert.
2. Go into the console (console.tardisproject.uk) and select “Manage Endpoints”.
3. Add a new proxy rule with the following settings. Note: You'll need to do this for each subdomain (which will usually be at least “example.com” and “www.example.com”).
What to proxy:
Domain: <whatever domain you want to add> (e.g. example.com)
Path prefix: /
Where to proxy to:
Target IP: 192.168.0.14 (This is the internal IP address of the nginx server)
Target Port: 8181 (This is the port nginx expecting traffic to come through on)
Does the target expect HTTPS? No (SSL termination is handled seperately by caddy)
Advanced
Strip path prefix before sending to app? No
Redirect HTTP to HTTPS? Yes
Override the Host header: <your username>.tardis.ac (e.g. jdoe.tardis.ac)