mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-09-19 01:46:59 +08:00
added Drupal
This commit is contained in:
20
public/templates/conf/_drupal.conf.html
Normal file
20
public/templates/conf/_drupal.conf.html
Normal 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>
|
Reference in New Issue
Block a user