From 0df30e0dfcaa9be4511296e07aa48dcf3d98f4d8 Mon Sep 17 00:00:00 2001 From: thomashaw Date: Thu, 22 Mar 2018 17:45:50 +0000 Subject: [PATCH] WiP gitlist uses apache 2.2 style .htaccess which is incompatible with stretch's apache 2.4 --- .../unix/webapp/gitlist_040/manifests/install.pp | 7 +++++++ .../unix/webapp/gitlist_040/templates/.htaccess.erb | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 modules/vulnerabilities/unix/webapp/gitlist_040/templates/.htaccess.erb diff --git a/modules/vulnerabilities/unix/webapp/gitlist_040/manifests/install.pp b/modules/vulnerabilities/unix/webapp/gitlist_040/manifests/install.pp index 59c7bf0d1..5bde69e20 100644 --- a/modules/vulnerabilities/unix/webapp/gitlist_040/manifests/install.pp +++ b/modules/vulnerabilities/unix/webapp/gitlist_040/manifests/install.pp @@ -29,4 +29,11 @@ class gitlist_040::install { mode => '777', } + # TODO: This should only be run on apache_kali_compat + file { '/var/www/gitlist/.htaccess': + require => Exec['unpack-gitlist'], + ensure => present, + content => template('gitlist_040/.htaccess.erb') + } + } \ No newline at end of file diff --git a/modules/vulnerabilities/unix/webapp/gitlist_040/templates/.htaccess.erb b/modules/vulnerabilities/unix/webapp/gitlist_040/templates/.htaccess.erb new file mode 100644 index 000000000..61e7174c9 --- /dev/null +++ b/modules/vulnerabilities/unix/webapp/gitlist_040/templates/.htaccess.erb @@ -0,0 +1,12 @@ + + Options -MultiViews + + RewriteEngine On + #RewriteBase /path/to/gitlist/ + + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ index.php [L,NC] + + + Require all granted +