openwrt luci 页面无法访问 问题排查

说明:
本文适用于某些使用了 Argon 主题的 OpenWrt 用户

问题概况

访问luci登录页, 刷新半天后显示为白屏
image

但是手机端测试, 却又能访问

故障排查

1. 抓包: 发现问题

使用 tcpdump 抓包, 发现类似 403 Forbidden 字样报文

2. 查错: 网络搜索

直接互联网搜索 luci 403 找到类似问题

3. 解决: 更换主题

  1. 首先使用 http://你的路由器IP/cgi-bin/luci/?luci_username=root&luci_password=你的路由器密码 进入路由器
  2. 把主题换成其它可用的, 比如 bootstrap

其它解决办法 👻 未做验证

uci法

ssh登录设备后执行如下命令

uci set argon.@global[0].bing_background=0
uci commit argon

修改配置文件法

luci的配置文件在 /etc/config/luci
image

hosts文件屏蔽"bing.com"法

据说在 客户端 或者 路由器端 屏蔽均可

echo 255.255.255.255 www.bing.com >> /etc/hosts

修改主题文件法

修改 Argon 主题的 sysauth.htm 文件(位置自行查找, 可能在 /usr/lib/lua/luci/view/themes/argon)

// local bingUrl 			= "http://www.bing.com/"
// 改成你本地可以访问的bing URL
local bingUrl 			= "http://www4.bing.com/"

上传默认背景法

在 luci 管理界面中的 Argon主题设置 功能页上传默认背景图片

posted @ 2023-03-17 11:25  tfel-ypoc  阅读(4843)  评论(0编辑  收藏  举报