404 - Moodle adds /de/ to my address

404 - Moodle adds /de/ to my address

Q* Bert -
回帖数:11

Hi guys,

I updated my Moodle to Version 4.4 and run into some trouble.

Suddenly the cron Jobs are not run anymore. 

Also whenever I click on "Home" Moodle adds /de/ to my web address which leads to an 404 - Page not found.

I emptied caches and so on but nevertheless I still have this issues. Which never appeared before.

Thanks for any helpful advise.

Robert

回复Q* Bert

Re: 404 - Moodle adds /de/ to my address

Ken Task -
Particularly helpful Moodlers的头像

Did you also have to upgrade PHP to get to 4.4?

If so, the cron job setup might be pointed to the wrong php-cli.

That's a guess ... given the very scant info about your site.

Upgraded from what version to 4.4?

Server have correct PHP version and php extensions.

Is platform Linux or other?

Can you access the /admin/ area?

Can you turn on debugging via config.php file?

'SoS', Ken

回复Ken Task

Re: 404 - Moodle adds /de/ to my address

Q* Bert -
Hi Ken,

I deleted my complete old instance and then installed the latest Moodle Package. I chose PHP 8.2. I made 2 cron Jobs because I wasn't sure which one was the right one.

I don't know about the platform but I guess it is Linux? When opening a Terminal it says bash 4.2.

I can access the admin area within my Moodle directory.

I don't know how to turn on debugging.

Best regards Robert
回复Q* Bert

Re: 404 - Moodle adds /de/ to my address

Ken Task -
Particularly helpful Moodlers的头像

Debugging:

https://docs.moodle.org/404/en/Debugging

Think Terminal would mean linux.
From terminal:

uname -an

Will show linux flavor.

Cron job:
https://docs.moodle.org/404/en/Cron

'SoS', Ken

回复Ken Task

Re: 404 - Moodle adds /de/ to my address

Q* Bert -
When trying to run the cron job like /usr/bin/php /pathtomoodle/admin/cli/cron.php I get this:

Could not open input file: /pathtomoodle/admin/cli/cron.php
回复Q* Bert

Re: 404 - Moodle adds /de/ to my address

Ken Task -
Particularly helpful Moodlers的头像

Appears your site has lost it's language packs!

In code/lang/ there is this readme.txt file that says:

Moodle Language Packs

This directory contains the standard packaged Moodle language files,
for making the Moodle interface appear in different interfaces.

The default language for Moodle is the English language, under the
Unicode scheme (UTF8).

To add more languages to Moodle, you can either:

 1) use the Moodle languages GUI in the interface to fetch
    new languages and install them in your 'dataroot' directory.

 2) download them and unzip the packs in this directory manually


For more information, see the Moodle Documentation:

   http://docs.moodle.org/en/Translation

'SoS', Ken

回复Ken Task

Re: 404 - Moodle adds /de/ to my address

Q* Bert -
Well, thank you. I added the language pack. Now I got this:

Error 403: your request was denied

Possible causes for this error are:

No index page (e.g. index.php or index.html) was found
Your request was denied by our web application firewall. In case you are the operator of this website, you are able customize or disable the Web Application Firewall in our control panel host207.checkdomain.de:8443.
回复Q* Bert

Re: 404 - Moodle adds /de/ to my address

Q* Bert -
I don't remember this installation being so tough. Last time everything just worked immediately :-O
回复Q* Bert

Re: 404 - Moodle adds /de/ to my address

Visvanath Ratnaweera -
Particularly helpful Moodlers的头像 Translators的头像
MOODLE_404_STABLE throws 404 errors? And now it gives Error 403? It must have backdated itself to MOODLE_403_STABLE!
微笑

This /de/ suffix is suspicious. Moodle suffixes are like &lang=de. Do you run WordPress next to Moodle?

Otherwise, "Your request was denied by our web application firewall. In case you are the operator of this website, you are able customize or disable the Web Application Firewall in our control panel.." speaks plain text, doesn't it?
回复Q* Bert

Re: 404 - Moodle adds /de/ to my address

Ken Task -
Particularly helpful Moodlers的头像

Moodle doesn't have an 'installer' ... by chance are you using some app provided by hostng to install moodle?   Softaculous or Direct Admin or whatever?

I asked for the output from Terminal the following command:

uname -an

If you feel uncomfortable posting here, you have my PM.

That command will give us a hint as to which linux distro your server is using ... Ubuntu/Debian/AlmaLinux/Rocky ... hopefully not almalinux 8!

Also ... appears your site doesn't know how to handle index.php files as index files for web services.   Default for apache without php installed is index.html on most linux systems.

As a test, at the document root of your server, create an index.html file using your panels file browser and put nothing more than:

It Works!

in that file ... no html ... just the txt as shown above.

Then, using your browser, go to https://yoursite/ ... does the 'It Works!' show?

After that test, erase the index.html file.

So one more test from Terminal ... while this will show info about php-cli, if that is installed, the web based PHP should also be installed.

Commands:

which php

/path/seen/in/which/command/php -v

The first shows a path that we will assume is for php-cli

The /path/seen/blah/php -v

will show us version of php.

Since the moodle you are attempting to install has specific PHP requirements we need to see/know that!

'SoS', Ken

回复Q* Bert

Re: 404 - Moodle adds /de/ to my address

Ken Task -
Particularly helpful Moodlers的头像
Do what it says:
"In case you are the operator of this website, you are able customize or disable the Web Application Firewall in our control panel host207.checkdomain.de:8443."
 
Rather then attempt customization think I'd disable for now.
 
A simple non-evasive curl test at your server renders a 403 error - which is access denied.   I see an nginx web service but that might be your Web Application Firewall and not your true server.
 
Responded to your PM ... please check that!
 
'SoS', Ken
 
回复Q* Bert

Re: 404 - Moodle adds /de/ to my address

Ken Task -
Particularly helpful Moodlers的头像

Think I've been able to slueth your hosting setup uses Plesk as a panel.  Plesk doesn't like moodledata being located outside of document root ... which, according to info you've shared, is in /var/www/html/.    Your moodledata is in /var/www/ - that's outside of document root.

In the Plesk panel for your moodle server domain, there is a variable for open_basedir.   It's a path and currently it points to /var/www/html/.   You need to add to the paths allowed /var/www/moodledata/ me thinks.

'SoS', Ken