You are here

How To Configure Let's Encrypt For Drupal & Virtualmin

Let's Encrypt is taking over the world with its free SSL certificates, and I'm using it on ALL of my websites (including the one you're reading right now). But using it with Drupal & Virtualmin is not as easy as it should be, so today I'll show everyone how to make it work 100%. It took me a few hours of detective work to figure out the following two prerequisites that need to be taken care of before using Let's Encrypt:

#1. Apply a patch (, #53) to Drupal 7 core. You can skip this step for Drupal 8, because it's already been committed.

Now all domains in Virtualmin except the default one will work with Let's Encrypt. For the default website ("Server Configuration" -> "Website Options" -> "Default website for IP address") to also work, the following needs to be taken care of:

#2. In your server, find the ssl.conf file (in my Linode server's CentOS 7, it would be /etc/httpd/conf.d/ssl.conf), back up the file just in case and delete the following code in its entirety:

<VirtualHost _default_:443>

Delete everything here, including the top & bottom. ;)


And that's it. Just restart your server, and Let's Encrypt should now work flawlessly with Drupal & Virtualmin. Welcome to the world of free SSL certificates! :D

P.S. As for a general guide on how to use Let's Encrypt in Virtualmin, look forward to another blog post in the near future. ;)

You are here