Renew Let’s Encrypt for Cloudflare-powered websites with Apache Ubuntu
- June 15, 2019 at 10:04 am #1583
Santhosh Kumar DMember
Let’s Encrypt SSL fails to renew automatically on Cloudflare-powered sites. Whether it is Apache or Nginx, both use an authentication method called TLS-SNI-01 which is incompatible with Cloudflare or any other CDN. It will not work for both initial issuance and renewals.
So, if you need to use this method, you will always have to disable the CDN temporarily for initial issuance and renewals. Please note that this method only works if you have installed a separate certificate for each of your domain.
On Cloudflare, temporarily pause Cloudflare by going to the Overview tab, and activating ‘Pause Cloudflare on Site’ under the ‘Advanced Actions’ section:
Then, open your Apache web server and renew SSL individually for each domain using the following command.
sudo certbot renew --cert-name example.com
Remember to replace example.com with your own domain name. Run the command separately for each of your domain names.
Once it has been successfully renewed, restart your Apache web server using the appropriate command.
sudo service apache2 restart
Alternatively, you can also use the command:
sudo restart apache2
Finally, check certificate renewal dates for your domain using the following command:
sudo certbot certificates
Let’s Encrypt’s automatic renewal system will not work for websites powered by Cloudflare or any other CDN. So, note down the next renewal date and set reminders to do your next renewal by yourself following the same method.
Now, you shall go back to Cloudflare and select ‘Pause Cloudflare on Site’ under the Overview tab.
You must be logged in to reply to this topic.
- Use Ctrl + Shift + T to undo a closed tab in your browser
- Instantly create Google Docs, Sheets, Slides, Sites or Forms from browser address bar
- How to access Google Maps offline on your phone
- Twitter collects your data – Here’s how you can control it
- How to watch YouTube videos while using other apps on Windows
- Save PowerPoint file in .pps format to open it directly in slideshow mode
- Rename an Office file to .zip and unzip it to get all the contents of the file
- View the history of commands in Linux terminal
- How to control the mouse cursor using the keyboard in Windows
- Essential tips to backup, save and protect your data
- Ragu on Turn your PowerPoint slide into a blackboard or a whiteboard2 weeks, 3 days ago
- Ken on Use f.lux to prevent eye strain from your PC screen by filtering out blue light2 months, 1 week ago
- Ken on Free up internal storage space on your Android device2 months, 2 weeks ago