How to secure Apache with Let's Encrypt Certificates on RHEL 8/9

How to secure Apache with Let's Encrypt Certificates on RHEL 8/9

To secure an Apache web server with Let's Encrypt certificates on RHEL 8/9, you can follow these steps:

  1. Install the certbot tool. You can install the certbot tool by running the following command:
r‮refe‬ to:lautturi.com
dnf install certbot

This will install the certbot tool and its dependencies.

  1. Stop the Apache web server. You can stop the Apache web server by running the following command:
systemctl stop httpd
  1. Run the certbot tool to obtain a certificate. You can run the certbot tool to obtain a certificate by running the following command:
certbot certonly --standalone -d example.com -d www.example.com

Replace example.com and www.example.com with the domain names you want to secure. This will obtain a certificate for the specified domain names.

  1. Configure Apache to use the certificate. To configure Apache to use the certificate, you will need to modify the Apache configuration file. You can find the Apache configuration file at /etc/httpd/conf/httpd.conf.

Add the following lines to the configuration file to configure Apache to use the certificate:

SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem

Replace example.com with your domain.

Created Time:2017-10-29 22:08:37  Author:lautturi