This project is no longer supported. See below for an alternative using Caddy.
To create a proxy to an HTTP app for HTTPS for local development, use Caddy.
- Install Caddy according to the instructions on caddyserver.com
- Run
sudo caddy trustto install a local certificate authority. This will allow Caddy to create a self-signed certificate. - For your project, create a
caddyfileas below, replacing the:80with the port your server is running on (often:3000or:8000)
{
http_port 8090
}
https://localhost {
tls internal
reverse_proxy localhost:80
}- To start the proxy, run
caddy runin the directory where thecaddyfilelives. You can also adjust hostnames by changinghttps://localhostat the top to whatever hostname you'd like.
Caddy likes to run its own non-secured HTTP server at port 80. The http_port command above pushes that non-secured server to another port.