commit: 2cf4445f809727b1f4944cf33d086b011d04fe7b
Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo
<DOT> org>
AuthorDate: Thu Aug 20 21:14:11 2015 +0000
Commit: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Thu Aug 20 21:14:11 2015 +0000
URL: https://gitweb.gentoo.org/dev/jmbsvicetto.git/commit/?id=2cf4445f
Add a custom .htaccess file that works with both apache 2.2 and 2.4.
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT>
gentoo.org>
www-apps/dokuwiki/dokuwiki-20150810.ebuild | 4 ++++
www-apps/dokuwiki/files/htaccess | 10 ++++++++++
2 files changed, 14 insertions(+)
diff --git a/www-apps/dokuwiki/dokuwiki-20150810.ebuild
b/www-apps/dokuwiki/dokuwiki-20150810.ebuild
index 7a54790..f86cdc4 100644
--- a/www-apps/dokuwiki/dokuwiki-20150810.ebuild
+++ b/www-apps/dokuwiki/dokuwiki-20150810.ebuild
@@ -52,6 +52,10 @@ src_install() {
insinto "${MY_HTDOCSDIR}"
doins -r .
+ # Copy custom .htaccess that works with both apache 2.2 and 2.4
+ insinto "${MY_HTDOCSDIR}/conf"
+ newins "${FILESDIR}/htaccess" ".htaccess"
+
for x in $(find data/ -not -name '.htaccess'); do
webapp_serverowned "${MY_HTDOCSDIR}"/${x}
done
diff --git a/www-apps/dokuwiki/files/htaccess b/www-apps/dokuwiki/files/htaccess
new file mode 100644
index 0000000..18532a2
--- /dev/null
+++ b/www-apps/dokuwiki/files/htaccess
@@ -0,0 +1,10 @@
+# Apache 2.4
+<IfModule mod_authz_core.c>
+ Require all denied
+</IfModule>
+
+# Apache 2.2
+<IfModule !mod_authz_core.c>
+ Order Allow,Deny
+ Deny from all
+</IfModule>