From d5178fc58e81362bf8ab6e016733be5ced4e1828 Mon Sep 17 00:00:00 2001 From: lawxen Date: Wed, 12 Jun 2024 15:08:31 +0800 Subject: [PATCH] path return --- Dockerfile-subpath | 1 + default.conf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile-subpath b/Dockerfile-subpath index d3b1d6e..f2952a7 100644 --- a/Dockerfile-subpath +++ b/Dockerfile-subpath @@ -1,5 +1,6 @@ FROM nginx RUN { \ + apt intall -y vim; \ echo 'server_tokens off;'; \ echo 'client_max_body_size 100m;'; \ } > /etc/nginx/conf.d/server-token-off.conf diff --git a/default.conf b/default.conf index 6359ac0..eb4a739 100644 --- a/default.conf +++ b/default.conf @@ -6,7 +6,7 @@ server { #access_log /var/log/nginx/host.access.log main; location = /fake-subdir-placeholder { - return 301 https://$host/fake-subdir-placeholder/; + rewrite ^(.*) https://$host/fake-subdir-placeholder/ permanent; } location / {