After I was able to manage HTTPS with a self-signed certificate on the Microsoft Application Gateway it was the time to redirect all HTTP communication to HTTPS. For that Microsoft offers only a PowerShell solution, you are not able to do that on the Portal. So in my life, it was the first time I had to use PowerShell. Actually, I was surprised. To write and test a PowerShell script for Azure is relatively easy. But the way to get there is full of traps.
Tag: https
As a request to our client we changed to HTTPS on our server for their Moodle 2.7.1+ instance. I configured the site, but after the change the file picker stopped working.
I have found that Chrome console shows the following:
Failed to load resource: the server responded with a status of 404 (Not Found)
Uncaught ReferenceError: MathJax is not defined
It was definitely true. I tried the link with HTTP and it was fine.
So my solution was to delete the equation from the Toolbar config at Site administration / Plugins / Text editors / Atto HTML editor / Atto toolbar settings.
When cloning a site for testing purposes, there could be a problem with HTTPS within the testing environment. There is a fast way to turn it off in the the database:
update prefix_config set value = 0 where name = 'loginhttps';
Then you can login without HTTPS.