Install certbot using following command
pkg install security/py-certbot
pkg install security/py-certbot-apache
Enabling SSL/TLS module in Apache configuration file
In apache config file at location /usr/local/etc/apache24/httpd.conf
make sure that mod_ssl.so is enabled
eg.
LoadModule ssl_module libexec/apache24/mod_ssl.so
To Obtain the Lets Encrypt Certificate
certbot certonly --webroot -w /path/to/your/webroot/ -d example.com -d www.example.com
Check following lines and add if not there in apache server config files
SSLEngine on
SSLCertificateFile "/usr/local/etc/letsencrypt/live/://yourdomain.com"
SSLCertificateKeyFile "/usr/local/etc/letsencrypt/live/://yourdomain.com"
SSLCertificateChainFile "/usr/local/etc/letsencrypt/live/://yourdomain.com"
Restart Apache using following command
service apache24 restart