Browse Source

add nginx rewrite

dongweizhuang 5 years ago
parent
commit
5a975a0388
1 changed files with 3 additions and 3 deletions
  1. 3 3
      vhost.sh

+ 3 - 3
vhost.sh

@@ -618,7 +618,7 @@ server {
     expires 7d;
     access_log off;
   }
-  location ~ /\.ht {
+  location ~ /(\.user\.ini|\.ht|\.git|\.svn|\.project|LICENSE|README\.md) {
     deny all;
   }
   ${NGX_CONF}
@@ -714,7 +714,7 @@ server {
     expires 7d;
     access_log off;
   }
-  location ~ /\.ht {
+  location ~ /(\.user\.ini|\.ht|\.git|\.svn|\.project|LICENSE|README\.md) {
     deny all;
   }
 }
@@ -903,7 +903,7 @@ server {
     expires 7d;
     access_log off;
   }
-  location ~ /\.ht {
+  location ~ /(\.user\.ini|\.ht|\.git|\.svn|\.project|LICENSE|README\.md) {
     deny all;
   }
 }