瀏覽代碼

nginx uploads dir safe config

Logig 7 年之前
父節點
當前提交
9aac6b78fd
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      config/wordpress.conf

+ 3 - 0
config/wordpress.conf

@@ -2,3 +2,6 @@ location / {
   try_files $uri $uri/ /index.php?$args;
 }
 rewrite /wp-admin$ $scheme://$host$uri/ permanent;
+location ~* ^/wp-content/uploads/.*\.php$ {
+  deny all;
+}