How to Install Lighttpd with MariaDB and PHP FPM on Ubuntu 22.04

preview_player
Показать описание
The LLMP Stack (Linux, Lighttpd, MariaDB, and PHP-FPM) is a software stack for delivering web applications. Each component of the LLMP Stack is free, open-source, and can be installed on multiple operating systems. The LLMP Stack can deliver static HTML sites and PHP applications like WordPress, Drupal, and Joomla.

In this video I will show you how to install it

Useful Links:

WARNING - ANGLED BRACKETS AREN'T ALLOWED IN DESCRIPTION SO BE ATTENTIVE TO THE VIDEO IN NANO EDITOR

Commands Used:
sudo apt update sudo apt upgrade -y
sudo apt install lighttpd
sudo systemctl start lighttpd
sudo systemctl enable lighttpd
sudo systemctl status lighttpd
sudo ufw allow "Lighttpd Full"
sudo ufw status
ls -lah /var/www/html
sudo apt install mariadb-server
sudo systemctl start mariadb
sudo systemctl enable MariaDB
sudo systemctl status mariadb
sudo apt install php-fpm php-common php-mysql php-cli php-curl php-xml
sudo systemctl start php8.1-fpm
sudo systemctl enable php8.1-fpm
sudo systemctl status php8.1-fpm
ss -pl | grep php
sudo systemctl restart php8.1-fpm
sudo lighty-enable-mod fastcgi fastcgi-php-fpm

## Use PHP-FPM service for PHP via FastCGI
((
"broken-scriptfilename" ="enable"
))
)

sudo systemctl restart lighttpd
Рекомендации по теме
Комментарии
Автор

Thank you so much, it was really helpful
The only thing I could complain is the following command:
sudo lighty-enable-mod fastcgi fastcgi-php-fpm
it returns:
ignoring unkown module fastcgi-php-fpm
so I checked the modules in /etc/lighttpd/conf-available and found out the module "fastcgi-php"
I run:
sudo lighty-enable-mod fastcgi fastcgi-php
and it works, now I can run php on a lighttpd server

happytux.