Obtain an SSL certificate and run your forum with HTTPS for free
-
Hi everybody, I've been trying to get a certificate for my server for a while. Now that I found solution I would like to share it, hoping everybody will start to use HTTPS to serve their forums.
Before we start
I will assume that you have a Unix system (which is necessary, I will be using Debian), your web server configured, as well as SSH access, and of course flarum installed. I will also assume that you are using Apache, if not you can find detailed guides on the links on the bottom.Part1: Get the client
Let's start getting the letsencrypt client: rungit clone https://github.com/letsencrypt/letsencrypt && cd letsencrypt
Now we are going to install and update the client and its dependencies:sudo ./letsencrypt-auto --help
Part2: Get and install the certificate
Before the next step ensure that the 443(TLS) port is open
After that we are going to actually install the certificatesudo ./letsencrypt-auto --apache -d your.domain.com
This will automagically request the certificate and install it in your apache configuration.
Now restart apache:sudo service apache2 restart
Part3: Configure flarum
The certificate should now be up and running, to ensure that just accessyour domain at https://your.domain.comNow we need to make sure that flarum is pointing to https. In you flarum home directory, open config.php and edit the line
'url' => 'http://your.domain.com'
to
'url' => 'https://your.domain.com'