Installation of PHP 7.0 FPM and NGINX

Ref: https://www.ma-no.org/en/content/index_php7-install-php7-with-nginx-and-memcache-in-ubuntu-14-04_2137.php

  1. Install php7.0-fpm: sudo apt-get install php7.0-fpm

     
  2. CHANGE THE PHP VERSION FOR CLI TO 7.0

    CHECK THE PHP VERSION:

     
  3. TO ENABLE PHP 7.0 ON NGINX SERVER, PLS DO (MAKE SURE APACHE2 IS STOPPED IF IT’S RUNNING AND START NGINX):

    THE NGINX MAIN CONFIG IN /etc/nginx/nginx.conf
    THE DEFAULT VIRTUALHOST IN /etc/nginx/sites-available/default
    EDIT IT TO ENABLE PARSING PHP FILE:


    CHANGE THE CONTENT TO ENABLE PHP 7.0 FPM:

    THEN CHANGE PHP7.0-FPM SETTING:

    CHANGE THE CONTENT:

    THEN RESTART PHP7.0-FPM SERVICE:

    CHECK NGINX SYNTAX: sudo nginx -t
    RESTART NGINX: sudo systemctl restart nginx
    OPEN IT: http://localhost/phpinfo.php (NEED TO CLEAR THE BROWSER CACHE FIRST)

Leave a Reply

Your email address will not be published. Required fields are marked *