$ cat nginx-unit-with-laravel-and-php.md
Nginx Unit with Laravel and PHP
Nginx Unit is a "Universal Web App Server" brought to you by Nginx. This is a web server that can "directly" communicate with your code base, helping you pass off HTTP requests to your code in a way it can understand. It supports a bunch of languages and has a module for each supported language.
fideloper.com14 Sept 2023 · summary
Read on fideloper.com ↗https://unit.nginx.org/ is a "Universal Web App Server" brought to you by Nginx. For PHP support, it has a PHP module that creates PHP processes, similar(ish) to PHP-FPM, but without needing PHP-FPM.
It lets us get the latest PHP and install multiple versions of PHP on the same server (if so desired).
Then tell Unit to use this configuration to run the application: sudo curl -X PUT --data-binary @unit.json --unix-socket \ /var/run/control.unit.sock http://localhost/config/
First, we can't switch PHP versions without re-compiling the Unit PHP module.
source
This is a summary of an article first published by fideloper.com. The full piece is on their site.