Domain Configuration¶
The project uses two domains, both served through the same nginx container on ports 80 and 443.
Domains¶
| Domain | Purpose | Upstream |
|---|---|---|
ictedgefund.com |
Main dashboard | host.docker.internal:8000 (Node.js on host) |
docs.ictedgefund.com |
This wiki | docs container (MkDocs via Docker) |
DNS Records¶
Both domains require A records pointing to the server's public IP address:
| Type | Name | Value |
|---|---|---|
| A | ictedgefund.com |
<server IP> |
| A | docs.ictedgefund.com |
<server IP> |
Both records must point to the same IP since a single nginx instance handles all traffic.
Traffic Flow¶
Client
|
v
nginx (port 80/443)
|
|-- Host: ictedgefund.com --> proxy_pass to host.docker.internal:8000
|-- Host: docs.ictedgefund.com --> proxy_pass to docs container
Nginx uses the server_name directive to match the incoming Host header and route the request to the correct upstream. Both server blocks share the same TLS certificate (issued for both names via certbot).
Adding a New Subdomain¶
To add another subdomain:
- Create a DNS A record pointing to the server IP
- Add a new
serverblock innginx/nginx.confwith the appropriateserver_nameandproxy_pass - Re-issue the TLS certificate to include the new name (see Certbot)
- Reload nginx:
docker compose exec nginx nginx -s reload