aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2010-11-06 09:36:03 +0000
committerMichael Scherer <misc@mageia.org>2010-11-06 09:36:03 +0000
commit82d98dec4c3ec759c9329eae94aaf982855112f8 (patch)
treef8b9221d65d313a5f210c3625c1978f03e59f789 /modules
parentbb6b6147c361af5972aad7e6fc95272f50427319 (diff)
downloadpuppet-82d98dec4c3ec759c9329eae94aaf982855112f8.tar
puppet-82d98dec4c3ec759c9329eae94aaf982855112f8.tar.gz
puppet-82d98dec4c3ec759c9329eae94aaf982855112f8.tar.bz2
puppet-82d98dec4c3ec759c9329eae94aaf982855112f8.tar.xz
puppet-82d98dec4c3ec759c9329eae94aaf982855112f8.zip
- add a type for vhost redirection to ssl ( for epoll and catdap, once we have https )
Diffstat (limited to 'modules')
-rw-r--r--modules/apache/manifests/init.pp14
-rw-r--r--modules/apache/templates/vhost_ssl_redirect.conf4
2 files changed, 17 insertions, 1 deletions
diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp
index 2bbf03f4..403948a0 100644
--- a/modules/apache/manifests/init.pp
+++ b/modules/apache/manifests/init.pp
@@ -54,7 +54,19 @@ class apache {
}
}
- define vhost_catalyst_app($script, $process = 4, $force_ssl = false) {
+ define vhost_redirect_ssl() {
+ file { "redirect_ssl_$name.conf":
+ path => "/etc/httpd/conf/vhosts.d/redirect_ssl_$name.conf",
+ ensure => "present",
+ owner => root,
+ group => root,
+ mode => 644,
+ notify => Service['apache'],
+ content => template("apache/vhost_ssl_redirect.conf")
+ }
+ }
+
+ define vhost_catalyst_app($script, $process = 4, $use_ssl = false) {
include apache::mod_fastcgi
diff --git a/modules/apache/templates/vhost_ssl_redirect.conf b/modules/apache/templates/vhost_ssl_redirect.conf
new file mode 100644
index 00000000..ad7996d6
--- /dev/null
+++ b/modules/apache/templates/vhost_ssl_redirect.conf
@@ -0,0 +1,4 @@
+<VirtualHost *:80>
+ ServerName <%= vhost %>
+ Redirect / https://<%= vhost %>/
+</VirtualHost>