0

I used the docker-moodle solution offered from ellkcy's repository that used their built docker images. But for some reason I get a 303 redirect loop and the browser fails to load the moodle.

Over my .env I have setup the following settings

# In case of a reverse proxy please change the following setting
# It should have the url that the USER provides into her/his browser.

MOODLE_URL=https://example.com:8082

# Database configuration
MOODLE_DB_USER=moodle
MOODLE_DB_PASSWORD=somepasswd
MOODLE_DB_NAME=moodle

# Default user
MOODLE_ADMIN=admin
MOODLE_ADMIN_PASSWORD=admin
MOODLE_ADMIN_EMAIL=fakepasswd

# Indicate whether runs Behind SSL Proxy (set values in true  by default are set as false)
MOODLE_REVERSE_LB="true"
MOODLE_SSL="true"

#mail settings
MOODLE_EMAIL_TYPE_QMAIL=false # Set true is qmail MTA a used
MOODLE_EMAIL_HOST=mail.example.com

As you can see I have set the MOODLE_REVERSE_LB and the MOODLE_SSL into true value. But does not seem to be the issue.

Dimitrios Desyllas
  • 523
  • 2
  • 10
  • 27

1 Answers1

0

As you mention:

"But does not seem to be the issue."

Well it IS the issue because the MOODLE_REVERSE_LB and the MOODLE_SSL have their values in quotes therefore the configuration may not recognize them as valid booleans.

I would suggest as this link mentions to remove the quotes and the .env should be:

# In case of a reverse proxy please change the following setting
# It should have the url that the USER provides into her/his browser.

MOODLE_URL=https://example.com:8082

# Database configuration
MOODLE_DB_USER=moodle
MOODLE_DB_PASSWORD=somepasswd
MOODLE_DB_NAME=moodle

# Default user
MOODLE_ADMIN=admin
MOODLE_ADMIN_PASSWORD=admin
MOODLE_ADMIN_EMAIL=fakepasswd

# Indicate whether runs Behind SSL Proxy (set values in true  by default are set as false)
MOODLE_REVERSE_LB=true
MOODLE_SSL=true

#mail settings
MOODLE_EMAIL_TYPE_QMAIL=false # Set true is qmail MTA a used
MOODLE_EMAIL_HOST=mail.example.com

Please emphasize into the:

MOODLE_REVERSE_LB=true
MOODLE_SSL=true

As you can see true is unquoted. Also if does not help you you can try to use the 1 value and that will result tho the following .env:

# In case of a reverse proxy please change the following setting
# It should have the url that the USER provides into her/his browser.

MOODLE_URL=https://example.com:8082

# Database configuration
MOODLE_DB_USER=moodle
MOODLE_DB_PASSWORD=somepasswd
MOODLE_DB_NAME=moodle

# Default user
MOODLE_ADMIN=admin
MOODLE_ADMIN_PASSWORD=admin
MOODLE_ADMIN_EMAIL=fakepasswd

# Indicate whether runs Behind SSL Proxy (set values in true  by default are set as false)
MOODLE_REVERSE_LB=1
MOODLE_SSL=1

#mail settings
MOODLE_EMAIL_TYPE_QMAIL=false # Set true is qmail MTA a used
MOODLE_EMAIL_HOST=mail.example.com

As you can see in the MOODLE_REVERSE_LB and in the MOODLE_SSL environmental variables I used the value 1.

Dimitrios Desyllas
  • 523
  • 2
  • 10
  • 27