Setting up Laravel on digitalocean Lemp 18.04

Here are the basic steps needed to setup the laravel framework on a digitalocean lemp doplet.

You need composer to be able to install laravel with composer:

You need to have zip/unzip commands, for composer to install the needed dependencies

 

For php you need the mbstring and xml extension installed

My default digitalocean vps had not enough swap memory, so I created some:

When this is complete go to your webroot (/var/www) and create your laravel project:

Setup nginx to use your public folder as web root:

in the file  look for root /var/www/html; & replace with: /var/www/yourporjectname/public;

restart nginx service: