If you use DietPi than by chance you found the right one
.
You installed PHP, webserver and such (at best whole Nextcloud) via dietpi-software?
Did you install PHP7.2 via Ondrejs repo https://deb.sury.org/?
"socket" => "/var/run/php/php7.2-fpm.sock", in /etc/lighttpd/conf-available/15-fastcgi-php.conf indeed should be it, if php7.2-fpm service is correctly installed and running. But note that Nextcloud is configured (via dietpi-software) to use the php-redis and php-apcu modules, which are not by default installed together with PHP. Missing those, leads to internal server errors, so most likely this is the issue in your case.
Those modules from Debian Stretch repo are PHP7.0 versions, so you need to install them from Ondrej’s repo as PHP7.2 versions. Hope they are contained there, will check and see.
Quick test which might or might not work:
apt install php-redis php-apcu # Failing that, skip the following
phpenmod redis apcu
systemctl restart php7.2-fpm
EDIT
Okay, just checked and on Ondrej’s repo the packages are called php-redis and php-apcu as well. Not sure if priority pins are required to force fulling these version, but AFAIK this is done automatically. Did you force installing/updating them? I adjusted the commands above, or do simply apt upgrade and check that/if those two packages are updated as well.
Check back their versions and generally installed PHP packages: dpkg -l | grep 'php'
And/or check if the related modules are available and enabled for PHP7.2:
ls -l /etc/php/7.2/mods-available
ls -l /etc/php/7.2/apache2/conf.d/
Should list
apcu.ini
redis.ini
respectively
20-apcu.ini
20-redis.ini