Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Latest commit

 

History

History
26 lines (18 loc) · 998 Bytes

File metadata and controls

26 lines (18 loc) · 998 Bytes

This project is no longer supported. See below for an alternative using Caddy.

Alternative

To create a proxy to an HTTP app for HTTPS for local development, use Caddy.

Setting Up Caddy

  1. Install Caddy according to the instructions on caddyserver.com
  2. Run sudo caddy trust to install a local certificate authority. This will allow Caddy to create a self-signed certificate.
  3. For your project, create a caddyfile as below, replacing the :80 with the port your server is running on (often :3000 or :8000)
{
  http_port 8090
}
https://localhost {
    tls internal

    reverse_proxy localhost:80
}
  1. To start the proxy, run caddy run in the directory where the caddyfile lives. You can also adjust hostnames by changing https://localhost at 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.