Hostnames & Routing
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Every project is reached by hostname, not by port. This page explains how those hostnames come to be and how to manage them.
How a hostname is formed
Section titled “How a hostname is formed”By default a project’s hostname is <name>.<base-domain> — for example, project
aurora with base domain coding9.test is served at
https://aurora.coding9.test.
The routing chain is:
dnsmasqanswers*.<base-domain>with127.0.0.1.- The macOS resolver at
/etc/resolver/<base-domain>forwards the domain todnsmasq. - Traefik (owning ports 80/443) matches the
Host()rule in the project’s override and forwards to the right container. - The mkcert wildcard certificate makes the connection trusted.
Manage hostnames with host
Section titled “Manage hostnames with host”A project can serve several hostnames. Manage them with mdocker host:
mdocker host ls aurora # list current hostnamesmdocker host add aurora admin.aurora.coding9.testmdocker host rm aurora admin.aurora.coding9.testAdding or removing a hostname updates the registry and re-renders the override. It
may also regenerate the certificate (to add a new SAN) and restart the router
container so Traefik picks up the change. Pass --no-apply to change the registry
without re-rendering immediately.
Wildcard hostnames
Section titled “Wildcard hostnames”Wildcard hostnames like *.acme.coding9.test are supported. They are rendered as a
Traefik HostRegexp rule that matches exactly one label, and each wildcard must be
added to the certificate as its own SAN. Wildcards are matched for routing but a
concrete host is used wherever a real URL is needed (for example APP_URL).
Open hostnames in the browser
Section titled “Open hostnames in the browser”mdocker open aurora # first hostnamemdocker open aurora admin.aurora.coding9.test # a specific hostnamemdocker open aurora --all # every hostname of the projectRelated
Section titled “Related”- CLI:
open&host - Multiple Base Domains
- Concept: The Edge Stack
Cookie-Einstellungen
Statistik-Werkzeuge setzen wir nur ein, wenn du zustimmst. Die notwendige Speicherung hält die Seite funktionsfähig; alles andere bleibt aus, bis du entscheidest.
Speichert deine Entscheidung aus diesem Dialog in deinem Browser (localStorage). Kein Cookie, keine Weitergabe an Dritte.
Google Analytics 4 über den Google Tag Manager, um die Nutzung der Seite zu messen. Wird erst nach deiner Einwilligung geladen.