apache: block access to .git* and .env* files
continuous-integration/drone/push Build was killed
Details
continuous-integration/drone/push Build was killed
Details
This commit is contained in:
parent
1893b6dea5
commit
4c6d30a52c
|
@ -48,15 +48,23 @@ MaxKeepAliveRequests 10
|
||||||
Deny from env=GoAway
|
Deny from env=GoAway
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
<DirectoryMatch "/\.git">
|
||||||
|
# We don't want to let the client know a file exist on the server,
|
||||||
|
# so we return 404 "Not found" instead of 403 "Forbidden".
|
||||||
|
Redirect 404
|
||||||
|
</DirectoryMatch>
|
||||||
|
|
||||||
<Files ~ "\.(inc|bak)$">
|
# File names starting with
|
||||||
Require all denied
|
<FilesMatch "^\.(git|env)">
|
||||||
</Files>
|
Redirect 404
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# File names ending with
|
||||||
|
<FilesMatch "\.(inc|bak)$">
|
||||||
|
Redirect 404
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
<LocationMatch "^/evolinux_fpm_status-.*">
|
<LocationMatch "^/evolinux_fpm_status-.*">
|
||||||
Require all denied
|
Require all denied
|
||||||
</LocationMatch>
|
</LocationMatch>
|
||||||
|
|
||||||
# Block http request on /.git
|
|
||||||
RedirectMatch 404 /\.git
|
|
||||||
|
|
Loading…
Reference in New Issue