Hi @brunoalvarenga01,
Thank you for using Bitnami. One simple way to achieve that is to edit the generate-certificate.sh file and substitute the following lines:
crontab $USER -l 2> /dev/null | { cat; echo "0 0 1 * * $SUDO /opt/bitnami/letsencrypt/lego --path=\"/opt/bitnami/letsencrypt\" --email=\"${email}\" --domains=\"${domain}\" renew && $SUDO /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf -k graceful"; } | crontab $USER - 2> /dev/null
with
crontab $USER -l 2> /dev/null | { cat; echo "0 0 1 * * $SUDO /opt/bitnami/letsencrypt/lego --path=\"/opt/bitnami/letsencrypt\" --email=\"${email}\" --domains=\"${domain}\" --domains=\"www.${domain}\" renew && $SUDO /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf -k graceful"; } | crontab $USER - 2> /dev/null
this one
crontab $USER -l 2> /dev/null | { cat; echo "0 0 1 * * $SUDO /opt/bitnami/letsencrypt/lego --path=\"/opt/bitnami/letsencrypt\" --email=\"${email}\" --domains=\"${domain}\" renew && $SUDO /opt/bitnami/nginx/sbin/nginx -s reload"; } | crontab $USER - 2> /dev/null
with
crontab $USER -l 2> /dev/null | { cat; echo "0 0 1 * * $SUDO /opt/bitnami/letsencrypt/lego --path=\"/opt/bitnami/letsencrypt\" --email=\"${email}\" --domains=\"${domain}\" --domains=\"www.${domain}\" renew && $SUDO /opt/bitnami/nginx/sbin/nginx -s reload"; } | crontab $USER - 2> /dev/null
and
/opt/bitnami/letsencrypt/lego --path "/opt/bitnami/letsencrypt" --email="${email}" --domains="${domain}" run
with
/opt/bitnami/letsencrypt/lego --path "/opt/bitnami/letsencrypt" --email="${email}" --domains="${domain}" --domains="www.${domain}" run
As you can see, I only included a new "domains" option in all the lego commands. You now need to run the generate-certificates.sh script using yourdomain.com and it will generate the certificates for yourdomain.com and www.yourdomain.com
Let us know if you have any questions.