Ellakcy moodle-compose repo:使用了解决方案,但我得到了 303 重定向循环

Ellakcy moodle-compose repo:使用了解决方案,但我得到了 303 重定向循环

我使用了ellkcy 的存储库使用他们构建的docker图片。但由于某种原因,我得到了 303 重定向循环并且浏览器无法加载 moodle。

.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="true"
MOODLE_SSL="true"

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

如您所见,我已将MOODLE_REVERSE_LB和设置MOODLE_SSLtrue值。但似乎不是问题所在。

答案1

正如你提到的:

“但这似乎不是问题所在。”

问题是因为MOODLE_REVERSE_LBMOODLE_SSL的值在引号中,因此配置可能无法将它们识别为有效的布尔值。

我建议这样关联提到删除引号,应该.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=true
MOODLE_SSL=true

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

请强调:

MOODLE_REVERSE_LB=true
MOODLE_SSL=true

正如你所见,事实是未引用。如果这对您没有帮助,您可以尝试使用该1值,结果如下.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

MOODLE_REVERSE_LB正如您在和环境变量中看到的,MOODLE_SSL我使用了值1

相关内容