rConfig - SSL Configuration
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
yum -y update
Step 2: Install mod_ssl
yum -y install mod_ssl
Step 3: Install certbot
# Enable EPEL repositoryyum -y install epel-release
# Install yum-utilsyum -y install yum-utils
# Install certbot for Apacheyum -y install certbot python3-certbot-apache
Step 4: Obtain SSL certificate
certbot --apache
Certbot will ask you for the names you would like to activate HTTPS for:
Which names would you like to activate HTTPS for?-------------------------------------------------------------------------------1: yourdomainname.com2: rconfig.yourdomainname.com-------------------------------------------------------------------------------Select the appropriate numbers separated by commas and/or spaces, or leave inputblank to select all options shown (Enter 'c' to cancel):
Press enter to continue and then choose to redirect HTTP traffic to HTTPS:
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 fornew sites, or if you're confident your site works on HTTPS. You can undo thischange 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
# Edit crontabcrontab -e
# Add this line for automatic renewal twice daily0 */12 * * * /usr/bin/certbot renew --quiet
Step 6: Test renewal
certbot renew --dry-run
Let’s Encrypt SSL - Ubuntu

Step 1: Update the system
apt update && apt upgrade -y
Step 2: Install certbot
apt install -y certbot python3-certbot-apache
Step 3: Obtain SSL certificate
certbot --apache
Certbot will ask you for the names you would like to activate HTTPS for:
Which names would you like to activate HTTPS for?-------------------------------------------------------------------------------1: yourdomainname.com2: rconfig.yourdomainname.com-------------------------------------------------------------------------------Select the appropriate numbers separated by commas and/or spaces, or leave inputblank to select all options shown (Enter 'c' to cancel):
Press enter to continue and then choose to redirect HTTP traffic to HTTPS:
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 fornew sites, or if you're confident your site works on HTTPS. You can undo thischange by editing your web server's configuration.-------------------------------------------------------------------------------Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Step 4: Configure automatic renewal
# Test automatic renewalcertbot renew --dry-run
# Verify systemd timer is active (Ubuntu handles this automatically)systemctl status certbot.timersystemctl enable certbot.timer
Step 5: If systemd timer is not available, use crontab
crontab -e# Add: 0 */12 * * * /usr/bin/certbot renew --quiet
Self-Signed SSL - Rocky Linux/CentOS/RHEL

Step 1: Install required packages
yum -y install mod_ssl openssl
Step 2: Create SSL directories
mkdir -p /etc/ssl/privatemkdir -p /etc/ssl/certs
Step 3: Generate private key and certificate
# Generate private keyopenssl genrsa -out /etc/ssl/private/rconfig.key 2048
# Generate certificate signing requestopenssl req -new -key /etc/ssl/private/rconfig.key -out /etc/ssl/certs/rconfig.csr
# Generate self-signed certificate (valid for 365 days)openssl x509 -req -days 365 -in /etc/ssl/certs/rconfig.csr -signkey /etc/ssl/private/rconfig.key -out /etc/ssl/certs/rconfig.crt
Step 4: Set proper permissions
chmod 600 /etc/ssl/private/rconfig.keychmod 644 /etc/ssl/certs/rconfig.crt
Step 5: Create SSL configuration
# Create SSL configuration filevim /etc/httpd/conf.d/rconfig-ssl.conf
Add the following configuration:
# HTTPS Virtual Host<VirtualHost *:443> ServerName your-domain.com DocumentRoot /var/www/html/rconfig7/current/public
SSLEngine on SSLCertificateFile /etc/ssl/certs/rconfig.crt SSLCertificateKeyFile /etc/ssl/private/rconfig.key
# Security headers Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" Header always set X-Frame-Options DENY Header always set X-Content-Type-Options nosniff
# Laravel specific configuration <Directory /var/www/html/rconfig7/current/public> AllowOverride All Require all granted </Directory></VirtualHost>
# HTTP to HTTPS redirect<VirtualHost *:80> ServerName your-domain.com Redirect permanent / https://your-domain.com/</VirtualHost>
Step 6: Restart Apache
systemctl restart httpdsystemctl enable httpd
Self-Signed SSL - Ubuntu

