How do I configure LEMP (Ubuntu 16.04) for Laravel 5.4?

Posted February 7, 2017 10.7k views
LEMPApplicationsUbuntu 16.04


I did a basic one-click app install for LEMP (ubuntu 16.04). I was wondering if there was a tutorial on how to set it up for Laravel 5.4? I’ve found it for Ubuntu LAMP 14.04, but not for 16.04. Does anyone know where I can find a reliable source to get this done?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
5 answers


The overall gist of the guide here:

… is pretty much the same for 16.04. The one section you would want to skip is the one regarding the creation of a swap file. This isn’t recommended now, so it’s safe to overlook that section.

by Justin Ellingwood
Laravel is an easy to use, modern framework for the PHP programming language. In this guide, we will demonstrate how to install Laravel with an Nginx web server on an Ubuntu 14.04 server instance.

I’ve tried that tutorial, and it didn’t help me. I still get the default blue screen.

I have recently made a gist for configuring the latest laravel 5.4 on LEMP,follow the link here

I figured it out, maybe LEMP 16.04 doesn’t use the /etc/nginx/sites-available/default anymore. So, I tried editing this file instead.

sudo nano /etc/nginx/sites-enabled/digitalocean

Then, whooah! It worked :)


by Melissa Anderson
On Ubuntu, by default, the Nginx web server stores its documents in /var/www/html, which is typically located on the root filesystem with rest of the operating system. Sometimes, though, it’s helpful to move the document root to another location, such as a separate mounted...