Then create the virtual file for your domain

Test apache configurations if they are ok

If ok restart apache

If not check the error and correct it

Now lets generate the certificate using the carbot we just installed from the beginning of this tutorial

This runs certbot with the --apache plugin, using -d to specify the names you’d like the certificate to be valid for.

If this is your first time running certbot, you will be prompted to enter an email address and agree to the terms of service. After doing so, certbot will communicate with the Let’s Encrypt server, then run a challenge to verify that you control the domain you’re requesting a certificate for.

If that’s successful, certbot will ask how you’d like to configure your HTTPS settings:

After finishing successfully, you need nothing to do extra but just to access your site on https to test if the configurations were done ok

you can use the below command to renew the certificate and if possible add it to cron so it checks and runs for automatic renewals

Try a dry renewal to see if renewals is done successfully on the sport before certificate expires

 

Hope you enjoy the tutorial