Building a Local Certificate Authority to Serve Trusted HTTPS on Windows with WSL2

The author set up a personal Root Certificate Authority to understand how browsers decide whether an HTTPS connection is trusted. They used it to sign a certificate for a test site and ran a Python HTTPS server inside WSL2 on an Ubuntu 20.04 system. The write-up recommends using the .test domain instead of .local, since .local is reserved for multicast DNS and can cause conflicts. It explains how to map the hostname in the Windows hosts file and within WSL, noting that WSL can regenerate its hosts file on restart. Finally, it describes importing the root certificate into the Windows trust store so Chrome accepts it, while noting that WSL's Ubuntu still needs the certificate added to its own store.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in