I use Certbot to manage SSL certificates on this website running on Apache2, and I wanted to create a new secured subdomain.
It’s as simple as:
Don’t forget to add every initial domain. Also, the --expand option is important:
If you want to redirect all HTTP connections to the HTTPS version, duplicate your 443 vhost to a non-secured 80 vhost and add a rewrite rule. For instance: