Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Moodle https error

Hey everyone. I'm hoping that others have had this problem too, and that this post will help them solve it.

I know, some people hate moodle, but I have a small army of teachers that love it. >>face palm<<

After updating to server 5.0.4 on my testing machine, my moodle server stopped working.


I searched around on the internet for a bit but didn't look too far into it, but now I'm pretty much ready to upgrade to the newest version of server. All seems to be well with the testing machine! I hunted around for the issue of this reverse proxy problem. OS X Server 5.0.4 appears to play with the ports when you run a secure website. When trying to log into my moodle server, I get an error that says something like. For security reasons only https connections are allowed, sorry.

Even though there's a nice little lock showing that indeed it is a securely connected ...connection.


Wiretap to the rescue! Moodle appears to be detecting that server is doing some proxy magic on port 34543.


I'm hoping that this post helps others as it took me a long time with the google machine to find the solution. In your moodle config.php file, located in the root directory of your moodle site, you need to have moodle see that there's an sslproxy thing happening. Do this by adding the following line exactly,

$CFG->sslproxy=true;


This completely solved my moodle issues! The error vanished and I can access my moodle site again.


Here's a copy of my config file (minus my server addresses). It includes the sslproxy=true; line.

Enjoy, and I hope google finds this and directs it to others with similar issues!



<?php // Moodle configuration file



unset($CFG);

global $CFG;

$CFG = new stdClass();



$CFG->dbtype = 'mysqli';

$CFG->dblibrary = 'native';

$CFG->dbhost = '192.168.0.3';

$CFG->dbname = 'moodle';

$CFG->dbuser = '*****';

$CFG->dbpass = '*****';

$CFG->prefix = 'mdl_';

$CFG->dboptions = array (

'dbpersist' => 0,

'dbport' => '',

'dbsocket' => '',

);



$CFG->wwwroot = 'https://server.example.com/moodle';

$CFG->dataroot = '/Volumes/UDATA/moodledata';

$CFG->admin = 'admin';

$CFG->sslproxy = true;

$CFG->directorypermissions = 0755;



require_once(dirname(__FILE__) . '/lib/setup.php');



// There is no php closing tag in this file,

// it is intentional because it prevents trailing whitespace problems!

Posted on Oct 6, 2015 1:42 PM

Reply
2 replies

Dec 30, 2015 2:56 PM in response to gracoat

I had the same issue and after I added $CFG->sslproxy=true; I get the following message now:


Config table does not contain version, can not continue, sorry.

More information about this error

It is usually not possible to recover from errors triggered during installation, you may need to create a new database or use a different database prefix if you want to retry the installation.

So i looked at my version.php file and this what I have $version = 2015111601.00 which is the same as version in the database


My config:


<?php // Moodle configuration file



unset($CFG);

global $CFG;

$CFG = new stdClass();



$CFG->dbtype = 'mssql';

$CFG->dblibrary = 'native';

$CFG->dbhost = '****';

$CFG->dbname = '****';

$CFG->dbuser = '****';

$CFG->dbpass = '****';

$CFG->prefix = 'mdl_';

$CFG->dboptions = array (

'dbpersist' => 0,

'dbsocket' => 0,

);



$CFG->wwwroot = 'https://mysite.com/lms';

$CFG->dataroot = '\\\\192.168.120.50\\nas\\TEST\\lms\\moodledata';

$CFG->admin = 'admin';

$CFG->sslproxy = true;



$CFG->directorypermissions = 0777;



$CFG->passwordsaltmain = '}@F3~dIKB0p7y2YR-FLxe#-fhw~hD';



require_once(dirname(__FILE__) . '/lib/setup.php');



// There is no php closing tag in this file,

// it is intentional because it prevents trailing whitespace problems!

Moodle https error

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.