Hasty Briefsbeta

Bilingual

.localhost Domains

a year ago
  • #dnsmasq
  • #web-development
  • #localhost-configuration
  • Configure private, custom domains for local web-apps using 'appname.localhost' instead of 'localhost:port'.
  • Each app runs as a launchd daemon on a unique port.
  • Modify /etc/hosts to redirect custom domains to 127.0.0.1.
  • Use Caddy to route traffic from 127.0.0.1 to the correct port based on the domain.
  • Example Caddyfile configuration includes reverse_proxy, TLS, and compression settings.
  • Desire to simplify the process with a single command for adding/removing apps.
  • Update mentions a dnsmasq-based solution for further improvement.