Securing Emoncms with an SSL certificate

An information update to an earlier posting in the old forum on securing Emoncms using SSL certificates when using the latest Jessie Lite SD card image.

When attempting to secure Emoncms version 9.7 on the latest Jessie Lite SD card release using the method previously employed for the old Wheezy image, I encountered a problem related to the upgrade of Apache from v2.2 to 2.4.

The background to the method can be found in an article which references a posting by Paul Reed in the old OpenEnergyMonitor forum. In Paul’s posting he describes how to make changes to the file: /etc/apache2/sites-available/default-ssl to point to the 3 certificates required as well as some changes to the Directory / and /var/www/ lines. In the latest SD image the file default-ssl no longer exists being replaced with default-ssl.conf which no longer contains references to the Directory structure.

As a first attempt, I copied the old default-ssl file to the new area and completed Paul’s instructions. On the face of it, accessing Emoncms using https:// appeared to work. I could login the site and view my inputs. However, the Feeds page hung displaying the word loading… and no visualisations were visible.

After some searching I found that someone else had experienced an unrelated but similar issue when upgrading from Wheezy to Jessie. In essence, the new version of Apache appears to mandate the .conf file ending. Making the certificate changes but ignoring the Directory line changes, which are not present, to this file enabled SSL access to Emoncms as before. :relaxed:

I do not understand Apache well enough to offer any explanations but feel it useful to alert others to the fact that there are issues that require attention when upgrading to SSL on the new image.

Perhaps, others more knowledgable than me could comment on the problem

We used Lets Encrypt to secure, was a very easy process. Apparently Let’s Encrypt will also work on RaspberryPi