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
| 1 | +## 0.5.2 - 2016-12-07 | ||
| 2 | +### Added | ||
| 3 | +- Add different default webserver configuration for plugins on Wordpress sites. | ||
| 4 | + | ||
| 1 | ## 0.5.1 - 2016-11-29 | 5 | ## 0.5.1 - 2016-11-29 |
| 2 | ### Fixed | 6 | ### Fixed |
| 3 | - Disable default installation of php5-zip extension if on Ubuntu and not PHP5.6 because there is no such package. | 7 | - Disable default installation of php5-zip extension if on Ubuntu and not PHP5.6 because there is no such package. |
| @@ -4,7 +4,7 @@ maintainer_email 'sysadmin@chromedia.com' | @@ -4,7 +4,7 @@ maintainer_email 'sysadmin@chromedia.com' | ||
| 4 | license 'Apache License' | 4 | license 'Apache License' |
| 5 | description 'Simplifies setup of Nginx+PHP-FPM in Chromedia.' | 5 | description 'Simplifies setup of Nginx+PHP-FPM in Chromedia.' |
| 6 | long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | 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 | 'openssl' => '4.4.0', | 10 | 'openssl' => '4.4.0', |
| @@ -20,6 +20,49 @@ location ~* ^/<%= @subpath %>.+\.(<%= @static_types.join('|') %>)$ { | @@ -20,6 +20,49 @@ location ~* ^/<%= @subpath %>.+\.(<%= @static_types.join('|') %>)$ { | ||
| 20 | <% @add_statements.each do |ads| -%> | 20 | <% @add_statements.each do |ads| -%> |
| 21 | <%= ads %> | 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 | <% end -%> | 66 | <% end -%> |
| 24 | # Deny access to any files with a .php extension in the uploads directory | 67 | # Deny access to any files with a .php extension in the uploads directory |
| 25 | # Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban) | 68 | # Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban) |