]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 3rdparty/modules/apache/manifests/fastcgi/server.pp
add Openstack modules to 3rdparty
[dsa-puppet.git] / 3rdparty / modules / apache / manifests / fastcgi / server.pp
diff --git a/3rdparty/modules/apache/manifests/fastcgi/server.pp b/3rdparty/modules/apache/manifests/fastcgi/server.pp
new file mode 100644 (file)
index 0000000..afc7c88
--- /dev/null
@@ -0,0 +1,24 @@
+define apache::fastcgi::server (
+  $host          = '127.0.0.1:9000',
+  $timeout       = 15,
+  $flush         = false,
+  $faux_path     = "/var/www/${name}.fcgi",
+  $fcgi_alias    = "/${name}.fcgi",
+  $file_type     = 'application/x-httpd-php'
+) {
+  include apache::mod::fastcgi
+
+  Apache::Mod['fastcgi'] -> Apache::Fastcgi::Server[$title]
+
+  file { "fastcgi-pool-${name}.conf":
+    ensure  => present,
+    path    => "${::apache::confd_dir}/fastcgi-pool-${name}.conf",
+    owner   => 'root',
+    group   => $::apache::params::root_group,
+    mode    => '0644',
+    content => template('apache/fastcgi/server.erb'),
+    require => Exec["mkdir ${::apache::confd_dir}"],
+    before  => File[$::apache::confd_dir],
+    notify  => Class['apache::service'],
+  }
+}