The information your about to store is not secure — how to fix it in Laravel, nginx or fastcgi and force https

This is intended to be quick ‘to the point’ and isn’t for individuals without past knowledge of nginx, fastcgi or Laravel.

Laravel

1. Create a middleware
2. Force all redirects to be https.

3. within Kernel.php add the middleware to all routes.

Nginx

Set the forward prototype/port to https and port 443.

Fastcgi

Set the forward prototype/port to https and port 443.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Joshua Callis

Converted DevOps Engineer, Previously a Senior Software Engineer.