From 8ab720dc2e7f931c62993391bbb5beff1f64d24c Mon Sep 17 00:00:00 2001 From: Aaron Date: Tue, 4 Feb 2025 00:33:51 +0800 Subject: [PATCH] update --- builds/nginx.conf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/builds/nginx.conf b/builds/nginx.conf index f451236..7c83b63 100644 --- a/builds/nginx.conf +++ b/builds/nginx.conf @@ -6,16 +6,19 @@ server { client_max_body_size 100m; client_header_buffer_size 1m; + # 处理根路径 location / { - root /etc/nginx/html/ocr-server-admin/; - index index.html; + root /etc/nginx/html/ocr-server-admin/; + index index.html; } - location /index { - root /etc/nginx/html/ocr-server-admin/; - index index.html; + # 处理 /index 路径 + location = /index { + root /etc/nginx/html/ocr-server-admin/; + try_files /index.html =404; } + # 处理其他静态文件 location ~* \.html$ { root /etc/nginx/html/ocr-server-admin/; }