Apache with Let’s Encrypt Certificates on CentOS 8/9

To set up Apache with Let’s Encrypt Certificates on CentOS 8/9, you can follow these steps:

  1. Install the certbot-apache package using the command: sudo dnf install certbot-apache
  2. Run the command to obtain the SSL certificate: sudo certbot --authenticator apache -installer apache
  3. Follow the prompts to enter your email address and agree to the terms of service.
  4. Select the correct webroot path for your Apache installation.
  5. Once the SSL certificate is obtained, the certbot will automatically configure the Apache virtual host files to use the new certificate.
  6. Verify the SSL certificate is in place by running the command: sudo certbot certificates
  7. The SSL certificate will be automatically renewed by certbot, but you can also run the command manually: sudo certbot renew --dry-run
  8. Restart Apache for the changes to take effect: sudo systemctl restart httpd

Note: Make sure you have the mod_ssl module enabled in Apache, before configuring with Let’s Encrypt.

(fujifilm-x)

Leave a Comment