diff options
author | Thomas Backlund <tmb@mageia.org> | 2018-09-04 23:26:18 +0259 |
---|---|---|
committer | Thomas Backlund <tmb@mageia.org> | 2018-09-04 23:26:18 +0259 |
commit | 4345e41e97f980021e1443c21875a0b889b474dc (patch) | |
tree | 883b9c323a419dcc981dc65008d095a9e9fb0ec5 /modules/apache | |
parent | 365d70d8ecc93b528a6085a2a37568bb6291109d (diff) | |
download | puppet-4345e41e97f980021e1443c21875a0b889b474dc.tar puppet-4345e41e97f980021e1443c21875a0b889b474dc.tar.gz puppet-4345e41e97f980021e1443c21875a0b889b474dc.tar.bz2 puppet-4345e41e97f980021e1443c21875a0b889b474dc.tar.xz puppet-4345e41e97f980021e1443c21875a0b889b474dc.zip |
apache: protect any hidden files or dirs with 404
Diffstat (limited to 'modules/apache')
-rw-r--r-- | modules/apache/manifests/base.pp | 3 | ||||
-rw-r--r-- | modules/apache/templates/no_hidden_file_dir.conf | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/modules/apache/manifests/base.pp b/modules/apache/manifests/base.pp index a24040e3..b24b740e 100644 --- a/modules/apache/manifests/base.pp +++ b/modules/apache/manifests/base.pp @@ -31,6 +31,9 @@ class apache::base { } apache::config { + "${conf_d}/no_hidden_file_dir.conf": + content => template('apache/no_hidden_file_dir.conf'), + require => Package[$apache::var::pkg_conf]; "${conf_d}/customization.conf": content => template('apache/customization.conf'), require => Package[$apache::var::pkg_conf]; diff --git a/modules/apache/templates/no_hidden_file_dir.conf b/modules/apache/templates/no_hidden_file_dir.conf new file mode 100644 index 00000000..18da03cd --- /dev/null +++ b/modules/apache/templates/no_hidden_file_dir.conf @@ -0,0 +1,4 @@ +# +# dont serve up any hidden files or dirs like .git*, .svn, ... +# +RedirectMatch 404 /\..*$
\ No newline at end of file |