nginxconfig.io/public/templates/conf/_wordpress.conf.html

31 lines
884 B
HTML
Raw Normal View History

2018-01-07 15:30:12 +00:00
# allow tinymce
location = /wp-includes/js/tinymce/wp-tinymce.php {
include _php_fastcgi.conf;
}
# wp-content, wp-includes php files
2018-01-07 21:42:27 +00:00
location ~* ^/(?:wp-content|wp-includes)/.*\.php$ {
2018-01-07 15:30:12 +00:00
deny all;
}
# wp-content/uploads nasty stuff
2018-01-07 21:42:27 +00:00
location ~* ^/wp-content/uploads/.*\.(?:s?html?|php|js|swf)$ {
2018-01-07 15:30:12 +00:00
deny all;
}
# wp-content/plugins nasty stuff
2018-01-07 21:42:27 +00:00
location ~* ^/wp-content/plugins/.*\.(?!{{ extensions.assets }}|{{ extensions.fonts }}|{{ extensions.svg }}|{{ extensions.images }}|{{ extensions.audio }}|{{ extensions.video }}|{{ extensions.docs }}) {
2018-01-07 15:30:12 +00:00
deny all;
}
# WordPress stuff
2018-01-22 20:57:47 +00:00
location ~* ^/(?:xmlrpc\.php|wp-links-opml\.php|wp-config\.php|wp-config-sample\.php|wp-comments-post\.php|readme\.html|license\.txt)$ {
2018-01-07 15:30:12 +00:00
deny all;
2018-02-18 13:02:11 +00:00
}<span ng-if="isLimitReq()">
2018-01-07 15:30:12 +00:00
# wp-login.php throttle
location = /wp-login.php {
limit_req zone=login burst=2 nodelay;
include _php_fastcgi.conf;
2018-01-08 01:49:44 +00:00
}</span>