Posts Learn Snippets Categories Tags About
/
Installing SSL Certificate on Laravel Forge through clouflare and Enable Full Strict Mode cover

Installing SSL Certificate on Laravel Forge through clouflare and Enable Full Strict Mode

Learn how to setup SSL Certificate on Laravel Forge by generating TLS certificate signed by Cloudflare

6 months ago

8 mins read

23 views

In this tutorial, you'll be learning how to set up an SSL Certificate on Laravel Forge using the free TLS certificate signed by Cloudflare. The prerequisite is to have Cloudflare and Laravel Forge account so do register first to follow the tutorial.

Laravel Forge
In every site/project of Laravel Forge account, there will be an SSL section where you can access it by navigating through the left sidebar.
Laravel Forge SSL Page

On this page, select the "Install Existing Certificate" option and it will come up with 2 inputs which are the private key and certificate that are generated by Cloudflare.
Install Existing Certificate in Laravel Forge

Cloudflare
Once you have added the website into Cloudflare, head over to the "SSL/TLS" tab and access the page that generates the SSL Certificate from the "Origin Server" sub tab. On the page press Create Certificate and another modal will appear.
Cloudflare SSL/TLS page

Do select the 15 years validity and RSA for the private key type. Now press next and Cloudflare will generate the certificate and private key. Do copy it over to forge but do remember the order of the certificate, which comes first.

Once it's copied and pasted on Laravel Forge, do Install the Certificate and then do "activate" it so that the changes will apply. On the Cloudflare Overview page of the SSL/TLS page, you will be able to change the SSL type to Full (strict) which is the most recommended and ensure full protection.

image.png 62.31 KB

Thank you for giving it a read and happy learning