Skip to content

SSL Configuration

SSL/TLS encryption is essential for securing rConfig V8 communications, protecting sensitive network device credentials, and ensuring data integrity. This guide covers both Let’s Encrypt (automated, trusted certificates) and self-signed certificates (internal/development environments) across supported operating systems.

Before configuring SSL, verify:

  • Domain configuration: Domain properly configured and resolving to your server
  • Apache installed: Apache web server installed and running
  • Firewall rules: Ports 80 (HTTP) and 443 (HTTPS) open
  • Root access: Sudo or root privileges on the server
  • For Let’s Encrypt: Domain must be publicly accessible for certificate validation

Best for: Production environments with public-facing domains

Advantages:

  • Free, automated certificate management
  • Trusted by all major browsers
  • 90-day validity with automated renewal
  • Industry-standard security

Requirements:

  • Publicly accessible domain
  • Valid DNS records
  • Port 80 accessible for validation

Best for: Internal networks, development, testing environments

Advantages:

  • No external dependencies
  • Works in air-gapped environments
  • Complete control over certificate properties
  • No expiration concerns for long-term internal use

Limitations:

  • Browser security warnings (certificate not trusted)
  • Not suitable for public-facing production environments
  • Users must manually accept certificate

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

Section titled “Let’s Encrypt SSL - Rocky Linux/CentOS/RHEL”

Step 1: Update system packages

Terminal window
yum -y update

Step 2: Install mod_ssl

Terminal window
yum -y install mod_ssl

Step 3: Install certbot and dependencies

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

Step 4: Obtain SSL certificate

Stop Apache temporarily to allow certbot to bind to port 80:

Terminal window
systemctl stop httpd

Run certbot:

Terminal window
certbot --apache

Follow the interactive prompts:

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 select all domains, then choose redirect option:

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: Verify Apache configuration

Certbot automatically updates your Apache configuration. Verify the changes:

Terminal window
# Check configuration syntax
httpd -t
# View SSL virtual host configuration
cat /etc/httpd/conf/httpd-le-ssl.conf

Step 6: Configure automatic renewal

Create a renewal cron job:

Terminal window
crontab -e

Add this line to renew certificates twice daily:

Terminal window
0 */12 * * * /usr/bin/certbot renew --quiet --post-hook "systemctl reload httpd"

Step 7: Test renewal process

Terminal window
certbot renew --dry-run

Expected output should indicate successful simulation:

Congratulations, all simulated renewals succeeded

Step 8: Start Apache

Terminal window
systemctl start httpd
systemctl enable httpd

Step 9: Verify HTTPS access

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

Step 1: Edit environment configuration

Terminal window
vim /var/www/html/rconfig8/current/.env

Step 2: Add or modify the following variable

Terminal window
APP_FORCE_HTTPS=true

Step 3: Configure trusted proxy headers (if needed)

If your reverse proxy uses non-standard headers, also configure:

Terminal window
# Add these lines to .env
TRUSTED_PROXIES=*
# Or specify specific proxy IP addresses:
# TRUSTED_PROXIES=10.0.0.1,10.0.0.2

Step 4: Save and exit

Press Esc, then type :wq and hit Enter.

Step 5: Clear application cache

Terminal window
php /var/www/html/rconfig8/current/artisan config:clear
php /var/www/html/rconfig8/current/artisan cache:clear
php /var/www/html/rconfig8/current/artisan route:clear
php /var/www/html/rconfig8/current/artisan view:clear

Step 6: Verify configuration

Terminal window
# Check if HTTPS is enforced
curl -I http://your-domain.com

You should see a redirect to HTTPS or the application responding with HTTPS-aware headers.

Test HTTPS response:

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

Expected headers should include:

HTTP/2 200
strict-transport-security: max-age=63072000; includeSubDomains; preload
x-frame-options: DENY
x-content-type-options: nosniff

Test HTTP to HTTPS redirect:

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

Expected response:

HTTP/1.1 301 Moved Permanently
Location: https://your-domain.com/

Check certificate details:

Terminal window
openssl s_client -connect your-domain.com:443 -servername your-domain.com | openssl x509 -noout -text

Verify certificate expiration:

Terminal window
echo | openssl s_client -servername your-domain.com -connect your-domain.com:443 2>/dev/null | openssl x509 -noout -dates

Online SSL testing tools:

Symptoms:

  • Apache service fails to start after SSL configuration
  • Error messages in system logs

Diagnosis:

Check Apache configuration syntax:

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

Check Apache error logs:

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

Common Causes:

  1. Syntax errors in virtual host configuration
  2. Missing or incorrect SSL certificate paths
  3. SSL module not loaded
  4. Port 443 already in use by another process

Resolution:

For syntax errors, review the error message and correct the configuration file:

Terminal window
# Rocky/RHEL/CentOS
vim /etc/httpd/conf.d/rconfig-ssl.conf
# Ubuntu
vim /etc/apache2/sites-available/rconfig-ssl.conf

For missing SSL module:

Terminal window
# Rocky/RHEL/CentOS
yum install -y mod_ssl
# Ubuntu
a2enmod ssl

Check if port 443 is in use:

Terminal window
netstat -tlnp | grep :443
# or
ss -tlnp | grep :443

Symptoms:

  • Apache logs show “Permission denied” for certificate files
  • SSL handshake failures

