summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Thebo <adrien@puppetlabs.com>2012-03-20 12:15:07 -0700
committerAdrien Thebo <adrien@puppetlabs.com>2012-03-20 12:15:07 -0700
commite27803486119069356995a2e74ac6632fbff5fe8 (patch)
tree9e49dc51d28fd79b5938cd6207e20d15cef5d0aa
parentf32a3925b96aa668b0b7af9b46bc28ba76c7ca36 (diff)
Add suexec and rewrite to gitweb
-rw-r--r--manifests/init.pp16
-rw-r--r--templates/apache-gitweb.conf.erb4
2 files changed, 15 insertions, 5 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index a24af8c..246b28c 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -50,11 +50,17 @@ class gitweb($site_alias, $doc_root, $project_root, $projects_list, $ssl = true)
$apache_port = '80'
}
+ include apache::mod::suexec
+ include apache::mod::rewrite
apache::vhost { $site_alias:
- priority => "10",
- port => $apache_port,
- ssl => $ssl,
- docroot => $doc_root,
- template => "gitweb/apache-gitweb.conf.erb",
+ priority => "10",
+ port => $apache_port,
+ ssl => $ssl,
+ docroot => $doc_root,
+ template => "gitweb/apache-gitweb.conf.erb",
+ require => [
+ Class['apache::mod::rewrite'],
+ Class['apache::mod::suexec'],
+ ],
}
}
diff --git a/templates/apache-gitweb.conf.erb b/templates/apache-gitweb.conf.erb
index a490726..5a11424 100644
--- a/templates/apache-gitweb.conf.erb
+++ b/templates/apache-gitweb.conf.erb
@@ -2,6 +2,10 @@ NameVirtualHost *:<%= port %>
<VirtualHost *:<%= port %>>
ServerName <%= name %>
DocumentRoot <%= docroot %>
+ SuexecUserGroup git git
+
+ RewriteEngine on
+ RewriteRule ^/$ /index.cgi [L]
<% if ssl == true -%>
SSLEngine on