Nextcloud Nightmare - php code is shown instead of web interface

I succumbed. Dumped the AWS Lightsail image and started a fresh one. Again, I followed the installation guide I referenced in my first post – but without the extra storage, just a standard default install – kicked it off, signed in, dismissed the intro, clicked on Admin and bang: Internal Server Error.

Since then it’s continued to die at irregular intervals exactly as I’ve described above. Each time it requires a stop and start of MySQL and Apache. A typical example occurred just now deleting a folder. A popup appeared on the right saying “Error deleting folder …” and the session dropped back to the login screen. But I can’t log back in even after clearing the browser cache, etc. “Wrong username or password.” Restart MySQL and Apache and I can log back in.

I can only conclude that it’s a server issue. AWS Lightsail running Ubuntu 18.04 can’t handle Nextcloud. I’ll free up a local server and see if I have any more luck. Thanks for all your feedback and suggestions!

There is maybe a limitation on the AWS side.
I use this How To for installing and tweaking Nextcloud :

If you follow it, you won’t get this error. Tested on real servers, vm and VPS

please could someone open a ticket at aws and let me know the answer. :sunglasses:

@GeoffP

Which AWS Lightsail instance type did you select?
Which region did you select?

Guys, make your life a bit easier, run the Nextcloud VM install scripts for Ubuntu Server 20.04:

@GeoffP,

Once again I just followed the guide to which you reference in your original post (just user and password changes).

It’s up and running here: NO LONGER DEPLOYED.

It’s Ubuntu 18.04, latest NC on a Lightsail $5 instance in London. All running fine (except it is topping out the RAM, obviously, bbut for a proof of installation box that’s all I’m prepared to spend… ) Took all of 5 minutes.

Added a NC test user with a miserly 500MB allowance, all OK. Been up for 30 mins no issues. I’ll leave it up overnight and see what happens, but all looks good as it did before.

I’ve used the referenced guide, Ubuntu 18.04, NC, Lightsail $5 London UK region. This is the second time I’ve done this now and both times without issues. The only variable in this is you and I.

Hi @GeoffP,

So just deleted the Lightsail instance I span up, it’s run for 2 days without any issues.

I can only conclude the following:

AWS Lightsail (London Region) + Nextcloud + Ubuntu 18.04 + Referenced Guide = Good Installation and Configuration Candidate.

As my previous post, if you can advise which Lightsail Region and zone you are using and experiencing problems in, I’ll try to duplicate. If that works OK, maybe you could consider creating an IAM for a Lightsail instance user and I’ll create an instance in your AWS LS account and see what happens then.

Hi @enoch85,

As the OP seems to be on AWS, do you have instructions for an installation path on the AWS hypervisor stack?
Has this VM been tested on the AWS HVM Stack? Any feedback?

As long as it’s a clean Ubuntu Server 18.04 (which AWS provides) then the hypervisor doesn’t matter.

It runs perfectly fine on Digitalocean, and I have a hard time believing there would be any difference running AWS.

Boot up a machine and run the installer script, that’s it. :slight_smile:

have you guys ever considered thinking about having a disk/lvm/partition filled to the top with logs??

as far as i can remember, I had one issue with a full partition which then ‘broke’ my installation until removing *logs via ssh.

Is this issue solved? if yes, please mark the solution and edit the topic so people with the same issue can look it up.

Hello,
I ended up in the same nightmare.
To be honest first I installed nextcloud via snap but my server OS resides on 160MB SSD and all the snap databases end up in var/www/… but this is no option, because there is a 1TB HDD where the database should be.
There was no suitable way to change the standard path in the snap installation. So I removed nextcloud and looked for an instruction to do it old school, I did this https://tech-base.club/nextcloud-installation-auf-ubuntu-20-04.

This ends sorrowfully in the nightmare that only the php code is displayed in firefox. In the Link you can see that the database lies on a self chosen path.

But maybe there is only one option available either snap and no self chosen path and someone can login or an apt install with self chosen path but you cannot login.

Before you ask:
I did research on php, apache2 and changed and rechanged conf files the last two days.
I found one last oddity, this is the conf-enabled folder of apache2.

backuppc.conf  charset.conf  localized-error-pages.conf  other-vhosts-access-log.conf  security.conf  serve-cgi-bin.conf

as you can see there is no nextcloud.conf listet. It is listet in conf-available but this is not enabled. Or do I understand that the wrong way.

I appreciate Tips and comments.
Manfred

@j-ed I had the same issue as the original post, but on a raspberry pi running Debian GNU/Linux 11 (bullseye)

I added the line:
DirectoryIndex index.html index.htm index.php

into my /etc/apache2/apache2.conf file and it sorted me out.

Thanks for posting the solution! :smiley: