From 615e1fc04caac95a6188512e8a8aa0926217938b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A6=83=E6=98=8C=E6=B3=A2?= Date: Thu, 7 Apr 2022 09:27:50 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=B0=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 nginx.conf diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..584311d --- /dev/null +++ b/nginx.conf @@ -0,0 +1,23 @@ +server { + listen 80; + listen [::]:80; + server_name localhost default_server; + client_max_body_size 200m; + + location / { + if ($request_filename ~* .*\.(?:htm|html)$) { + add_header Cache-Control "no-store"; + } + root /usr/share/nginx/html; + try_files $uri @index ; + } + + location @index { + add_header Cache-Control "no-store" ; + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri/index.html /index.html; + } + + error_page 405 =200 $uri; +}