我使用了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_SSL
为true
值。但似乎不是问题所在。
答案1
正如你提到的:
“但这似乎不是问题所在。”
嗯是问题是因为MOODLE_REVERSE_LB
和MOODLE_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
。