I had this issue as well, the fix for me in the end after making sure everything was installed correctly and the /run/php
directory existed with .sock files was to make sure that in the /etc/php/8.1/fpm/pool.d/www.conf
file the listen line stated the correct .sock file name. In my case it was php8.1-fpm.nextcloud.sock
. after changing that and restarting php8.1-fpm.service the socket was created and everything started working again.
in order to get it to use php8.1-fpm.nextcloud.sock
and not php7.4-fpm.nextcloud.sock
I needed to edit the /etc/apache2/sites-enabled/
files and set the correct entry for the PHP sock.
After all that I also had realized part of my problem was the PHP8.1-fpm default config uses php8.1-fpm.sock
and my nextcloud for some reason was configured with php8.1-fpm.nextcloud.sock
. I’ve since removed the mention of ‘nextcloud’ from the php8.1-fpm.sock
file name to prevent that issue for happening again in future updates.