Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Find full tutorial at: http://mikeg.de/project/cloud-nginx-server-wordpress/
- # Deny access to hidden files
- location ~* /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- # Deny access to any files with a .php extension in the uploads directory
- location ~* /(?:uploads|files)/.*\.php$ {
- deny all;
- }
- # Deny access to any files starting with a $ (usually temp files)
- location ~ ~$ {
- deny all;
- }
- # Deny access to system files in root
- location ~ /(\.|wp-config.php|liesmich.html|readme.html|license.txt) {
- deny all;
- }
- # Allow access to favicon and robots.txt
- location = /(favicon\.ico|robots\.txt) {
- allow all;
- log_not_found off;
- access_log off;
- }
- # Only recommended when wordpress comments are disabled
- # location ~ /(\.|wp-config.php|liesmich.html|readme.html|xmlrpc.php|wp-comments-post.php) {
- # return 444
- # }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement