Hi!
I had installed wordpress on a MIAB server and ran into a couple of issues trying to update and sometimes when uploading new media. It turns out the user and group used by php is www-data and not user-data. I initially just changed that in the [www] pool and it appeared fine, but when trying to use roundcube and nextcloud problems arose, ie; they were not at all usable. To fix this:
copy the pool:
sudo cp /etc/php/7.2/fpm/pool.d/www.conf /etc/php/7.2/fpm/pool.d/wordpress.conf
open with your editor, my weapon of choice is nano:
sudo nano /etc/php/7.2/fpm/pool.d/wordpress.conf
edit the new file on line 4:
[wordpress]
and line 23-24:
user = user-data
group = user-data
then line 36:
listen = /run/php/wordpress.sock
In /home/user-data/www/ I assume you already have an nginx conf file for the domain you have wordpress on ie: /home/user-data/www/website.com.conf and the folder /home/user-data/www/website.com exists, so edit your /home/user-data/www/website.com.conf file to include the following:
index index.php;
location ~* \.php$ {
fastcgi_pass unix:/run/php/wordpress.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
Update MIAB’s config (not sure how necessary this is):
cd /root/mailinabox/tools; sudo ./web_update
Restart the services nginx and php:
sudo service nginx restart && sudo service php7.2-fpm restart
Thanks everyone! I hope this helps someone