How to install CloudFlare’s Free SSL on Laravel

… when you’re too stingy to use a full paid for SSL ;) or during development of course …

Following instructions doesn’t quite work due to the infinite number of various setups available.

Digital Ocean, Forge, Nginx, Cloudflare free SSL, Laravel 5.1, Laravel Collective Forms


  • SSL is already running in Cloudflare for website. However, Laravel doesn’t know about the SSL, so is generating none secure absolute URLs for the form methods.  An unlogged error along the lines of method not allowed:

MethodNotAllowedHttpException in RouteCollection.php line …


  • Create a Self Cert certificate on your server in /etc/nginx/ssl
  • Edit the site’s nginx file /etc/nginx/ssl to point to the cert
  • If using Lavavel Forge: Install Existing Cert; Add the key and cert. Get the contents for each file from /etc/nginx/ssl/
  • Cloudflare: Set the SSL to Flexible


Leave a Reply