Skip to main content

Posts

Showing posts from June, 2021

Moodle Enable HTTPS with a proxy or an ELB

 If you are converting Moodle site from HTTP to HTTPS or setting up from the scratch, it will be a bit tricky as I also experienced. By the way, I'm not going to talk about how to install the SSL certificate here. This is only about the Moodle configurations you have to do after that. There are two ways you can do this. 1. Enable HTTPS using a proxy or an ELB If you have this setup, then again we need to change the config.php as below. //Change the URL to https $CFG->wwwroot = ' https ://my.moodle.site.edu'; //Add the following line $CFG->sslproxy = true; If the SSL proxy configuration is not enabled, your browser will keep trying to redirect.  You should enable this configuration if you have SSL termination from a proxy or a load balancer. I tried this with an AWS ALB (Application Load Balancer).  If you don't change the config, it will fail to load the styles and Javascript. 2. Enable HTTPS in Apache server This is if HTTPS is enabled in the Apache server on...