sudo systemctl stop apache2.service
sudo apt remove apache2
sudo apt remove "libapache2-mod-php*"sudo add-apt-repository ppa:ondrej/nginx -y
sudo apt update
sudo apt install nginx -y
sudo systemctl enable nginxHope you have already installed the php-cli, lets install the glue now
sudo apt install php8.4-fpm
sudo systemctl start php8.4-fpm- Check for syntax errors
sudo nginx -t- Reload after updating the configurations
sudo systemctl reload nginxYou can tweak php.ini at this location
/etc/php/8.4/fpm/php.ini
Reserved