Install & Setup PHP and Nginx on Ubuntu Linux with FPM

preview_player
Показать описание
Need to quickly setup PHP on Nginx and configure your web server to it can interpret files written in PHP in Nginx? It's not that hard, especially if you're using Ubuntu Linux. In this tutorial, Nginx and PHP is configured to work together by first installing Nginx on Ubunu, PHP fastCGI process manager second, and then editing the default Nginx config file for PHP support. The versions used in this tutorial are Ubuntu 20, Nginx 1.18 PHP 8.1, & php-fpm 8.1, although all of these Nginx PHP configuration options will work with other versions of Nginx and PHP on Ubuntu Linux. These are simply the most up to date versions of PHP, Nginx & Ubuntu with PHP FPM at the time this example tutorial was recorded.
Рекомендации по теме
Комментарии
Автор

Please checkout this comprehensive article I wrote over on TheServerSide about how to configure PHP, Nginx and FPM (fastCGI) on Ubuntu.

cameronmcnz
Автор

Well made tutorial. Still works perfectly (dec 2023).

narrenschlag
Автор

Thanks for the useful video, Cameron! Really enjoyed your delivery, made me subscribe to your channel :)

To anyone else who struggled a bit like I did: if your browser (Firefox in my case) is downloading the php file instead of rendering it, clear the browser cache and restart nginx, it solved the issue.

medicinalcocaine
Автор

Hi, Cameron, great tutorial. I like the way you explain everything. Thanks a lot for sharing.

EddieMao
Автор

Thank you for the tutorial on theserverside. It helped me so much !

ulyssecordier
Автор

thank you sir. Great tutorial and Easy to follow

vlogshahrizan
Автор

THANK YOU SO MUCHHH FOR THIS VIDEO SIR

riyasdeenj
Автор

great explanation, would be more helpful if you cover the entire LEMP setup

MrSaifqureshi
Автор

Worked great first time. phpinfo() results screen shows Server API : FPM/FastCGI. But my "PHP Include" directives are not working the way they do on Apache. Do I need a different PHP module for that? (maybe a different video?) Thank you.

teclote
Автор

Thank you for your video.
I need to update PHP 7.4 to 8.0 in NGINX (debian),
how do I do that precess?
Thanks a lot!!!

FabioGMartinez
Автор

I am using chrome and it keeps downloading the info.php file. I already tried clearing the cache and restarting nginx, no luck ;( Let me know if anyone had similar struggles and if you found the fix. Ty!

Knowledge-Wise
Автор

I did everything you did in this video and ended up getting an http error 500

GabrielCelorio
Автор

The article is not working. Check before posting it online. Remove or edit the article

somestranger
Автор

Why would you guys use Ubuntu as a webserver...

vojtechrichter