From d95c06da28b89096d3fb547c23ff0d1169687653 Mon Sep 17 00:00:00 2001 From: augushong Date: Mon, 1 Jun 2026 20:17:38 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E5=8A=A8=20nginx=20=E4=BC=AA?= =?UTF-8?q?=E9=9D=99=E6=80=81=E9=85=8D=E7=BD=AE=E5=88=B0=20source/docs=20?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 5 ----- source/docs/nginx-thinkphp.conf | 10 ++++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 nginx.conf create mode 100644 source/docs/nginx-thinkphp.conf diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index f9e0970..0000000 --- a/nginx.conf +++ /dev/null @@ -1,5 +0,0 @@ -location / { - if (!-e $request_filename){ - rewrite ^(.*)$ /index.php?s=$1 last; break; - } -} diff --git a/source/docs/nginx-thinkphp.conf b/source/docs/nginx-thinkphp.conf new file mode 100644 index 0000000..e350af9 --- /dev/null +++ b/source/docs/nginx-thinkphp.conf @@ -0,0 +1,10 @@ +# Nginx 伪静态配置 - ThinkPHP +# 将此段内容添加到 nginx server 配置的 location / 块中即可。 +# 如果使用 source/docker/ 下的 Docker 部署方式,已内置此规则,无需额外配置。 + +location / { + if (!-e $request_filename) { + rewrite ^(.*)$ /index.php?s=$1 last; + break; + } +}