From 82d98dec4c3ec759c9329eae94aaf982855112f8 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sat, 6 Nov 2010 09:36:03 +0000 Subject: - add a type for vhost redirection to ssl ( for epoll and catdap, once we have https ) --- modules/apache/manifests/init.pp | 14 +++++++++++++- modules/apache/templates/vhost_ssl_redirect.conf | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 modules/apache/templates/vhost_ssl_redirect.conf 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 @@ + + ServerName <%= vhost %> + Redirect / https://<%= vhost %>/ + -- cgit v1.2.1