You want an HTTPS server bound to localhost running in front of a HTTP server. This is pretty much needed if you're working on things that work only in HTTPS, such as HTTPS-only cookies and front end apps dealing with mixed content.
We can do this with Stunnel.
First create a self-signed certificate or acquire one from Let's Encrypt.