Старая версия
- Установка версии 7.4
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/phpsudo apt update
sudo apt install php7.4
sudo apt install php7.4-cli php7.4-fpm php7.4-json php7.4-common php7.4-mysql php7.4-zip php7.4-gd php7.4-mbstring php7.4-curl php7.4-xml php7.4-bcmath php7.4-json - Назначение по умолчанию для Apache2
a2enmod proxy_fcgi setenvif
a2enconf php7.4-fpm
systemctl restart apache2