In this tutorial, We will set up an SSL certificate on kahanelawgroup.com using Let’s Encrypt and acme.sh, covering installation, troubleshooting, CABUNDLE issues, and server configuration for Apache and Nginx.
Step 1: Install acme.sh (if not installed)
If you haven’t already installed acme.sh, do so with the following commands:
Once installed, reload your shell environment to use acme.sh:
Alternatively, restart your session:
Step 2: Issue an SSL Certificate Using acme.sh
To issue an SSL certificate for your domain (e.g., kahanelawgroup.com), run:
-
If you are using a web server like Apache or Nginx, use the Webroot method instead:
Common Issue: If the domain validation fails, make sure:
- Your domain is pointing to the correct server.
- Port 80 (HTTP) is open for standalone mode.
You can check if port 80 is open by running:
If another process is using port 80, temporarily stop it, run the SSL command, and restart the service:
Then, run the acme.sh –issue command again.
Step 3: Install the SSL Certificate
Once the SSL certificate is issued successfully, install it:
This command ensures the certificate is correctly placed on your system.
Step 4: Locate Your Certificate Files
After installation, check where the certificates are stored:
You should see:
- kahanelawgroup.com.cer → Your domain certificate
- kahanelawgroup.com.key → Private key
- fullchain.cer → Full chain certificate
- ca.cer → Certificate Authority Bundle (CABUNDLE)
Step 5: Fix CABUNDLE Issues
The CABUNDLE is often required by servers and applications to complete the SSL chain.
To verify your CABUNDLE file, run:
If it contains multiple BEGIN CERTIFICATE and END CERTIFICATE blocks, it’s correct.
Step 6: Configure SSL on Your Web Server
For Apache
Edit your Apache SSL configuration file (usually located at /etc/apache2/sites-available/default-ssl.conf):
Then, restart Apache:
For Nginx
For Nginx, concatenate the full chain and CABUNDLE:
Then, edit your Nginx configuration file (e.g., /etc/nginx/sites-available/default):
Restart Nginx:
Step 7: Verify Your SSL Installation
Check if your SSL certificate is installed correctly:
You can also verify using an online tool:
🔗 SSL Labs SSL Test
Step 8: Enable Auto-Renewal for SSL Certificate
To ensure your SSL certificate renews automatically, set up a cron job:
Add this line at the bottom:
This runs the renewal check daily at 3 AM.
Conclusion
You’ve now successfully installed an SSL certificate using Let’s Encrypt with acme.sh, resolved CABUNDLE issues, and configured it for Apache/Nginx.
✅ Key Fixes Included:
- Ensuring port 80 is open for domain validation
- Finding and using the CABUNDLE correctly
- Restarting web servers after installation
- Setting up automatic SSL renewal
🚀 Your site should now be secured with HTTPS. 🎉