Setting up an Ubuntu Linux Server for Laravel
Configuring a Linux server can be stressing and a hassle, but since we’ve done this few times and struggled, We thought to share.
Let’s begin then
- Login to yourself
- add a Laravel user
- “`adduser dev“`
- check if user exists “`cut -d: -f1 /etc/passwd | grep “`
- Install NGINX
- sudo apt update
sudo apt install nginx nginx-extras -y
- sudo apt update
- Start NGINX sudo service nginx start
- sudo ufw enable
Installing PHP and Extensions
Install Composer
Deploying
- Clone branch
- Copy .env
- Install dependencies
- Migrate db
- Run any Seeds if appliccable
- Symlink Storage folder
-
File Permission