diff options
author | Michael Scherer <misc@mageia.org> | 2012-03-17 11:20:57 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2012-03-17 11:20:57 +0000 |
commit | b8a3c602dc98b00ae8efd6ed23017ef98300717c (patch) | |
tree | b189bb3b6ec9eca812872ef492d2a7b74f8cd532 /modules/bcd | |
parent | 8e59de9fb0fc5f3cc2f88040199c236f396b23bb (diff) | |
download | puppet-b8a3c602dc98b00ae8efd6ed23017ef98300717c.tar puppet-b8a3c602dc98b00ae8efd6ed23017ef98300717c.tar.gz puppet-b8a3c602dc98b00ae8efd6ed23017ef98300717c.tar.bz2 puppet-b8a3c602dc98b00ae8efd6ed23017ef98300717c.tar.xz puppet-b8a3c602dc98b00ae8efd6ed23017ef98300717c.zip |
- merge htaccess with main apache file
- show a meaningfull error message
- do not put .htpasswd file into webroot, so no need to prevent download
- reuse existing variable
Diffstat (limited to 'modules/bcd')
-rw-r--r-- | modules/bcd/manifests/web.pp | 7 | ||||
-rw-r--r-- | modules/bcd/templates/htaccess | 5 | ||||
-rw-r--r-- | modules/bcd/templates/vhost_bcd.conf | 14 |
3 files changed, 11 insertions, 15 deletions
diff --git a/modules/bcd/manifests/web.pp b/modules/bcd/manifests/web.pp index 5e75191e..b7fb125a 100644 --- a/modules/bcd/manifests/web.pp +++ b/modules/bcd/manifests/web.pp @@ -8,14 +8,9 @@ class bcd::web { content => template('bcd/vhost_bcd.conf'), } - # TODO should be merged with main file - file { "$bcd_home/public_html/.htaccess": - content => template('bcd/htaccess') - } - # not sure if that's useful, since the file is public and trivially # bruteforced - file { "$bcd_home/public_html/.htpasswd": + file { "$bcd_home/htpasswd": content => template('bcd/htpasswd') } } diff --git a/modules/bcd/templates/htaccess b/modules/bcd/templates/htaccess deleted file mode 100644 index 4c4cbfb3..00000000 --- a/modules/bcd/templates/htaccess +++ /dev/null @@ -1,5 +0,0 @@ -AuthUserFile <%= bcd_home %>/public_html/.htpasswd -AuthGroupFile /dev/null -AuthName "Restricted access! For the password, please contact the QA team ( http://wiki.mageia.org/en/QA_Team )" -AuthType Basic -require valid-user diff --git a/modules/bcd/templates/vhost_bcd.conf b/modules/bcd/templates/vhost_bcd.conf index 93d5c00c..320e783a 100644 --- a/modules/bcd/templates/vhost_bcd.conf +++ b/modules/bcd/templates/vhost_bcd.conf @@ -1,5 +1,11 @@ -<Directory <%= bcd_home %>/public_html> - AllowOverride All - Options FollowSymlinks - Options Indexes +<Directory <%= location %>> + AuthUserFile <%= bcd_home %>/htpasswd + AuthGroupFile /dev/null + AuthName "QA test isos, restricted access" + ErrorDocument 403 "For the password, please contact the QA team ( http://wiki.mageia.org/en/QA_Team )" + + AuthType Basic + require valid-userOptions FollowSymlinks + + Options Indexes </Directory> |