Step 1: Install required packages and enable modules
apt updateapt install -y apache2 openssla2enmod ssla2enmod headers
Step 2: Create SSL directories
mkdir -p /etc/ssl/privatemkdir -p /etc/ssl/certs
Step 3: Generate private key and certificate
# Generate private keyopenssl genrsa -out /etc/ssl/private/rconfig.key 2048
# Generate certificate signing requestopenssl req -new -key /etc/ssl/private/rconfig.key -out /etc/ssl/certs/rconfig.csr
# Generate self-signed certificate (valid for 365 days)openssl x509 -req -days 365 -in /etc/ssl/certs/rconfig.csr -signkey /etc/ssl/private/rconfig.key -out /etc/ssl/certs/rconfig.crt
Step 4: Set proper permissions
chmod 600 /etc/ssl/private/rconfig.keychmod 644 /etc/ssl/certs/rconfig.crt
Step 5: Create SSL site configuration
# Create SSL site configurationvim /etc/apache2/sites-available/rconfig-ssl.conf
Add the following configuration:
# HTTPS Virtual Host<VirtualHost *:443> ServerName your-domain.com DocumentRoot /var/www/html/rconfig7/current/public
SSLEngine on SSLCertificateFile /etc/ssl/certs/rconfig.crt SSLCertificateKeyFile /etc/ssl/private/rconfig.key
# Security headers Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" Header always set X-Frame-Options DENY Header always set X-Content-Type-Options nosniff
# Laravel specific configuration <Directory /var/www/html/rconfig7/current/public> AllowOverride All Require all granted </Directory></VirtualHost>
# HTTP to HTTPS redirect<VirtualHost *:80> ServerName your-domain.com Redirect permanent / https://your-domain.com/</VirtualHost>
Step 6: Enable site and restart Apache
a2ensite rconfig-ssl.confa2dissite 000-default.confsystemctl restart apache2systemctl enable apache2
Basic Troubleshooting
Common Issues and Solutions
1. Apache fails to start after SSL configuration
Check Apache configuration syntax:
# Rocky/RHEL/CentOShttpd -t
# Ubuntuapache2ctl configtest
Check Apache error logs:
# Rocky/RHEL/CentOStail -f /var/log/httpd/error_log
# Ubuntutail -f /var/log/apache2/error.log
2. Certificate file permission errors
Ensure correct permissions:
# Check current permissionsls -la /etc/ssl/private/ls -la /etc/ssl/certs/
# Set correct permissionschmod 600 /etc/ssl/private/rconfig.keychmod 644 /etc/ssl/certs/rconfig.crt
3. Firewall blocking HTTPS connections
Allow HTTPS through firewall:
# Rocky/RHEL/CentOSfirewall-cmd --permanent --add-service=httpsfirewall-cmd --permanent --add-service=httpfirewall-cmd --reload
# Ubuntuufw allow 80/tcpufw allow 443/tcpufw reload
4. Let’s Encrypt certificate generation fails
Check domain accessibility:
# Test if domain is accessible from outsidecurl -I http://your-domain.com
Verify DNS resolution:
nslookup your-domain.com
Check certbot logs:
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:
# Test redirectcurl -I http://your-domain.com
Check virtual host configuration:
# Rocky/RHEL/CentOShttpd -S
# Ubuntuapache2ctl -S
7. SSL renewal issues (Let’s Encrypt)
Test renewal manually:
certbot renew --dry-run
Check crontab:
crontab -l
Check systemd timer (Ubuntu):
systemctl status certbot.timer
Testing Your SSL Configuration
Verify HTTPS is working:
curl -I https://your-domain.com
Check SSL certificate details:
openssl s_client -connect your-domain.com:443 -servername your-domain.com
Test SSL configuration online:
Getting Help
If you continue to experience issues:
- Check the Apache error logs first
- Verify your domain DNS configuration
- Ensure firewall rules allow HTTP/HTTPS traffic
- Test certificate generation manually
- Consult the Apache SSL documentation for advanced configuration options