Install and Configure PHP 8.1 in Nginx Web Server with PHP-FPM on Ubuntu 22.04 LTS Desktop – 2023
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 🙂
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
GIVE SUPPORT – https://www.patreon.com/lazysysad
BUY ME A COFFEE – https://www.buymeacoffee.com/lazysysad
PAYPAL – https://www.paypal.com/donate/?hosted_button_id=K4RQ3LAWHGVS6
LINKS:
Install Nginx first – https://youtu.be/iJTscrYM6Eo
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
http://localhost/index.php
#webserver
#ubuntu
#nginx
#php
#php-fpm
#linux
#thelazysysadmin
Comments are closed.