I am trying to install moodle 3.8.1 on a Centos 7 behind a loadbalancer (haproxy) and i dont know how to solve this problem it doesnt let me input the password for the admin user and the forums doest have any information on this.
503, Service Unavailable, means a configuration issue between HAproxy and Moodle.
Would you like to share a bit more info here? If you'll share snippets of your configurations, please replace sensitive info there.
I can't quickly setup an env like yours so I'm not able to test what described below .
On the Moodle side, besides $CFG->sslproxy, you should add $CFG->reverseproxy = true;. Besides, I'd suggest to use an actual boolean value instead of 1.
That should fix your issue.
On the HAproxy side, it seems fine unless some doubts below:
# SSL Security
http-response set-header X-Frame-Options SAMEORIGIN if https_in
http-response set-header X-Content-Type-Options nosniff if https_in
rsprep ^Set-Cookie:\ (.*) Set-Cookie:\ \1;\ Secure if https_in
server moodle1 172.17.3.167:80 source moodle.xxxxx.xxx.xx cookie web03 downinter 1s port 80 maxconn 1000 on-error mark-down check
server moodle2 172.17.3.168:80 source moodle.xxxxx.xxx.xx cookie web03 downinter 1s port 80 maxconn 1000 on-error mark-down check
- Please double check HTTP Headers conf and the usage of the Moodle instance to prevent future issues (including Mobile App and LTI): https://docs.moodle.org/38/en/Moodle_app_guide_for_admins#Frame_embedding, Moodle is able to manage X-Frame-Options by its own
- Secure cookies can be manage by Moodle: https://docs.moodle.org/38/en/HTTP_security#Secure_cookies_only
- It looks like moodle1|2 and web03 should be changed unless those settings come from the anonym process
Thanks for the response Matteo,
I changed the boolean of the $CFG->reverseproxy = true;, but nothing changed
mmhhh... let's start with the basics: does the Moodle installation actually work w/o HAproxy?
Please, comment out related $CFG proxy settings and set $CFG->wwwroot to the actual plain IP address of one of the two nodes and browse it with your browser.