Install and Configure PHP 8.1 in Nginx Web Server with PHP-FPM on Ubuntu 22.04 LTS Desktop

Published: 30 September 2022
on channel: The Lazy SysAdmin
5k
48

You will get to learn How to Install and Configure PHP 8.1 for Nginx with PHP-FPM on Ubuntu 22.04 LTS Desktop - Linux in 5 MINUTES!!!

PLEASE SUBSCRIBE :)
PLEASE HIT LIKE IF IT HELPED :)

GIVE SUPPORT -
BUY ME A COFFEE -
PAYPAL -

Please enjoy the video and if you have any questions, leave a comment down below.

Remember to Like, Share and Subscribe if you enjoyed the video!

How to Configure PHP 8.1 for Nginx with PHP-FPM on Ubuntu 22.04 LTS - Linux

LINKS:
Install Nginx first -

Steps:
1. Install PHP8.1 and PHP-FPM
sudo apt -y install php8.1 php8.1-fpm

2. Verify php8.1-fpm is running
systemctl status php8.1-fpm

3. Configure Nginx
sudo vi /etc/nginx/sites-available/default

search for the line "pass PHP scripts to FastCGI server"

uncomment the following line:
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}

change php7.4-fpm.sock to php8.1-fpm.sock

Save and exit.

4. Reload nginx
sudo systemctl reload nginx

5. Create php file
sudo vi /var/www/html/index.php
(Youtube don't allow angle brackets in description, so just pause the video and copy the code)

Save and exit.

6. Open browser and go to


Watch video Install and Configure PHP 8.1 in Nginx Web Server with PHP-FPM on Ubuntu 22.04 LTS Desktop online without registration, duration 04 minute 30 second in high hd quality. This video was added by user The Lazy SysAdmin 30 September 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5 thousand once and liked it 48 people.