瀏覽代碼

[Nginx] Deny inc/lib location

andryyy 4 年之前
父節點
當前提交
eec75690e0
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      data/conf/nginx/includes/site-defaults.conf

+ 5 - 0
data/conf/nginx/includes/site-defaults.conf

@@ -88,6 +88,11 @@
     return 301 /SOGo/dav;
     return 301 /SOGo/dav;
   }
   }
 
 
+  location ^~ /inc/lib/ {
+    deny all;
+    return 403;
+  }
+
   location ~ \.php$ {
   location ~ \.php$ {
     try_files $uri =404;
     try_files $uri =404;
     fastcgi_split_path_info ^(.+\.php)(/.+)$;
     fastcgi_split_path_info ^(.+\.php)(/.+)$;