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.

Комментарии • 26

  • @cameronmcnz
    @cameronmcnz  2 года назад +7

    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

  • @narrenschlag
    @narrenschlag 8 месяцев назад +3

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

    • @cameronmcnz
      @cameronmcnz  8 месяцев назад

      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!

  • @medicinalcocaine
    @medicinalcocaine Год назад +1

    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.

  • @ulyssecordier
    @ulyssecordier Год назад +1

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

  • @EddieMao
    @EddieMao 7 месяцев назад

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

  • @user-pt4cl6oe1p
    @user-pt4cl6oe1p 4 месяца назад +1

    Simply brilliant

  • @JudgeFredd
    @JudgeFredd 8 месяцев назад

    Very good tutorials . Tx !

  • @riyasdeenj8604
    @riyasdeenj8604 Год назад +1

    THANK YOU SO MUCHHH FOR THIS VIDEO SIR

  • @vlogshahrizan
    @vlogshahrizan 11 месяцев назад

    thank you sir. Great tutorial and Easy to follow

  • @teclote
    @teclote Год назад +1

    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.

  • @dev-kq2bx
    @dev-kq2bx 9 месяцев назад

    Thank you!

  • @FabioGMartinez
    @FabioGMartinez 2 года назад +1

    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!!!

  • @MrSaifqureshi
    @MrSaifqureshi 2 года назад

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

  • @Knowledge-Wise
    @Knowledge-Wise Год назад

    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!

  • @GabrielCelorio
    @GabrielCelorio 11 месяцев назад

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

  • @somestranger9314
    @somestranger9314 10 месяцев назад +1

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

  • @mehdi-vl5nn
    @mehdi-vl5nn Год назад +1

    Is fpm not fcgi (yes fmp use fcgi)

    • @cameronmcnz
      @cameronmcnz  Год назад +1

      What did I do wrong? I'll update it.

    • @mehdi-vl5nn
      @mehdi-vl5nn Год назад +2

      ​@@cameronmcnzI apologize, I had misread the title. You are correct.

  • @vojtechrichter8436
    @vojtechrichter8436 Год назад

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