From 8862d013e648311debf25b4450c278d74afcde97 Mon Sep 17 00:00:00 2001 From: Gary Larizza Date: Fri, 15 Jul 2011 15:27:39 -0700 Subject: [PATCH] Commit apache::vhost::proxy Manifest --- manifests/vhost/proxy.pp | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 manifests/vhost/proxy.pp diff --git a/manifests/vhost/proxy.pp b/manifests/vhost/proxy.pp new file mode 100644 index 0000000..55b806d --- /dev/null +++ b/manifests/vhost/proxy.pp @@ -0,0 +1,50 @@ +# Define: apache::vhost::proxy +# +# Configures an apache vhost that will only proxy requests +# +# Parameters: +# * $port: +# The port on which the vhost will respond +# * $dest: +# URI that the requests will be proxied for +# - $priority +# - $template -- the template to use for the vhost +# - $vhost_name - the name to use for the vhost, defaults to '*' +# +# Actions: +# * Install Apache Virtual Host +# +# Requires: +# +# Sample Usage: +# +define apache::vhost::proxy ( + $port, + $dest, + $priority = '10', + $template = "apache/vhost-proxy.conf.erb", + $servername = '', + $serveraliases = '', + $ssl = false, + $vhost_name = '*' + ) { + + include apache + + $srvname = $name + + if $ssl == true { + include apache::ssl + } + + file {"${apache::params::vdir}/${priority}-${name}": + content => template($template), + owner => 'root', + group => 'root', + mode => '755', + require => Package['httpd'], + notify => Service['httpd'], + } + + +}