harden htaccess
This commit is contained in:
2
abra.sh
2
abra.sh
@ -2,7 +2,7 @@ export PHP_UPLOADS_CONF_VERSION=v4
|
||||
export ENTRYPOINT_CONF_VERSION=v7
|
||||
export ENTRYPOINT_MAILRELAY_CONF_VERSION=v2
|
||||
export MSMTP_CONF_VERSION=v4
|
||||
export HTACCESS_CONF_VERSION=v2
|
||||
export HTACCESS_CONF_VERSION=v3
|
||||
export USERS_CONF_VERSION=v1
|
||||
|
||||
wp() {
|
||||
|
||||
@ -1,3 +1,15 @@
|
||||
# Protect sensitive files from direct access
|
||||
<FilesMatch "^(wp-config\.php|\.htaccess|\.htpasswd|readme\.html|license\.txt)$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
|
||||
# Prevent PHP execution in uploads directory
|
||||
<Directory /var/www/html/wp-content/uploads>
|
||||
<FilesMatch "\.(?i:php|phtml|phar)$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
</Directory>
|
||||
|
||||
{{ if eq (env "MULTISITE") "" -}}
|
||||
# BEGIN WordPress
|
||||
|
||||
|
||||
Reference in New Issue
Block a user