How to Install Let's Encrypt SSL in Apache on AlmaLinux 9

To install Let's Encrypt SSL on Apache on AlmaLinux 9, follow these steps:

Step 1 : Before starting, ensure that your domain is properly configured with DNS records that point to your server. This will allow Let's Encrypt to verify your domain.

Step 2 : Update your system to make sure you have the latest security patches and packages.

Step 3 : Install Certbot and the Apache plugin for Certbot by running:

Step 4 : Restart Apache

Step 5 : Now, create the necessary directory for your domain:

Create a simple index.html to test the server:

Step 6 : Create a configuration file for your domain (replace example.devtutorial.io with your domain):

Add the following configuration (adjust paths as necessary):

Step 7 : Test your Apache configuration to make sure everything is set up correctly:

If everything is okay, you'll see Syntax OK. Restart Apache to apply the new configuration:

Step 8 : To obtain an SSL certificate from Let's Encrypt, run the following command:

- Enter your email address when prompted.

- Agree to the terms of service by typing y.

- Agree to share your email address with the Electronic Frontier Foundation (EFF) by typing y.

- You will receive a success message once the SSL certificate is installed.

Step 9 : Test the automatic renewal process by running:

Step 10 : Open your browser and go to https://example.devtutorial.io. You should see your site served with an HTTPS connection, and the padlock icon will indicate that the SSL certificate is active.

Congratulations! You have successfully installed Let's Encrypt SSL on Apache on AlmaLinux 9.