Nextcloud Nightmare - php code is shown instead of web interface

Hi @NeptuneUK,

Thanks for the response. In response to your points…

  1. I’m guessing you mean /etc/apache2/apache2.conf. (There’s no /etc/httpd/conf/httpd.conf in Ubuntu.) It’s a 7K file so rather than post it here, I’ve copied it to a Pastebin link: https://pastebin.com/yxEhWSLF

  2. Yes, this was a fresh install.

  3. Yes, the server meets the minimum requirements.

And yes, the original issue has been resolved, and that’s lead on to the current issue.

I’ve been developing and testing software for decades so I’m well aware of the incremental nature of the debugging process, and that is partly why I’m hesitant to do a fresh reinstall. NC is now working, sometimes for 10-15 minutes at a time. Then it simply crashes out to the login screen and refuses a login until I restart Apache. That suggests a problem in NC itself. (Or perhaps not. Having just typed the above, I had a crash out to an “Internal Server Error” screen which requires a restart of MySQL and Apache, then I’m back to login.)

You say you tried a virgin install on Lightsail. Did you also run it for a while? I’m back in again just now, looking at Logging, Apps, etc. then, after a few minutes, it crashes back to “Internal Server Error”.

I’m not sure what you mean when you say I deviated from the installation guide. The only deviation I’m aware of was to reference attached storage when configuring Nextcloud. The reason I did that was because I followed the advice detailed here, specifically:

Changing data directory after installation is not officially supported. Consider re-installing Nextcloud with new data directory…

(The original was also in bold type!)

Wiping the server and starting again is an option, but that will destroy any chance of learning what’s actually going wrong here – and perhaps finding a rare, gnarly bug that could affect someone else.