
Installing and Configuring SSL on AlmaLinux 8
İçindekiler
Introduction
To ensure secure communication over the internet, SSL (Secure Sockets Layer), now more accurately referred to as TLS (Transport Layer Security), is a must-have for any web server. In this article, we'll walk you through how to install and configure a free Let's Encrypt SSL certificate on AlmaLinux 8, using popular web servers such as Apache and Nginx.
1. Prerequisites
-
A running server with AlmaLinux 8
-
A valid domain name (e.g.,
example.com
) -
The domain must point to your server's IP address
-
Root or sudo access
2. Install Certbot (Let's Encrypt Client)
Step 1: Install EPEL and Certbot packages
For Nginx users, install this instead:
3. SSL Setup for Apache
Step 1: Make sure Apache is installed and running
Step 2: Obtain the SSL certificate
Certbot will ask for your domain and email, then automatically configure Apache for HTTPS.
Step 3: Automate SSL renewal
4. SSL Setup for Nginx
Step 1: Make sure Nginx is installed
Step 2: Obtain the SSL certificate
Certbot will detect your Nginx configuration and apply the necessary changes.
5. Manual SSL Configuration (Optional)
Let's Encrypt certificates are typically stored here:
-
Certificate:
/etc/letsencrypt/live/example.com/fullchain.pem
-
Private key:
/etc/letsencrypt/live/example.com/privkey.pem
Apache Manual Configuration
Edit /etc/httpd/conf.d/ssl.conf
or your custom virtual host file:
Nginx Manual Configuration
6. Redirect HTTP to HTTPS
Apache
Nginx
7. Check SSL Certificate Status
This shows active certificates and their expiration dates.
Conclusion
Setting up SSL on AlmaLinux 8 is straightforward, especially with Let's Encrypt and Certbot. With these steps, you can secure your website with HTTPS and protect your users’ data.
Yorumlar