Install & Setup PHP and Nginx on Ubuntu Linux with FPM
HTML-код
- Опубликовано: 23 авг 2024
- 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.
www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/Nginx-PHP-FPM-config-example
Well made tutorial. Still works perfectly (dec 2023).
Phew! Whenever I see a comment on a video more than a year old I worry it's someone complaining it doesn't work anymore.
Once you get PHP and Nginx all set up, everything becomes much easier from here on in!
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.
Thank you for the tutorial on theserverside. It helped me so much !
Glad I could help!
Hi, Cameron, great tutorial. I like the way you explain everything. Thanks a lot for sharing.
Simply brilliant
Happy to be of service!
Very good tutorials . Tx !
THANK YOU SO MUCHHH FOR THIS VIDEO SIR
thank you sir. Great tutorial and Easy to follow
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.
Thank you!
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!!!
great explanation , would be more helpful if you cover the entire LEMP setup
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!
I did everything you did in this video and ended up getting an http error 500
The article is not working. Check before posting it online. Remove or edit the article
What's the issue?
@@cameronmcnz I got HTTP error 404
Is fpm not fcgi (yes fmp use fcgi)
What did I do wrong? I'll update it.
@@cameronmcnzI apologize, I had misread the title. You are correct.
Why would you guys use Ubuntu as a webserver...