Nginx Unit changes how we host PHP (& Laravel)

Опубликовано: 30 Март 2026
на канале: Chris Fidao
21,576
203

Nginx Unit changes the game in how he host and containerize Laravel applications. We no longer need PHP-FPM, nor are limited by its max_children settings.

We cover installing and configuring Nginx Unit for use with PHP and Laravel.

Since we don't want to use the system-default PHP (instead wanting to use good old ppa:ondrej/php to install PHP), we need to manually compile the Nginx Unit PHP module - otherwise it attempts to load the wrong underlying PHP libaries.

Luckily that's pretty easy! We see how to run Unit, use it with a Laravel app, and discuss the pros & cons of Nginx Unit.

⌚️ Timestamps

00:00 Intro
00:05 What is Nginx Unit
01:47 Install PHP
03:49 Install Nginx Unit
05:39 Compile Unit's PHP Module
08:04 Create a Laravel app
09:28 Configure Unit
16:08 Nginx Unit Processes
17:50 The Good
19:21 The Bad