added Drupal

This commit is contained in:
Szekeres Bálint
2018-07-26 13:24:00 +02:00
parent f64fd9d036
commit b622b0fd9a
7 changed files with 74 additions and 17 deletions

View File

@@ -0,0 +1,20 @@
# Drupal: deny private files
location ~ ^/sites/.*/private/ {
deny all;
}
# Drupal: deny php in files
location ~ ^/sites/[^/]+/files/.*\.php$ {
deny all;
}
# Drupal: deny php in vendor
location ~ /vendor/.*\.php$ {
deny all;
}<span ng-if="isLimitReq()">
# Drupal: throttle user functions
location ~ ^/user/(?:login|register|password) {
limit_req zone=login burst=2 nodelay;
try_files $uri /index.php?$query_string;
}</span>

View File

@@ -1,34 +1,34 @@
# allow tinymce
# WordPress: allow TinyMCE
location = /wp-includes/js/tinymce/wp-tinymce.php {
include _php_fastcgi.conf;
}
# wp-content, wp-includes php files
# WordPress: deny wp-content, wp-includes php files
location ~* ^/(?:wp-content|wp-includes)/.*\.php$ {
deny all;
}
# wp-content/uploads nasty stuff
# WordPress: deny wp-content/uploads nasty stuff
location ~* ^/wp-content/uploads/.*\.(?:s?html?|php|js|swf)$ {
deny all;
}
# wp-content/plugins nasty stuff
# WordPress: deny wp-content/plugins nasty stuff
location ~* ^/wp-content/plugins/.*\.(?!{{ extensions.assets }}|{{ extensions.fonts }}|{{ extensions.svg }}|{{ extensions.images }}|{{ extensions.audio }}|{{ extensions.video }}|{{ extensions.docs }}) {
deny all;
}
# disable scripts and styles concat
# WordPress: deny scripts and styles concat
location ~* \/wp-admin\/load-(?:scripts|styles)\.php {
deny all;
}
# WordPress stuff
# WordPress: deny general stuff
location ~* ^/(?:xmlrpc\.php|wp-links-opml\.php|wp-config\.php|wp-config-sample\.php|wp-comments-post\.php|readme\.html|license\.txt)$ {
deny all;
}<span ng-if="isLimitReq()">
# wp-login.php throttle
# WordPress: throttle wp-login.php
location = /wp-login.php {
limit_req zone=login burst=2 nodelay;
include _php_fastcgi.conf;

View File

@@ -80,7 +80,11 @@ server {<!--
✔ unified && ✔ WordPress --><span ng-if="isUnified() && isWordPress()">
<!-- --><ng-include ng-include-tabs="2" src="'templates/conf/_wordpress.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></ng-include></span>
<!-- --><ng-include ng-include-tabs="2" src="'templates/conf/_wordpress.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></ng-include></span><!--
✔ unified && ✔ Drupal --><span ng-if="isUnified() && isDrupal()">
<!-- --><ng-include ng-include-tabs="2" src="'templates/conf/_drupal.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></ng-include></span>
}<!--