aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/bcd/manifests/init.pp16
-rw-r--r--modules/bcd/templates/.htaccess5
-rw-r--r--modules/bcd/templates/.htpasswd2
-rw-r--r--modules/bcd/templates/vhost_bcd.conf2
4 files changed, 25 insertions, 0 deletions
diff --git a/modules/bcd/manifests/init.pp b/modules/bcd/manifests/init.pp
index bba103f2..e4f4cd45 100644
--- a/modules/bcd/manifests/init.pp
+++ b/modules/bcd/manifests/init.pp
@@ -43,6 +43,22 @@ class bcd {
location => "$bcd_home/public_html",
content => template('bcd/vhost_bcd.conf'),
}
+ file {".htaccess":
+ path => "$bcd_home/public_html/",
+ ensure => present,
+ owner => bcd,
+ group => bcd,
+ mode => 755,
+ content => template("bcd/.htaccess")
+ }
+ file {".htpasswd":
+ path => "$bcd_home/public_html/",
+ ensure => present,
+ owner => bcd,
+ group => bcd,
+ mode => 755,
+ content => template("bcd/.htpasswd")
+ }
}
class rsync inherits base {
diff --git a/modules/bcd/templates/.htaccess b/modules/bcd/templates/.htaccess
new file mode 100644
index 00000000..63631312
--- /dev/null
+++ b/modules/bcd/templates/.htaccess
@@ -0,0 +1,5 @@
+AuthUserFile <%= bcd_home %>/public_html/.htpasswd
+AuthGroupFile /dev/null
+AuthName "Restricted acces! For a RSYNC account, please mail your 'Mageia Identity' login to dams@mageia.org"
+AuthType Basic
+require valid-user
diff --git a/modules/bcd/templates/.htpasswd b/modules/bcd/templates/.htpasswd
new file mode 100644
index 00000000..457a13a7
--- /dev/null
+++ b/modules/bcd/templates/.htpasswd
@@ -0,0 +1,2 @@
+valstar:42Mx5EawIqVTY
+
diff --git a/modules/bcd/templates/vhost_bcd.conf b/modules/bcd/templates/vhost_bcd.conf
index ceedb418..93d5c00c 100644
--- a/modules/bcd/templates/vhost_bcd.conf
+++ b/modules/bcd/templates/vhost_bcd.conf
@@ -1,3 +1,5 @@
<Directory <%= bcd_home %>/public_html>
+ AllowOverride All
+ Options FollowSymlinks
Options Indexes
</Directory>