apache: Allow disabling mod_wsgi's embedded mode
This commit is contained in:
parent
583f687dfb
commit
345a8f9589
2 changed files with 49 additions and 2 deletions
|
@ -449,6 +449,13 @@ class apache::mod::include {
|
||||||
|
|
||||||
# Install mod_fcgid.
|
# 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) {
|
class apache::mod::fcgid($http=true, $https=true) {
|
||||||
|
|
||||||
package { "mod_fcgid":
|
package { "mod_fcgid":
|
||||||
|
@ -539,6 +546,13 @@ class apache::mod::ldap {
|
||||||
|
|
||||||
# Install mod_passenger.
|
# 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) {
|
class apache::mod::passenger($http=true, $https=true) {
|
||||||
|
|
||||||
package { "mod_passenger":
|
package { "mod_passenger":
|
||||||
|
@ -581,6 +595,13 @@ class apache::mod::passenger($http=true, $https=true) {
|
||||||
|
|
||||||
# Install mod_perl.
|
# 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) {
|
class apache::mod::perl($http=true, $https=true) {
|
||||||
|
|
||||||
package { "mod_perl":
|
package { "mod_perl":
|
||||||
|
@ -616,6 +637,13 @@ class apache::mod::perl($http=true, $https=true) {
|
||||||
|
|
||||||
# Install PHP.
|
# 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) {
|
class apache::mod::php($http=true, $https=true) {
|
||||||
|
|
||||||
package { "php":
|
package { "php":
|
||||||
|
@ -708,6 +736,13 @@ class apache::mod::proxy_balancer {
|
||||||
|
|
||||||
# Install mod_python.
|
# 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) {
|
class apache::mod::python($http=true, $https=true) {
|
||||||
|
|
||||||
package { "mod_python":
|
package { "mod_python":
|
||||||
|
@ -760,7 +795,16 @@ class apache::mod::rewrite {
|
||||||
|
|
||||||
# Install mod_wsgi.
|
# 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":
|
package { "mod_wsgi":
|
||||||
name => $::operatingsystem ? {
|
name => $::operatingsystem ? {
|
||||||
|
@ -789,7 +833,7 @@ class apache::mod::wsgi($http=true, $https=true) {
|
||||||
apache::configfile { "wsgi.conf":
|
apache::configfile { "wsgi.conf":
|
||||||
http => $http,
|
http => $http,
|
||||||
https => $https,
|
https => $https,
|
||||||
source => "puppet:///modules/apache/wsgi.conf",
|
content => template("apache/wsgi.conf.erb"),
|
||||||
require => Package["mod_wsgi"],
|
require => Package["mod_wsgi"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
LoadModule wsgi_module modules/mod_wsgi.so
|
LoadModule wsgi_module modules/mod_wsgi.so
|
||||||
WSGISocketPrefix /var/run/mod_wsgi/wsgi
|
WSGISocketPrefix /var/run/mod_wsgi/wsgi
|
||||||
|
<% if @embedded == false -%>
|
||||||
|
WSGIRestrictEmbedded On
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
SetEnv WSGI_PROCESS_GROUP
|
SetEnv WSGI_PROCESS_GROUP
|
||||||
WSGIProcessGroup %{ENV:WSGI_PROCESS_GROUP}
|
WSGIProcessGroup %{ENV:WSGI_PROCESS_GROUP}
|
Loading…
Add table
Reference in a new issue