From 34b015dd279364c8a1ab6b8d86f3c8b223000dac Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Wed, 23 Sep 2026 16:24:34 +0800 Subject: [PATCH 1/2] feat(script): add hyperlink function for terminal clickable links add hyperlink function to support rendering clickable links in terminals like VS Code, iTerm2, and macOS Terminal, and apply it to access addresses in start and install messages --- run.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index cf30c338d..c0c9669f5 100755 --- a/run.sh +++ b/run.sh @@ -17,6 +17,9 @@ print_info() { echo -e "${GREEN}[INFO]${NC} $1"; } print_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; } print_error() { echo -e "${RED}[ERROR]${NC} $1"; } +# OSC 8 hyperlink:在 VS Code / Trae / iTerm2 / macOS Terminal 等终端里渲染为可点击链接 +hyperlink() { printf '\e]8;;%s\a%s\e]8;;\a' "$1" "${2:-$1}"; } + # 帮助信息 show_help() { echo -e "${GREEN}CRMEB Docker 管理脚本${NC}" @@ -114,7 +117,7 @@ do_start() { echo "" docker-compose ps echo "" - print_info "访问地址: http://localhost:8011" + print_info "访问地址: $(hyperlink 'http://localhost:8011')" } # 安装(清理数据并启动) @@ -135,7 +138,7 @@ do_install() { echo "" docker-compose ps echo "" - print_info "安装完成!请访问 http://localhost:8011 进行安装向导" + print_info "安装完成!请访问 $(hyperlink 'http://localhost:8011') 进行安装向导" } # 重启容器 From 8a42db50895fe3d29c725e59fa0e9f845f41562c Mon Sep 17 00:00:00 2001 From: sugar1569 Date: Wed, 23 Sep 2026 16:34:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(nginx):=20=E4=BF=AE=E5=A4=8D=E5=AE=BF?= =?UTF-8?q?=E4=B8=BB=E6=9C=BA=E7=AB=AF=E5=8F=A3=E6=98=A0=E5=B0=84=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=E8=B7=B3=E8=BD=AC=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加 absolute_redirect off 配置,并修正后台链接末尾斜杠,解决宿主机 8011 映射容器 80 时跳转丢失端口的问题 --- backend/public/install/templates/step5.php | 2 +- docker/nginx/vhost.conf | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/public/install/templates/step5.php b/backend/public/install/templates/step5.php index 484e47f06..4aa13a4e5 100755 --- a/backend/public/install/templates/step5.php +++ b/backend/public/install/templates/step5.php @@ -35,7 +35,7 @@ $host = $_SERVER['HTTP_HOST']; 进入前台 diff --git a/docker/nginx/vhost.conf b/docker/nginx/vhost.conf index fdad80941..1496d5e02 100644 --- a/docker/nginx/vhost.conf +++ b/docker/nginx/vhost.conf @@ -6,6 +6,9 @@ server { root /var/www/public; + # 端口映射场景(宿主机 8011 -> 容器 80):目录补斜杠 301 使用相对 Location, + # 避免跳转后丢失宿主机映射端口 + absolute_redirect off; location / { # try_files $uri /index.php$is_args$args;