- Install caddy the easiest way to download the binary
- Have a domain/subdomain that points to 127.0.0.1/0.0.0.0/localhost etc.
To make a domain point to localhost we can use
- hosts file (in mac iHost can be used for this)
- dnsmasq
caddy reverse-proxy --from anysubdomain.lvh.me --to :3000 --internal-certs
First time will ask the pawssword to trust the cert.
After that go fake domain anysubdomain.lvh.me
and will be done!! Try also with several ones!!
If you want to use it as service you can use the Caddyfile with your normal service manager. But if you only download the binary you can do
caddy start --config Caddyfile
This step is only needed once. Unless you dont remove the trusted CA Cert you will not have to do it again anymore.
Trusting the CA Cert:
sudo bash -c "caddy start && caddy trust && caddy stop"
caddy reverse-proxy --from anysubdomain.lvh.me --to :3000 --internal-certs