Setup Apache, FastCGI and PHP on Debian/Ubuntu for hosting sites on different ports and PHP versions
Prerequisites
Update the installed packages.
apt update
Install the Ondřej PHP repository.
apt install software-properties-commonsudo
add-apt-repository ppa:ondrej/php