From 8ca8e7a61c0ff00cd88a2c7add253c88a421fd11 Mon Sep 17 00:00:00 2001 From: kkfluous Date: Fri, 5 Jun 2026 16:43:33 +0800 Subject: [PATCH] fix: serve dist at nginx root, remove /lnbox/ redirect in container Upstream proxy strips /lnbox/ prefix via proxy_pass, so container nginx receives requests at /. Old config caused infinite redirect loop. --- Dockerfile | 9 +++------ docker-compose.yml | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index ae51f2e..33cbeff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,13 +19,10 @@ COPY --from=0 /usr/src/app/dist /usr/share/nginx/html/lnbox RUN echo "server {\ listen 80;\ server_name localhost;\ + root /usr/share/nginx/html/lnbox;\ + index index.html;\ location / {\ - return 301 /lnbox/;\ - }\ - location /lnbox {\ - alias /usr/share/nginx/html/lnbox;\ - index index.html index.htm;\ - try_files \$uri \$uri/ /lnbox/index.html;\ + try_files \$uri \$uri/ /index.html;\ }\ }" > /etc/nginx/conf.d/default.conf diff --git a/docker-compose.yml b/docker-compose.yml index 30ceb2d..4877f06 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: lnbox: image: harbor.lnh2e.com/lingniu-v1/lnbox:main-0.0.0 ports: - - "8029:80" + - "8030:80" deploy: replicas: 1 restart_policy: