소스 검색

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;
+}