summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Thebo <adrien@puppetlabs.com>2012-03-18 23:45:31 -0700
committerAdrien Thebo <adrien@puppetlabs.com>2012-03-18 23:45:44 -0700
commit29e7c0b2921c2a67a020b411d1df11a60a865afb (patch)
treeb0326c5c90a8872016d72589f17b6a1da5d983bb
parent65a90b8a15f81ad5bc66bca2947456de48240eb9 (diff)
Add SSL tune options for gitweb
-rw-r--r--manifests/init.pp22
1 files changed, 18 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index ae241c6..a24af8c 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,5 +1,5 @@
# Class: gitweb
-# Installs gitweb and configures apache to server it.
+# Installs gitweb and configures apache to serve it.
# Parameters:
#
# Actions:
@@ -36,10 +36,24 @@ class gitweb($site_alias, $doc_root, $project_root, $projects_list, $ssl = true)
source => 'puppet:///modules/gitweb/html/index.cgi',
}
- apache::vhost { "${site_alias}_ssl":
+ if $ssl == true {
+ # Listen on port 443 and enable SSL redirection
+
+ apache::vhost::redirect { $site_alias:
+ port => "80",
+ dest => "https://${site_alias}",
+ }
+
+ $apache_port = '443'
+ }
+ else {
+ $apache_port = '80'
+ }
+
+ apache::vhost { $site_alias:
priority => "10",
- port => "443",
- ssl => true,
+ port => $apache_port,
+ ssl => $ssl,
docroot => $doc_root,
template => "gitweb/apache-gitweb.conf.erb",
}