Forráskód Böngészése

禁止访问任何 .conf 文件

xf 2 napja
szülő
commit
9e2c17521b
1 módosított fájl, 6 hozzáadás és 0 törlés
  1. 6 0
      nginx.conf

+ 6 - 0
nginx.conf

@@ -26,6 +26,12 @@ http {
         listen       80;
         server_name  localhost;
 
+        # 禁止访问任何 .conf 文件
+        location ~ \.conf$ {
+            deny all;
+            return 403;
+        }
+
         location /index.html {
             root       /usr/share/nginx/html;
             add_header Cache-Control "no-cache, no-store";