具有反向代理结果 ERR_TOO_MANY_REDIRECTS 的 Moodle 3.7 Apache。
我有一个带有以下 vhosts 文件的 SSL 站点:
<VirtualHost *:80>
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName moodle.site.com:443
SSLEngine on
SecAuditEngine On
RewriteEngine On
ProxyPreserveHost On
ProxyPass / http://101.102.103.104:80/
ProxyPassReverse / http://101.102.103.104:80/
</VirtualHost>
</IfModule>
我还将所有 80 个端口请求重定向到 SSL 端口。
命令
curl -I https://moodle.site.com/
结果:
HTTP/1.1 303 See Other
Date: Fri, 09 Aug 2019 19:13:33 GMT
Server: Apache/2.4.38 (Debian)
Strict-Transport-Security: max-age=15768000; includeSubDomains
Location: https://moodle.site.com
Content-Language: en
Content-Type: text/html; charset=UTF-8
在 Moodle config.php 我有:
$CFG->wwwroot = 'https://moodle.site.com';
$CFG->reverseproxy = true;
$CFG->sslproxy = 1;
知道为什么当我尝试打开https://moodle.site.com URL 时在 Google Chrome 中出现“ERR_TOO_MANY_REDIRECTS”错误吗?