Skip to content

Commit 7da7b2c

Browse files
arjenzjst-cyr
authored andcommitted
Update wsgi examples and documentation
Update example to avoid hitting `Error while evaluating a Function Call, deprecation. apache::vhost::wsgi_daemon_process_options. This parameter is deprecated. Please add values inside Hash wsgi_daemon_process`
1 parent cd75a07 commit 7da7b2c

3 files changed

Lines changed: 39 additions & 45 deletions

File tree

‎REFERENCE.md‎

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10212,20 +10212,20 @@ Default value: `false`
1021210212
Data type: `Optional[Variant[String, Hash]]`
1021310213

1021410214
Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
10215-
wsgi_daemon_process_options, wsgi_process_group,
10216-
wsgi_script_aliases and wsgi_pass_authorization.<br />
10215+
wsgi_process_group, wsgi_script_aliases and wsgi_pass_authorization.<br />
1021710216
A hash that sets the name of the WSGI daemon, accepting
1021810217
[certain keys](http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIDaemonProcess.html).<br />
1021910218
An example virtual host configuration with WSGI:
1022010219
``` puppet
1022110220
apache::vhost { 'wsgi.example.com':
1022210221
port => 80,
1022310222
docroot => '/var/www/pythonapp',
10224-
wsgi_daemon_process => 'wsgi',
10225-
wsgi_daemon_process_options =>
10226-
{ processes => 2,
10227-
threads => 15,
10228-
display-name => '%{GROUP}',
10223+
wsgi_daemon_process =>
10224+
{ 'wsgi' =>
10225+
{ processes => 2,
10226+
threads => 15,
10227+
display-name => '%{GROUP}'
10228+
}
1022910229
},
1023010230
wsgi_process_group => 'wsgi',
1023110231
wsgi_script_aliases => { '/' => '/var/www/demo.wsgi' },
@@ -10239,10 +10239,7 @@ Default value: `undef`
1023910239

1024010240
Data type: `Optional[Hash]`
1024110241

10242-
Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
10243-
wsgi_daemon_process, wsgi_process_group,
10244-
wsgi_script_aliases and wsgi_pass_authorization.<br />
10245-
Sets the group ID that the virtual host runs under.
10242+
DEPRECATED: Please add values inside Hash `wsgi_daemon_process`.
1024610243

1024710244
Default value: `undef`
1024810245

@@ -10251,7 +10248,7 @@ Default value: `undef`
1025110248
Data type: `Optional[String]`
1025210249

1025310250
Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
10254-
wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group,
10251+
wsgi_daemon_process, wsgi_process_group,
1025510252
and wsgi_pass_authorization.<br />
1025610253
This parameter defines the [`WSGIApplicationGroup directive`](https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIApplicationGroup.html),
1025710254
thus allowing you to specify which application group the WSGI application belongs to,
@@ -10265,7 +10262,7 @@ Default value: `undef`
1026510262
Data type: `Optional[String]`
1026610263

1026710264
Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
10268-
wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group,
10265+
wsgi_daemon_process, wsgi_process_group,
1026910266
and wsgi_pass_authorization.<br />
1027010267
This parameter defines the [`WSGIImportScript directive`](https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIImportScript.html),
1027110268
which can be used in order to specify a script file to be loaded upon a process starting.
@@ -10277,7 +10274,7 @@ Default value: `undef`
1027710274
Data type: `Optional[Hash]`
1027810275

1027910276
Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
10280-
wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group,
10277+
wsgi_daemon_process, wsgi_process_group,
1028110278
and wsgi_pass_authorization.<br />
1028210279
This parameter defines the [`WSGIImportScript directive`](https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIImportScript.html),
1028310280
which can be used in order to specify a script file to be loaded upon a process starting.<br />
@@ -10290,7 +10287,7 @@ Default value: `undef`
1029010287
Data type: `Optional[Apache::OnOff]`
1029110288

1029210289
Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
10293-
wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group,
10290+
wsgi_daemon_process, wsgi_process_group,
1029410291
and wsgi_pass_authorization.<br />
1029510292
This parameter defines the [`WSGIChunkedRequest directive`](https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIChunkedRequest.html),
1029610293
allowing you to enable support for chunked request content.<br />
@@ -10304,7 +10301,7 @@ Default value: `undef`
1030410301
Data type: `Optional[String]`
1030510302

1030610303
Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
10307-
wsgi_daemon_process, wsgi_daemon_process_options,
10304+
wsgi_daemon_process,
1030810305
wsgi_script_aliases and wsgi_pass_authorization.<br />
1030910306
Requires a hash of web paths to filesystem `.wsgi paths/`.
1031010307

@@ -10315,7 +10312,7 @@ Default value: `undef`
1031510312
Data type: `Optional[Hash]`
1031610313

1031710314
Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
10318-
wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group,
10315+
wsgi_daemon_process, wsgi_process_group,
1031910316
and wsgi_pass_authorization.<br />
1032010317
Uses the WSGI application to handle authorization instead of Apache when set to `On`.<br />
1032110318
For more information, see mod_wsgi's [WSGIPassAuthorization documentation](https://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIPassAuthorization.html).
@@ -10327,7 +10324,7 @@ Default value: `undef`
1032710324
Data type: `Optional[Hash]`
1032810325

1032910326
Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
10330-
wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group,
10327+
wsgi_daemon_process, wsgi_process_group,
1033110328
and wsgi_pass_authorization.<br />
1033210329
Uses the WSGI application to handle authorization instead of Apache when set to `On`.<br />
1033310330
This directive is similar to `wsgi_script_aliases`, but makes use of regular expressions
@@ -10341,7 +10338,7 @@ Default value: `undef`
1034110338
Data type: `Optional[Apache::OnOff]`
1034210339

1034310340
Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
10344-
wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group and
10341+
wsgi_daemon_process, wsgi_process_group and
1034510342
wsgi_script_aliases.<br />
1034610343
Enables support for chunked requests.
1034710344

‎manifests/vhost.pp‎

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,36 +1179,32 @@
11791179
#
11801180
# @param wsgi_daemon_process
11811181
# Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
1182-
# wsgi_daemon_process_options, wsgi_process_group,
1183-
# wsgi_script_aliases and wsgi_pass_authorization.<br />
1182+
# wsgi_process_group, wsgi_script_aliases and wsgi_pass_authorization.<br />
11841183
# A hash that sets the name of the WSGI daemon, accepting
11851184
# [certain keys](http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIDaemonProcess.html).<br />
11861185
# An example virtual host configuration with WSGI:
11871186
# ``` puppet
11881187
# apache::vhost { 'wsgi.example.com':
11891188
# port => 80,
11901189
# docroot => '/var/www/pythonapp',
1191-
# wsgi_daemon_process => 'wsgi',
1192-
# wsgi_daemon_process_options =>
1193-
# { processes => 2,
1194-
# threads => 15,
1195-
# display-name => '%{GROUP}',
1190+
# wsgi_daemon_process =>
1191+
# { 'wsgi' =>
1192+
# { processes => 2,
1193+
# threads => 15,
1194+
# display-name => '%{GROUP}'
1195+
# }
11961196
# },
11971197
# wsgi_process_group => 'wsgi',
11981198
# wsgi_script_aliases => { '/' => '/var/www/demo.wsgi' },
11991199
# wsgi_chunked_request => 'On',
1200-
# }
12011200
# ```
12021201
#
12031202
# @param wsgi_daemon_process_options
1204-
# Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
1205-
# wsgi_daemon_process, wsgi_process_group,
1206-
# wsgi_script_aliases and wsgi_pass_authorization.<br />
1207-
# Sets the group ID that the virtual host runs under.
1203+
# DEPRECATED: Please add values inside Hash `wsgi_daemon_process`.
12081204
#
12091205
# @param wsgi_application_group
12101206
# Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
1211-
# wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group,
1207+
# wsgi_daemon_process, wsgi_process_group,
12121208
# and wsgi_pass_authorization.<br />
12131209
# This parameter defines the [`WSGIApplicationGroup directive`](https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIApplicationGroup.html),
12141210
# thus allowing you to specify which application group the WSGI application belongs to,
@@ -1217,22 +1213,22 @@
12171213
#
12181214
# @param wsgi_import_script
12191215
# Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
1220-
# wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group,
1216+
# wsgi_daemon_process, wsgi_process_group,
12211217
# and wsgi_pass_authorization.<br />
12221218
# This parameter defines the [`WSGIImportScript directive`](https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIImportScript.html),
12231219
# which can be used in order to specify a script file to be loaded upon a process starting.
12241220
#
12251221
# @param wsgi_import_script_options
12261222
# Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
1227-
# wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group,
1223+
# wsgi_daemon_process, wsgi_process_group,
12281224
# and wsgi_pass_authorization.<br />
12291225
# This parameter defines the [`WSGIImportScript directive`](https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIImportScript.html),
12301226
# which can be used in order to specify a script file to be loaded upon a process starting.<br />
12311227
# Specifies the process and aplication groups of the script.
12321228
#
12331229
# @param wsgi_chunked_request
12341230
# Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
1235-
# wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group,
1231+
# wsgi_daemon_process, wsgi_process_group,
12361232
# and wsgi_pass_authorization.<br />
12371233
# This parameter defines the [`WSGIChunkedRequest directive`](https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIChunkedRequest.html),
12381234
# allowing you to enable support for chunked request content.<br />
@@ -1241,20 +1237,20 @@
12411237
#
12421238
# @param wsgi_process_group
12431239
# Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
1244-
# wsgi_daemon_process, wsgi_daemon_process_options,
1240+
# wsgi_daemon_process,
12451241
# wsgi_script_aliases and wsgi_pass_authorization.<br />
12461242
# Requires a hash of web paths to filesystem `.wsgi paths/`.
12471243
#
12481244
# @param wsgi_script_aliases
12491245
# Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
1250-
# wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group,
1246+
# wsgi_daemon_process, wsgi_process_group,
12511247
# and wsgi_pass_authorization.<br />
12521248
# Uses the WSGI application to handle authorization instead of Apache when set to `On`.<br />
12531249
# For more information, see mod_wsgi's [WSGIPassAuthorization documentation](https://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIPassAuthorization.html).
12541250
#
12551251
# @param wsgi_script_aliases_match
12561252
# Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
1257-
# wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group,
1253+
# wsgi_daemon_process, wsgi_process_group,
12581254
# and wsgi_pass_authorization.<br />
12591255
# Uses the WSGI application to handle authorization instead of Apache when set to `On`.<br />
12601256
# This directive is similar to `wsgi_script_aliases`, but makes use of regular expressions
@@ -1263,7 +1259,7 @@
12631259
#
12641260
# @param wsgi_pass_authorization
12651261
# Sets up a virtual host with [WSGI](https://github.com/GrahamDumpleton/mod_wsgi) alongside
1266-
# wsgi_daemon_process, wsgi_daemon_process_options, wsgi_process_group and
1262+
# wsgi_daemon_process, wsgi_process_group and
12671263
# wsgi_script_aliases.<br />
12681264
# Enables support for chunked requests.
12691265
#

‎readmes/README_ja_JP.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -558,12 +558,13 @@ apache::vhost { 'wsgi.example.com':
558558
port => '80',
559559
docroot => '/var/www/pythonapp',
560560
wsgi_application_group => '%{GLOBAL}',
561-
wsgi_daemon_process => 'wsgi',
562-
wsgi_daemon_process_options => {
563-
processes => '2',
564-
threads => '15',
565-
display-name => '%{GROUP}',
566-
},
561+
wsgi_daemon_process =>
562+
{ 'wsgi' =>
563+
{ processes => 2,
564+
threads => 15,
565+
display-name => '%{GROUP}'
566+
}
567+
},
567568
wsgi_import_script => '/var/www/demo.wsgi',
568569
wsgi_import_script_options => {
569570
process-group => 'wsgi',

0 commit comments

Comments
 (0)