How to fix blank white screen in Laravel 5 on Nginx

Blank white page is the frequent problem that I ran often into when deploying the laravel applications. Following are the list of things I learned while fixing this issue.

Nginx checks

I use nginx and these are the specific checks that you need to check in the conf created for the application.

index index.html index.htm index.php;

root /usr/share/nginx/;

App checks

Every environment needs to have its own .env file. Since .env is ignored as a part of the standards in .gitignore, your local .env won't be checked into the repo. So, You need to create a new .env file with the environment specific details.

A Laravel application has two set of dependencies. composer.json for Php and package.json for node.js. You need to install both the dependencies

composer install for laravel dependencies npm install for node, laravel mix, js dependencies

You should see vendor/ and node_modules at the root of the application.

You need to run these scripts depending on the features you used for the application.

npm run prod for transpiling sass, js. php artisan migrate for set the database changes. php artisan key:generate if you application has auth module and running the app for the very first time.

If you're still getting a blank white page, head to over storage/logs at the root of the application and start fixing the issues logged. Hope this helps.

For my new posts, Subscribe via weekly RSS, common RSS or Subscribe via Email