Diagnosis:

Check current permissions:

Terminal window
ls -la /etc/ssl/private/rconfig.key
ls -la /etc/ssl/certs/rconfig.crt

Resolution:

Set correct permissions and ownership:

Terminal window
chmod 600 /etc/ssl/private/rconfig.key
chmod 644 /etc/ssl/certs/rconfig.crt
chown root:root /etc/ssl/private/rconfig.key
chown root:root /etc/ssl/certs/rconfig.crt

Restart Apache:

Terminal window
# Rocky/RHEL/CentOS
systemctl restart httpd
# Ubuntu
systemctl restart apache2

Symptoms:

  • HTTP requests are not redirected to HTTPS
  • Users can access site via HTTP

Diagnosis:

Test redirect manually:

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

Check virtual host configuration:

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

Resolution:

Verify HTTP virtual host has redirect directive:

<VirtualHost *:80>
ServerName your-domain.com
Redirect permanent / https://your-domain.com/
</VirtualHost>

If using .htaccess, ensure mod_rewrite is enabled:

Terminal window
# Ubuntu
a2enmod rewrite
systemctl restart apache2

Use strong TLS protocols: Disable outdated protocols (SSLv3, TLSv1.0, TLSv1.1) and use only TLS 1.2 and TLS 1.3.

Implement security headers: Configure HTTP security headers (HSTS, X-Frame-Options, CSP) to protect against common attacks.

Regular certificate renewal: Monitor certificate expiration dates. Let’s Encrypt certificates expire every 90 days—automated renewal is essential.

Protect private keys: Set restrictive permissions (600) on private key files. Never commit private keys to version control or share them.

Use strong key lengths: Generate RSA keys with at least 2048 bits. Consider 4096 bits for long-term certificates.

Enable HTTP/2: Modern browsers support HTTP/2 over TLS, significantly improving page load times for rConfig.

Configure session caching: Use SSL session tickets or session caching to reduce handshake overhead for returning clients.

Optimize cipher suites: Order cipher suites to prefer ECDHE for forward secrecy while maintaining compatibility.

Monitor certificate expiration: Set up alerts 30 days before certificate expiration. Test renewal processes regularly.

Review logs periodically: Check Apache SSL error logs for handshake failures or certificate issues.

Document custom configurations: Maintain documentation for any customizations to SSL configuration for future reference.

Test after updates: Verify SSL functionality after system updates or Apache configuration changes.

Standardize certificate locations: Use consistent paths across all servers (/etc/ssl/private/, /etc/ssl/certs/).

Name certificates clearly: Use descriptive names like rconfig-prod.crt or rconfig-dev.crt to identify purpose.

Backup certificates: Include SSL certificates and private keys in backup procedures. Store securely offline.

OS TypePrivate KeyCertificateApache Config
Rocky/RHEL/CentOS/etc/ssl/private/rconfig.key/etc/ssl/certs/rconfig.crt/etc/httpd/conf.d/
Ubuntu/etc/ssl/private/rconfig.key/etc/ssl/certs/rconfig.crt/etc/apache2/sites-available/
Terminal window
# Check Apache syntax
httpd -t
# View virtual hosts
httpd -S
# Restart Apache
systemctl restart httpd
# View error logs
tail -f /var/log/httpd/error_log
# Check certificate expiration
openssl x509 -in /etc/ssl/certs/rconfig.crt -noout -dates
# Test SSL connection
openssl s_client -connect your-domain.com:443
# Renew Let's Encrypt certificate
certbot renew --force-renewal
# Test certificate renewal
certbot renew --dry-run

Use this checklist to verify your SSL implementation:

Pre-Installation:

Let’s Encrypt Installation:

Self-Signed Installation:

Post-Installation Verification:

For Reverse Proxy:

Security Verification:

Certificate TypeValidity PeriodRenewal FrequencyAutomation
Let’s Encrypt90 daysEvery 60 daysAutomatic via cron/systemd
Self-SignedUser-defined (typically 365 days)Before expirationManual
Commercial CA1-2 years30 days before expirationManual or vendor-specific
Terminal window
# Add HTTP and HTTPS services
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload
# Verify rules
firewall-cmd --list-services
# Add specific ports (alternative)
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --reload

SSL/TLS encryption is essential for securing rConfig V8 deployments, protecting sensitive network device credentials and configuration data during transmission. This guide covered both Let’s Encrypt certificates for production environments requiring trusted certificates and self-signed certificates for internal or development use.

Key takeaways:

  • Let’s Encrypt provides free, automated, and trusted certificates ideal for production environments with public-facing domains
  • Self-signed certificates are suitable for internal networks and development but generate browser warnings
  • Automatic renewal is critical for Let’s Encrypt certificates, which expire every 90 days
  • Security headers enhance protection against common web vulnerabilities and should always be configured
  • Reverse proxy environments require additional configuration via the APP_FORCE_HTTPS environment variable
  • Regular testing of SSL configuration and renewal processes prevents unexpected certificate expiration

Proper SSL implementation ensures that rConfig V8 features requiring HTTPS, such as clipboard operations and API integrations, function correctly while maintaining the security posture required for managing critical network infrastructure.

For environments requiring advanced SSL configuration, enterprise support, or assistance with complex scenarios, consult the Apache SSL documentation or contact rConfig support.