'Can't find variable: M' Javascript console error with SSL

Re: 'Can't find variable: M' Javascript console error with SSL

by Marcos A -
Number of replies: 0
Dear Leon,

Thank you so much, you were absolutely right. I just needed to add all the corrections you pointed out to my "config.php" file, together with "$CFG->reverseproxy = true;", to make it work.

I'm pasting here the complete content of my config.php file for future reference:

<?php // Moodle configuration file

unset($CFG);
global $CFG;
$CFG = new stdClass();

$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'my-db-name';
$CFG->dbuser = 'my-user';
$CFG->dbpass = 'my-password';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => '',
'dbsocket' => '',
'dbcollation' => 'utf8mb4_unicode_ci',
);

$CFG->wwwroot = 'https://moodle.my-domain.com/moodle';
$CFG->dataroot = '/var/moodledata';
$CFG->admin = 'admin';

$CFG->directorypermissions = 0777;

$CFG->sslproxy = true;
$CFG->reverseproxy = true;

require_once(__DIR__ . '/lib/setup.php');

// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!


I hope this helps other users.

Thanks again.

Best wishes,
Marcos
Average of ratings: Useful (1)