Accidentally deleted ftp (Solved)

Hello,
I messed up when trying to fix my nextcloud pi install.
ftp wasn’t working correctly so I tried fixing it but in the proces I deleted ftp and reinstalled it. the main problem I had was solved, but now I have a new problem presented to me, I now have a internal server error but I don’t know how to fix it since I probably have to set some things up again.

what do I have to do to fix this?

I managed to fix it, heres how I did it:

first I ran the command to run all php8.1 modules:
sudo apt-get install -y php8.1-cli php8.1-common php8.1-mysql php8.1-zip php8.1-gd php8.1-mbstring php8.1-curl php8.1-xml php8.1-bcmath

then:

sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo a2enconf php8.1-fpm

then I realised redis was not installed yet so I did:

sudo apt-get install php8.1-redis