Or just use caddy as a reverse proxy [0]. This 1 line will do it all for you:

    myawesomedomain.com {
         respond "You just loaded this on https"
    }
[0] https://caddyserver.com

I only recently got into Caddy after using Apache and later Nginx for decades, and it's almost disappointing how little configuration it needs. It's very refreshing that we finally have a web server that needs hardly any fiddling with b/c it has nicely sane and comprehensive defaults.

Once you go Caddy, you never go back to Nginx and Apache.

+1 to Caddy - Another happy user that stopped caring about managing SSL certs 3 years ago.