danangds

Wordpress security untuk Nginx

Jul 20th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.56 KB | None | 0 0
  1. # this actually covers every dot file, except what follows below it (ex: CertBot)
  2. location ~ ^/\. {
  3.     deny all;
  4.     access_log off;
  5.         log_not_found off;
  6. }
  7.  
  8. # Deny access to any files with a .php extension in the uploads or files directory
  9. location ~* /(?:uploads|files)/.*\.php$ {
  10.     deny all;
  11.     access_log off;
  12.         log_not_found off;
  13. }
  14.  
  15. # Restrict direct access to cached content
  16. location /wp-content/cache/ {
  17.     deny all;
  18.     access_log off;
  19.         log_not_found off;
  20. }
  21.  
  22. location = /xmlrpc.php {
  23.     deny all;
  24.     access_log off;
  25.     log_not_found off;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment