I have just created a server and followed the instructions on this website and am running into the issue where instead of actually loading the GUI I am looking at the contents of the /var/www/nextcloud/index.php file.
I have found some similar issues, one of them was inconclusive and things that were working for them are not working for me. Another said that some PHP modules were uninstalled but did not say what modules they installed to fix it.
If you’re an advanced Linux user, or if you want to improve your instance later down the road, i highly recommend to take a look at following site… (even if you don’t speak German.)