From 270f820de6462da4485f3a02867a0f2eb15ae878 Mon Sep 17 00:00:00 2001 From: Tianshuai Gao Date: Fri, 10 Jan 2025 10:01:12 +0800 Subject: [PATCH] nginx: 301 the "/" path to "/cgi-bin/luci/" This change will prevent the blank "LuCI - Lua Configuration Interface" screen from being displayed for the first time when accessing luci via a url like 192.168.1.1 Signed-off-by: Tianshuai Gao --- net/nginx/Makefile | 2 +- net/nginx/files-luci-support/luci.locations | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/net/nginx/Makefile b/net/nginx/Makefile index a96cc70e88816..c9fa897dbe7af 100644 --- a/net/nginx/Makefile +++ b/net/nginx/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nginx PKG_VERSION:=1.26.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://nginx.org/download/ diff --git a/net/nginx/files-luci-support/luci.locations b/net/nginx/files-luci-support/luci.locations index 374ee5d9fc7e4..f69917d289206 100644 --- a/net/nginx/files-luci-support/luci.locations +++ b/net/nginx/files-luci-support/luci.locations @@ -1,3 +1,7 @@ +location =/ { + return 301 /cgi-bin/luci/; +} + location /cgi-bin/luci { index index.html; include uwsgi_params;