Advertisement
dexterslab

globals/restrictions.conf

Mar 15th, 2013
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.79 KB | None | 0 0
  1. # Global restrictions configuration file.
  2. # Designed to be included in any server {} block.</p>
  3. location = /favicon.ico {
  4.     log_not_found off;
  5.     access_log off;
  6. }
  7.  
  8. # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
  9. location ~ /\. {
  10.     deny all;
  11. }
  12.  
  13. # Deny access to any files with a .php extension in the uploads directory
  14. location ~* /uploads/.*\.php$ {
  15.     deny all;
  16. }
  17.  
  18. # Deny access to any files with a .php extension in the uploads directory for multisite
  19. location ~* /files/.*\.php$ {
  20.     deny all;
  21. }
  22.  
  23. # Since version 2.5.7, Akismet introduced a new .htaccess file to block direct access to php files
  24. # Ref: http://wordpress.org/extend/plugins/akismet/changelog/
  25. #location ~* /akismet/.*\.php$ {
  26. #    allow 127.0.0.1;
  27. #    deny all;
  28. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement