I'm in the process of migrating Moodle to a different machine. I'll start with a bit of background about the infrastructure (I’m not sure it’s relevant, but better too much detail than not enough) before going on the describe the problem.
Before the migration Moodle ran in Docker containers and served a HTTPS site directly to the users. Now Moodle (3.8) runs inside Podman containers (supplied by Bitnami) and has a proxy in front of it. To get this to work I had to set the wwwroot and enable the following to options in config.php.
- $CFG->reverseproxy = true;
- $CFG->sslproxy = true;
The site loads fine and can connect to the database. However, when I try to login I get the message “Invalid login, try again.” (or something similar, I’ve translated this from Dutch). This error isn’t caused by a wrong username/password. I’m positive I use a correct username and password. The users are present in the database (in the mdl_user table).
The self-register form works perfectly, I can create a new account. When I click the confirmation link in the email I received, I can access the site. However, when I log out and try to log in again, I get the same error message.
Does anyone have any idea what’s going on or how I can start to figure the problem out? I’m far from familiar with Moodle, so if I’ve overlooked some obvious debugging step I apologize. The bug isn’t likely to be caused by the way I performed the migration. I performed exactly the same steps on my local machine, except for the proxy, and got a fully functioning site as a result.