Hi everybody!
I have an enviromment that runs moodle in docker container. I tried to add a let's encrypt certificate in the moodle's page but an issue ocors and broke the page. I cannot to log on page also when the certificate is active.
I did try modify the data config.php at line $CFG->wwwroot = 'https:// but not solved.
I did follow others tutorials, any forms, ways, and nothing solved.
My config.php default is this:
<?php // Moodle configuration file
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = 'mariadb';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'bitnami_moodle';
$CFG->dbuser = 'bn_moodle';
$CFG->dbpass = 'password';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => 3306,
'dbsocket' => '',
'dbcollation' => 'utf8mb4_general_ci',
);
if (empty($_SERVER['HTTP_HOST'])) {
$_SERVER['HTTP_HOST'] = '127.0.0.1:80';
}
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
$CFG->wwwroot = 'https://' . $_SERVER['HTTP_HOST'];
} else {
$CFG->wwwroot = 'http://' . $_SERVER['HTTP_HOST'];
};
$CFG->dataroot = '/bitnami/moodle/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 02775;
require_once('/opt/bitnami/moodle' . '/lib/setup.php');
// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!
If someone can a help me, i thank so much.