由于某种原因,当我强制使用 SSL_admin 时,会出现 301 重定向循环。没什么大不了的,我只需单击图标即可加载不安全的元素,但现在我根本无法登录管理区域。
我已经尝试过 SERVER SSL ... 以及其他各种事情
proxy_set_header X_FORWARDED_PROTO https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Url-Scheme $scheme;
proxy_redirect off;
proxy_max_temp_file_size 0;
proxy_pass http://IP:8080;
我尝试过这个但无济于事:
set $no_cache "";
set $cache_uri $request_uri;
# Don't cache uris containing the following segments
if ($request_uri ~* "(sitemap.xml|sitemap.xml.gz|/wp-admin/|/auth-php|/xmlrpc$
set $cache_uri 'null cache';
set $no_cache 1;
}
答案1
我没有检查是否有任何标题适合,而是将其粘贴到 wp-config.php 中
$_SERVER['HTTPS'] = '开启';
也改变了
proxy_set_header 主机 $http_host;
到
proxy_set_header 主机 $host;