From b8a3c602dc98b00ae8efd6ed23017ef98300717c Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sat, 17 Mar 2012 11:20:57 +0000 Subject: - 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 --- modules/bcd/manifests/web.pp | 7 +------ modules/bcd/templates/htaccess | 5 ----- modules/bcd/templates/vhost_bcd.conf | 14 ++++++++++---- 3 files changed, 11 insertions(+), 15 deletions(-) delete mode 100644 modules/bcd/templates/htaccess 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 @@ -/public_html> - AllowOverride All - Options FollowSymlinks - Options Indexes +> + 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 -- cgit v1.2.1