Commit 7dee1b7412a597b36ca3ef561b3a667cbb744c96
1 parent
1433e818
Version v0.5.2. Add default plugin config for wordpress sites.
Showing
3 changed files
with
48 additions
and
1 deletions
| ... | ... | @@ -4,7 +4,7 @@ maintainer_email 'sysadmin@chromedia.com' |
| 4 | 4 | license 'Apache License' |
| 5 | 5 | description 'Simplifies setup of Nginx+PHP-FPM in Chromedia.' |
| 6 | 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) |
| 7 | -version '0.5.1' | |
| 7 | +version '0.5.2' | |
| 8 | 8 | |
| 9 | 9 | { |
| 10 | 10 | 'openssl' => '4.4.0', | ... | ... |
| ... | ... | @@ -20,6 +20,49 @@ location ~* ^/<%= @subpath %>.+\.(<%= @static_types.join('|') %>)$ { |
| 20 | 20 | <% @add_statements.each do |ads| -%> |
| 21 | 21 | <%= ads %> |
| 22 | 22 | |
| 23 | +# For Wordpress plugin (if used): Wordfence | |
| 24 | +location ~ ^/<%= @subpath %>wp-content/plugins/wordfence/(tmp|lib) { | |
| 25 | + deny all; | |
| 26 | +} | |
| 27 | + | |
| 28 | +location ~ ^/<%= @subpath %>wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/logs { | |
| 29 | + deny all; | |
| 30 | +} | |
| 31 | + | |
| 32 | +location ~ ^/<%= @subpath %>wp-content/wflogs { | |
| 33 | + deny all; | |
| 34 | +} | |
| 35 | + | |
| 36 | +# For Wordpress plugin (if used): Akismet | |
| 37 | +location ~ ^/<%= @subpath %>wp-content/plugins/akismet/.+\.(png|gif)$ { | |
| 38 | + access_log off; | |
| 39 | + expires max; | |
| 40 | +} | |
| 41 | + | |
| 42 | +location ~ ^/<%= @subpath %>wp-content/plugins/akismet/.+(form|akismet)\.(css|js)$ { | |
| 43 | + access_log off; | |
| 44 | + expires max; | |
| 45 | +} | |
| 46 | + | |
| 47 | +location ~ ^/<%= @subpath %>wp-content/plugins/akismet { | |
| 48 | + deny all; | |
| 49 | +} | |
| 50 | + | |
| 51 | +# For Wordpress plugin (if used): Simple Captcha | |
| 52 | +location ~ ^/<%= @subpath %>wp-content/uploads/wpcf7_captcha/.+\.(jpeg|gif|png)$ { | |
| 53 | + access_log off; | |
| 54 | + expires max; | |
| 55 | +} | |
| 56 | + | |
| 57 | +location ~ ^/<%= @subpath %>wp-content/uploads/wpcf7_captcha { | |
| 58 | + deny all; | |
| 59 | +} | |
| 60 | + | |
| 61 | +# For other Wordpress plugins and stuff: | |
| 62 | +location ~ ^/<%= @subpath %>wp-content/uploads/dlm_uploads { | |
| 63 | + deny all; | |
| 64 | +} | |
| 65 | + | |
| 23 | 66 | <% end -%> |
| 24 | 67 | # Deny access to any files with a .php extension in the uploads directory |
| 25 | 68 | # Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban) | ... | ... |