Run multiple PHP versions on the same server using php-fpm in linux, install with fastcgi(FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features (mostly) useful for heavy-loaded sites.
)
Install php 5.6 and 7.1 as fpm in linux 16.04
)
Install php 5.6 and 7.1 as fpm in linux 16.04