To install and configure Apache with Let's Encrypt certificates on CentOS 8, you can follow these steps:
sudo dnf install httpd
sudo systemctl enable --now httpd
sudo dnf install certbot
example.com
with your domain name:sudo certbot certonly --standalone -d example.com
After obtaining the certificate, you can configure Apache to use it by modifying the /etc/httpd/conf.d/ssl.conf
file. Locate the <VirtualHost>
element for the default HTTPS server, and set the SSLCertificateFile
and SSLCertificateKeyFile
directives to the paths of your certificate and private key files, respectively. These files are typically located in the /etc/letsencrypt/live/example.com
directory, where example.com
is your domain name.
Restart Apache for the changes to take effect:
sudo systemctl restart httpd
After completing these steps, Apache should be configured to use your Let's Encrypt certificate for HTTPS connections. You can verify this by accessing your website using HTTPS in a web browser.