Increasing upload_max_filesize issues

Nextcloud version (eg, 29.0.5): 29.0.2
Operating system and version : Ubuntu 22.04.4 LTS
Apache or nginx version (eg, Apache 2.4.25): 8.1
PHP version (eg, 8.3): installed and removed while trying to change upload size

I have been going around in circles trying to change the upload_max_filesize from 512M to 10G. In doing my research, everywhere kept saying to change the variable in php.ini. It seemed like everyone had the path to php.ini. I did not. So I went ahead and installed PHP, navigated to the path file, and edited post_max_size and upload_max_filesize to both be 10G.

I then tried to restart apache2 but then ran into a issue due to port collision. nginx and apache2 were both listening on port 80. SOOO I changed the port that apache was listening in on to port 8082. I did this by editing etc/apache2/ports.conf and etc/apache2/site-enabled/000-default.conf.

After this I was able to restart apache. I also restarted my Nextcloud container in portainer. However, everything has been SUPER slow since I did this. I have tried many things to make it faster and to be honest, I cannot even remember everything else that I have touched since I have started.

My log reader looks like this.

I have since tried to backtrack and undo changes I have made. I uninstalled PHP.