sudo apt update && sudo apt upgrade sudo apt install software-properties-common && sudo add-apt-repository ppa:ondrej/php && sudo apt update # https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html sudo apt install php7.4-fpm php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-soap php7.4-zip php7.4-bcmath php7.4-xsl php7.4-mysql php7.4-mbstring php7.4-intl -y sudo apt install libsodium-dev sudo pecl install -f libsodium sudo apt install apache2 sudo a2dissite 000-default sudo a2enmod proxy_fcgi sudo nano /etc/apache2/sites-available/.conf ServerName !!! Domain name !!! DocumentRoot /var/www/!!!site name !!! Options FollowSymLinks AllowOverride All Require all granted SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost/" ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # Hit CTRL + X followed by Y and Enter to save and exit the file. sudo a2ensite .conf systemctl reload apache2 # PHP INI: /etc/php/7.4/fpm/php.ini # Pool config: /etc/php/7.4/fpm/pool.d/www.conf