Hi all. I have been trying to post this for days, but it keeps getting flagged as spam, so I made it as a screenshot. Sorry about that.
The system administrators are not familiar with Moodle, not even versed in basic system administration. No space in the system partition is the next worse thing that can happen to a server - just next to a defective hard disk!
Ideally they should either restore the VM to its last (healthy) snapshot or https://docs.moodle.org/en/Site_restore the last (health)y https://docs.moodle.org/en/Site_backup.
Less than ideal, but still has a fair chance is to enlarge the partition. First enlarge the virtual disk from the management console of virualization software and then from within Linux enlarge the partition. With good Linux skills you can enlarge the partition even in a running server, for certain filesystem types, like ext4.
The story of two domain names does not sound feasible. Moodle wants to know how it is called. You will have less trouble, if it has a unique URL. There are hacks, but again, needs more skills.
In short, if the system administrators can't do it, you as a user have no chance of salvaging a dying machine - even without the Great Bamboo Firewall between you.
P.S. Isn't this a duplicate of https://moodle.org/mod/forum/discuss.php?d=418705 ?
(Edited by Mary Cooch on request of poster - original submission Tuesday, 23 February 2021, 6:02 AM)
Thank you for your reply. You are correct in pointing out that the administrators are not familiar with Moodle.
They have now created 16GB of free space in the system partition. We are still unable to log in.
That is a good idea about restoring the VM to its last snapshot. Thank you for the suggestion.
I think there is definitely an issue with http and https. I get "Mixed Content" errors in the Chrome Developer tools. I allowed Insecure Content in Chrome's site settings, and the "Mixed Content" messages became warnings. But I think we need to change something in config.php.
Regarding the duplicate: Yes, sorry, I kept getting this post flagged as spam, so I created a new account to attempt to post it. It got flagged as spam again and my account was locked. I cannot delete the post now. Apologies.
> They have now created 16GB of free space in the system partition.
What does 'df -h' show now? What is the error message Moodle shows? If it is non-informative, raise https://docs.moodle.org/en/Debugging.
> That is a good idea about restoring the VM to its last snapshot.
Please note that you need only one: Either enlarge the partition OR restore a VM snapshot OR https://docs.moodle.org/en/Site_restore.
'df - h'
shows the attached screenshot dfh.jpg. No error messages were shown after editing config.php. We added the code from https://docs.moodle.org/en/Debugging
//
7. SETTINGS FOR DEVELOPMENT SERVERS ...
define('MDL_PERF', true);
...php admin/cli/purge_caches.php
from inside /opt/public/moodle.
$CFG->wwwroot = 'http://___.___.cn/moodle';
$CFG->wwwroot = 'https://___.___.cn/moodle';
$CFG->wwwroot = 'https://___.___.cn';
php admin/cli/cron.php
from inside /opt/public/moodle
It freed up a lot of space and took about 10 minutes.
/etc/nginx/conf.d/moodle.conf
and the administrator suggested ipv6only=on
could be a problem. He did not edit the file. See screenshot moodle_conf_and_login_index.png/opt/public/moodle/login/index.php
and the administrator suggested $CFG->httpswwwroot/login/index.php
could be a problem. He did not edit the file. See screenshot moodle_conf_and_login_index.png> 'df - h' shows the attached screenshot dfh.jpg.
45 GB available in the partition. That is huge progress.
> No error messages were shown after editing config.php. We added the code from https://docs.moodle.org/en/Debugging
Not good. The four lines following '// Force a debugging mode regardless the settings in the site administration' are known to display debug traces on the screen. Check the logs of web server to be double sure.
> We entered the Moodle database on the server and ran some SQLs to allow Guest Access to his course, make visible all sections, and make visible all modules.
Well, if the patient has been in the OP then the surgeons should take over. This is casual advice from an old general practitioner.
The URL of the site is not something for trial-and-error. The administrator of the site must have given the hosting provider a contract, take the one in the contract. From what I see in the Nginx conf file, it is HTTP (port 80). So stick to it.
> We then looked at /etc/nginx/conf.d/moodle.conf and the administrator suggested ipv6only=on could be a problem. He did not edit the file. See screenshot moodle_conf_and_login_index.png
We then looked at /opt/public/moodle/login/index.php and the administrator suggested $CFG->httpswwwroot/login/index.php could be a problem. He did not edit the file. See screenshot moodle_conf_and_login_index.png
Highly adventurous. I am excited to hear his story. The well-trodden (boring) path I take is named https://docs.moodle.org/en/Nginx.
Oh, wait, Moodle 2.9! Ha, ha, did you check the https://docs.moodle.org/dev/Moodle_2.9_release_notes#Server_requirements ?
> Another thing I noticed is when I use the web VPN, and try to log in, no Moodle cookies are set.
When I use the EasyConnect desktop VPN and log in, I get one cookie, under Cookies:
That I don't know. The network comes before the application. I don't know how to reverse engineer the network layers by looking at how Moodle behaves. This sounds like an aggressive Chinese medicine - not the TCM. My Ayurveda is no match. I retire.
Our Moodle is now fixed.
I don't fully understand why. I was told that the administrators in China changed in config.php:
$CFG->wwwroot = 'http://______.___.cn/moodle';
$CFG->wwwroot = 'http://[ip_address]/moodle';
server_name ______.___.cn;
server_name [ip_address];
A Moodle site must have one URL only and this URL must be correctly configured in $CFG->wwwroot. All users of the site – whether they connect from the same internal network as the server, connect via VPN, or connect via the Internet without VPN – must use the same URL.
$CFG->wwwroot is the URL used in each Moodle page which gets sent to the browser so that the browser can load the files (images, JavaScript, CSS) needed for the page to work.
HTTPS and HTTP URLs are not the same: https://moodle.example.com is not the same URL as http://moodle.example.com. The Mixed Content error can occur if the site has been accessed in the browser with the secure HTTPS URL but $CFG->wwwroot is 'http://…'. This results in the page containing links to non-HTTPS URLs which the browser blocks because only HTTPS URLs are allowed on an HTTPS page.
Thank you for your reply. I have replied to Visvanath Ratnaweera above, but my reply relates to your helpful suggestions too.