apt install php7.1-common php7.1-cli php7.1-zip php7.1-opcache php7.1-mysql php7.1-mcrypt php7.1-mbstring php7.1-json php7.1-intl php7.1-gd php7.1-fpm php7.1-curl php7.1-bz2 php7.1-bcmath php7.1-imap php7.1-recode php7.1-soap php7.1-xml php7.1-imagick php7.1-memcache php7.1-memcached php7.1-igbinary php7.1-msgpack php7.1-redis
Copy the php7.1-fpm pool configuration from php7.0-fpm
cp -f /etc/php/7.0/fpm/pool.d/www.conf /etc/php/7.1/fpm/pool.d/www.conf
Edit the listening port of php7.1-fpm (for example 9080 instead of 9070)
nano /etc/php/7.1/fpm/pool.d/www.conf
Replace the line listen = 127.0.0.1:9070
by listen = 127.0.0.1:9080
Restart the service
service php7.1-fpm restart
Then to use php7.1-fpm, you have the choice between
In this case just edit the file /etc/nginx/conf.d/upstream.conf and replace the line server 127.0.0.1:9070;
by server 127.0.0.1:9080;
nano /etc/nginx/conf.d/upstream.conf
Then reload nginx
service nginx restart
Add the following lines in /etc/nginx/conf.d/upstream.conf
upstream php71 {
server 127.0.0.1:9080;
}
then copy the files /etc/nginx/common/php7.conf into /etc/nginx/common/php71.conf
And into this copy replace the line fastcgi_pass php7;
by fastcgi_pass php71;
Reload nginx and you can replace the line include common/php7.conf;
by include common/php71.conf;
in the vhosts of your choice