Adding SSL certificate to Drupal with Infomaniak

The provider Infomaniak give for free SSL certificate through "Let's Encrypt" organization. How should we configure Drupal 7 to make it work?

Migrate your site on the new admin interface of Infomaniak

Add an SSL certificate by Infomaniak is pretty straight forward. First, you have to make sure that your website use the new administration interface of Infomaniak. If not, you have to migrate your site on this new administration interface. A complete guideline is available on the Infomaniak's FAQ on https://www.infomaniak.ch/fr/support/faq/1983.

Secure pages module

Before to activate the SSL certificate on Infomaniak, you can first download and activate the "Secure pages" module (https://www.drupal.org/project/securepages). 

Configure this module. Be careful! Leave the module "unable" for now, but add the option "http://yourdomain.com" under "Non-secure Base URL" field and "https://yourdomain.com" under "Secure Base URL". Don't forget to add the protocols http and https Avoiding it (for example by adding only "yourdomain.com" without http://) might create bugs on your Drupal installation.

Configure SSL certificate by Infomaniak

When the site is correctly migrate on the new interface, the second step is to activate the SSL certificate on Infomaniak. Basically, you just need to activate it following step by step the "SSL Certificate" category. The installation is very easy and you need to choose the "Let's Encrypt" option. Detailed explanation are available on Infomaniak's FAQ https://www.infomaniak.ch/fr/support/faq/2027

Activate secure pages module

In the Secure page module, enable the module by clicking on the right radio button.

I can access to the admin page anymore

If that happen, certainly you made something wrong. All you have to do now is to unistall correctly the Secure Page module. The README.txt file in the module, explain it very well.

  • First, open your settings.php file. If it doesn't work, make sure to give it an 444 htaccess.
  • Add in it the following in your settings.php: $conf['securepages_enable'] = 0;
  • Disable the Secure Pages module or delete it if necessary

At this point, your admin should be accessible again. Make sure your configuration is all right and enable the Secure Pages moudule.