Recently I noticed a few sites had a page download instead of displaying when they were working perfectly fine before. I’m not 100% sure why but in my case the fix was to go into Virtualmin and toggle the PHP Version to some other version and back to my current one. I don’t know exactly what it changed, maybe it refreshed some config files somewhere. But it works and I wanted to make a note of it here in case it happens again.

Update: I had this issue again after updating to PHP 7.4.10. The fix was to switch to php-fpm in the Website Options. I then had to switch back to PHP 7.4.10 under PHP versions. I don’t know why but I couldn’t get FCGI mode to work anymore.