The method comes form a video of Walfgang’s Channel. This post is just a note of that video for experienced people.
The key point is that you can create a DNS record that points to your local IP address.
Prerequisite: a domain name, a reverse proxy (I’m using Nginx Proxy Manager here), a SSL certificate of the domain that you’ll be using.
Step 1: create a A DNS record that points to the local IP address of your server, e.g. server.tgc54.com -> 192.168.1.23
.
Step 2: in your reverse proxy, proxy the domain to your local service and you can use your SSL certificate.
It’s just this easy!