apache: Allow disabling mod_wsgi's embedded mode

This commit is contained in:
Ossi Salmi 2013-06-27 19:37:04 +03:00
parent 583f687dfb
commit 345a8f9589
2 changed files with 49 additions and 2 deletions

View file

@ -449,6 +449,13 @@ class apache::mod::include {
# Install mod_fcgid.
#
# === Parameters
#
# $http:
# Enable for http. Defaults to true.
# $https:
# Enable for https. Defaults to true.
#
class apache::mod::fcgid($http=true, $https=true) {
package { "mod_fcgid":
@ -539,6 +546,13 @@ class apache::mod::ldap {
# Install mod_passenger.
#
# === Parameters
#
# $http:
# Enable for http. Defaults to true.
# $https:
# Enable for https. Defaults to true.
#
class apache::mod::passenger($http=true, $https=true) {
package { "mod_passenger":
@ -581,6 +595,13 @@ class apache::mod::passenger($http=true, $https=true) {
# Install mod_perl.
#
# === Parameters
#
# $http:
# Enable for http. Defaults to true.
# $https:
# Enable for https. Defaults to true.
#
class apache::mod::perl($http=true, $https=true) {
package { "mod_perl":
@ -616,6 +637,13 @@ class apache::mod::perl($http=true, $https=true) {
# Install PHP.
#
# === Parameters
#
# $http:
# Enable for http. Defaults to true.
# $https:
# Enable for https. Defaults to true.
#
class apache::mod::php($http=true, $https=true) {
package { "php":
@ -708,6 +736,13 @@ class apache::mod::proxy_balancer {
# Install mod_python.
#
# === Parameters
#
# $http:
# Enable for http. Defaults to true.
# $https:
# Enable for https. Defaults to true.
#
class apache::mod::python($http=true, $https=true) {
package { "mod_python":
@ -760,7 +795,16 @@ class apache::mod::rewrite {
# Install mod_wsgi.
#
class apache::mod::wsgi($http=true, $https=true) {
# === Parameters
#
# $http:
# Enable for http. Defaults to true.
# $https:
# Enable for https. Defaults to true.
# $embedded:
# Allow running scripts in embedded mode. Defaults to true.
#
class apache::mod::wsgi($http=true, $https=true, $embedded=true) {
package { "mod_wsgi":
name => $::operatingsystem ? {
@ -789,7 +833,7 @@ class apache::mod::wsgi($http=true, $https=true) {
apache::configfile { "wsgi.conf":
http => $http,
https => $https,
source => "puppet:///modules/apache/wsgi.conf",
content => template("apache/wsgi.conf.erb"),
require => Package["mod_wsgi"],
}
}

View file

@ -1,5 +1,8 @@
LoadModule wsgi_module modules/mod_wsgi.so
WSGISocketPrefix /var/run/mod_wsgi/wsgi
<% if @embedded == false -%>
WSGIRestrictEmbedded On
<% end -%>
SetEnv WSGI_PROCESS_GROUP
WSGIProcessGroup %{ENV:WSGI_PROCESS_GROUP}