WordPress登录后台重定向次数过多的解决办法/ WordPress mixed content & redirected too many times

https://cloud.tencent.com/developer/article/1657681

如果你新安装的一个wordpress站点配置https后,再登录wordpress后台,却无法访问后台了[同时也可能会产生页面显示异常,F12会提示内容混杂,mixed content: the page at ” was loaded over https, but requested an insecure script ”. this request has been blocked; the content must be served over https.]。页面提示:将您重定向的次数过多,怎么办呢?

SEOSIR在这里为您分享wordpress网站开启https后台提示将您重定向的次数过多的解决方法如下:

你只需要在网站根目录的php文件wp-config.php开头加入以下代码,即可完美解决此问题了:

$_SERVER['HTTPS'] = 'on';
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);

English Ver.

Under https environments, wordpress may be abnormal while loading resources, chrome inspection [F12] may indicate mixed content: the page at ” was loaded over https, but requested an insecure script ”. this request has been blocked; the content must be served over https.

And the login page shows redirected too many times

this is caused by the https configuration in the wordpress, you can add the following code in the wo-config.php file.

$_SERVER['HTTPS'] = 'on';
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);

复制

Docker log设置和查询

docker logs 命令查询

 docker logs [选项] 容器名称

Name, shorthandDefaultDescription
--detailsShow extra details provided to logs
--follow , -fFollow log output
--sinceShow logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
--tail , -nallNumber of lines to show from the end of the logs
--timestamps , -tShow timestamps
--untilShow logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
logs 选项说明

https://docs.docker.com/engine/reference/commandline/logs/

docker logs设置

默认docker的log是没有上限的,如果日志文件过大会影响容器的运行速度,甚至卡死主机。可以在/etc/docker/daemon.json中加入以下选项来限制日志文件的大小,这样新的容器就会遵循此设置

{
“log-driver”: “json-file”,
“log-opts”: {“max-size”: “20m”, “max-file”: “3”}
}