1. Add community repository
  2. Install nginx & php7-fpm
  3. update /etc/nginx/conf.d/default.conf to include some of the following:
    server {
         listen 80 default_server;
         listen [::]:80 default_server;
    
         root /var/www/html;
         index index.html index.htm index.nginx-debian.html index.php;
    
    
         # Everything is a 404
         location / {
                 try_files $uri $uri/ =404;
         }
    
         location ~ \.php$ {
                 include fastcgi.conf;
                 fastcgi_pass 127.0.0.1:9000;
         }
    
         location ~ /\.ht {
                 deny all;
         }
    }
    
  4. Start php-fpm7 and nginx services
  5. Create the file /var/www/html/index.php and add the following code to test:
    <?php
    phpinfo();
    ?>