Upgrading Moodle stack: 404 URL not found

Keywords: Moodle - Virtual Machines - Technical issue - Upgrade
Description:
I need to upgrade the entire moodle stack because the version we are running contains a compromised version of PHP, and apparently this is the only way to address it. I have followed the instructions here, after upgrading the instance and taking backups:

https://docs.bitnami.com/google/how-to/migrate-moodle/

After following the guide and typing in the URL of the moodle instance to the browser, I just get a generic ‘Awesome Moodle is now installed’ message. When clicking ‘Access Moodle’ I get a 404 URL not found.

Has anyone run through this procedure before and got any tips?

Hi @doug.morrison,

We have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

Please note that you need to paste the code ID that is shown at the end.

Regards,
Ibone.

Hi Ibone, thank you for the reply. Automatic upload failed so I would like to share the link with you through DM. I don’t see how I can initiate a message thread, can you please DM me so that I can reply with the link?

Thanks,
Doug

Hi Ibone, have you been able to download the files?

Hi,

Can you please confirm if you have been able to download the file?
Thanks
Doug

Hi @doug.morrison,

Yes, I was checked the data of your bnsupport it seems you have an error in you apache’s logs:

[Thu Nov 26 19:02:12.085822 2020] [php7:error] [pid 524] [client 10.10.14.37:17578] script '/opt/bitnami/apache2/htdocs/index.php' not found or unable to stat
[Fri Nov 27 06:16:12.580097 2020] [php7:error] [pid 526] [client 10.10.14.37:19205] script '/opt/bitnami/apache2/htdocs/index.php' not found or unable to stat

If you run the following commands, are you getting an error?

sudo /opt/bitnami/ctlscript.sh stop
sudo /opt/bitnami/ctlscript.sh start

Could you run the following command and add the output into the thread?

ls -la '/opt/bitnami/apache2/htdocs/

Regards,
Ibone.

Thanks, Ibone. Please see below screenshot:

image

Not sure why the file is missing post upgrade?

Thanks

I have reverted my snapshot I took before the upgrade and note that there is no index.php in this location prior to the upgrade, yet my Moodle instance is fully operational.

Were there any other errors noted in the support file generated?

Does Moodle not rely on the index.php file found in /opt/bitnami/apps/moodle/htdocs?

Hi @doug.morrison,

Did you try to follow this guide https://docs.bitnami.com/aws/apps/moodle/administration/upgrade/?

could you run the following command?

ls -la /opt/bitnami/moodle

Regards,
Ibone.

Hi Ibone, I am trying to upgrade the entire stack rather than just Moodle, as the current version of PHP contains a vulnerability that needs to be patched. However, I have run the Moodle upgrade post stack upgrade and now see the following:

image

Things looked more promising this time however as when I restarted apache, I was asked to enter the passphrase for the SSL cert which I hadn’t been asked for previously…

Assuming you mean /opt/bitnami/APPS/moodle:

Do you want me to upload BNSupport extract again?

Can only post one image per post:

Hi @doug.morrison,

Yes, rerun the bnsupport.

Regards,
Ibone.

Hi Ibone,

Please see code below:

9e43e518-e678-539c-509f-70f079fc4125

Thanks,
Doug

The issues I am facing are very similar to the last user to post in this thread, iHaag:

Hi @doug.morrison,

Could you check these threads of the moodle community?
https://moodle.org/mod/forum/discuss.php?d=375050
https://moodle.org/mod/forum/discuss.php?d=401417

Or maybe this link can help you

Regards,
Ibone

Hi Ibone,

I no longer see that message, instead seeing the 404 page not found as described in the post I linked above. I seem to be fine upgrading the stack, but when I follow Bitnami guides to copy moodledata and htdocs from backup, I get the page not found message.

Thanks,
Doug

Hi @doug.morrison,

Could you add the guides and the command you run to get that error?
I don’t see an error 404 in the apache logs

Regards,
Ibone.

Sure,
https://docs.bitnami.com/virtual-machine/how-to/migrate-moodle/

Step 3, approach B is where the troubles begin.

Thanks
Doug