Install the certbot:
apt install certbot python3-certbot-apache
Set the following in your vhost conf file:
ServerName mydomain.com
ServerAlias www.mydomain.com
Verify that your configuration is fine:
sudo apache2ctl configtest
sudo systemctl reload apache2
Make sure the dns entry in the external dns server points to your proxy server/web-server. Then launch the certification process:
sudo certbot --apache
sudo systemctl status certbot.timer
sudo certbot renew --dry-run
Note: nots ure about the last commands. Needs to be retested.