Skip to content

rConfig - SSL Configuration

5 mins V7 Pro V6 Core

This guide provides SSL configuration instructions for supported operating systems, covering both Let’s Encrypt (free, automated certificates) and self-signed certificates for internal/development use.

Prerequisites

Before proceeding with SSL configuration, ensure:

  • Your domain is properly configured and pointing to your server
  • Apache is installed and running
  • Firewall allows HTTP (port 80) and HTTPS (port 443) traffic
  • For Let’s Encrypt: Domain must be publicly accessible for validation

SSL Configuration Options

Let’s Encrypt SSL - Rocky Linux/CentOS/RHEL

Step 1: Update the system

Terminal window
yum -y update

Step 2: Install mod_ssl

Terminal window
yum -y install mod_ssl

Step 3: Install certbot

Terminal window
# Enable EPEL repository
yum -y install epel-release
# Install yum-utils
yum -y install yum-utils
# Install certbot for Apache
yum -y install certbot python3-certbot-apache

Step 4: Obtain SSL certificate

Terminal window
certbot --apache

Certbot will ask you for the names you would like to activate HTTPS for:

Terminal window
Which names would you like to activate HTTPS for?
-------------------------------------------------------------------------------
1: yourdomainname.com
2: rconfig.yourdomainname.com
-------------------------------------------------------------------------------
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):

Press enter to continue and then choose to redirect HTTP traffic to HTTPS:

Terminal window
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
-------------------------------------------------------------------------------
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

Step 5: Configure automatic renewal

Terminal window
# Edit crontab
crontab -e
# Add this line for automatic renewal twice daily
0 */12 * * * /usr/bin/certbot renew --quiet

Step 6: Test renewal

Terminal window
certbot renew --dry-run

Basic Troubleshooting

Common Issues and Solutions

1. Apache fails to start after SSL configuration

Check Apache configuration syntax:

Terminal window
# Rocky/RHEL/CentOS
httpd -t
# Ubuntu
apache2ctl configtest

Check Apache error logs:

Terminal window
# Rocky/RHEL/CentOS
tail -f /var/log/httpd/error_log
# Ubuntu
tail -f /var/log/apache2/error.log

2. Certificate file permission errors

Ensure correct permissions:

Terminal window
# Check current permissions
ls -la /etc/ssl/private/
ls -la /etc/ssl/certs/
# Set correct permissions
chmod 600 /etc/ssl/private/rconfig.key
chmod 644 /etc/ssl/certs/rconfig.crt

3. Firewall blocking HTTPS connections

Allow HTTPS through firewall:

Terminal window
# Rocky/RHEL/CentOS
firewall-cmd --permanent --add-service=https
firewall-cmd --permanent --add-service=http
firewall-cmd --reload
# Ubuntu
ufw allow 80/tcp
ufw allow 443/tcp
ufw reload

4. Let’s Encrypt certificate generation fails

Check domain accessibility:

Terminal window
# Test if domain is accessible from outside
curl -I http://your-domain.com

Verify DNS resolution:

Terminal window
nslookup your-domain.com

Check certbot logs:

Terminal window
tail -f /var/log/letsencrypt/letsencrypt.log

5. SSL certificate warnings in browser

For self-signed certificates, browsers will show security warnings. This is normal and expected. Users need to accept the certificate to proceed.

For Let’s Encrypt certificates, ensure:

  • Domain name matches the certificate
  • Certificate is not expired
  • All certificate chain files are properly configured

6. HTTP to HTTPS redirect not working

Verify redirect configuration:

Terminal window
# Test redirect
curl -I http://your-domain.com

Check virtual host configuration:

Terminal window
# Rocky/RHEL/CentOS
httpd -S
# Ubuntu
apache2ctl -S

7. SSL renewal issues (Let’s Encrypt)

Test renewal manually:

Terminal window
certbot renew --dry-run

Check crontab:

Terminal window
crontab -l

Check systemd timer (Ubuntu):

Terminal window
systemctl status certbot.timer

Testing Your SSL Configuration

Verify HTTPS is working:

Terminal window
curl -I https://your-domain.com

Check SSL certificate details:

Terminal window
openssl s_client -connect your-domain.com:443 -servername your-domain.com

Test SSL configuration online:

Getting Help

If you continue to experience issues:

  1. Check the Apache error logs first
  2. Verify your domain DNS configuration
  3. Ensure firewall rules allow HTTP/HTTPS traffic
  4. Test certificate generation manually
  5. Consult the Apache SSL documentation for advanced configuration options