1.在cloudflare 绑定域名
2.cloudflare Tunnels 按教程在服务器部署,并给网站设置转发端口和域名
3.服务器网站目录绑定172.0.0.1:端口(nginx)
4.因nginx内网端口映射非HTTPS,导致协议混乱可能重定向,找到wp-includes/load.php,搜索is_ssl()修改参数
function is_ssl() {if ( isset( $_SERVER['HTTPS'] ) ) {if ( 'on' === strtolower( $_SERVER['HTTPS'] ) ) {return true;}if ( '1' === (string) $_SERVER['HTTPS'] ) {return true;}} elseif ( isset( $_SERVER['SERVER_PORT'] ) && ( '443' === (string) $_SERVER['SERVER_PORT'] ) ) {return true;}return false;}
return false改为return true