How to get HTTPS working on localhost

Looks more complete than my own docu:

https://bogomolov.tech/localhost-https/