passenger 5.0.28 → 5.0.29

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +5 -0
  3. data/CHANGELOG +13 -0
  4. data/build/apache2.rb +3 -3
  5. data/build/common_library.rb +3 -3
  6. data/build/nginx.rb +4 -4
  7. data/build/packaging.rb +9 -8
  8. data/build/support/cxx_dependency_map.rb +9 -7
  9. data/build/support/general.rb +39 -0
  10. data/build/support/vendor/cxxcodebuilder/CxxCodeBuilder.sublime-project +8 -0
  11. data/build/support/vendor/cxxcodebuilder/Gemfile +4 -0
  12. data/build/support/vendor/cxxcodebuilder/Gemfile.lock +28 -0
  13. data/build/support/vendor/cxxcodebuilder/LICENSE.md +19 -0
  14. data/build/support/vendor/cxxcodebuilder/README.md +98 -0
  15. data/build/support/vendor/cxxcodebuilder/Rakefile +4 -0
  16. data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder.rb +23 -0
  17. data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/builder.rb +574 -0
  18. data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/initializer_builder.rb +166 -0
  19. data/build/test_basics.rb +2 -1
  20. data/resources/templates/standalone/server.erb +6 -4
  21. data/src/agent/Core/Controller/ForwardResponse.cpp +5 -5
  22. data/src/agent/Watchdog/WatchdogMain.cpp +0 -10
  23. data/src/apache2_module/ConfigurationCommands.cpp +181 -248
  24. data/src/apache2_module/ConfigurationCommands.cpp.cxxcodebuilder +127 -0
  25. data/src/apache2_module/ConfigurationFields.hpp +135 -51
  26. data/src/apache2_module/ConfigurationFields.hpp.cxxcodebuilder +113 -0
  27. data/src/apache2_module/ConfigurationSetters.cpp +414 -459
  28. data/src/apache2_module/ConfigurationSetters.cpp.cxxcodebuilder +144 -0
  29. data/src/apache2_module/CreateDirConfig.cpp +49 -52
  30. data/src/apache2_module/CreateDirConfig.cpp.cxxcodebuilder +81 -0
  31. data/src/apache2_module/Hooks.cpp +0 -14
  32. data/src/apache2_module/MergeDirConfig.cpp +136 -226
  33. data/src/apache2_module/MergeDirConfig.cpp.cxxcodebuilder +97 -0
  34. data/src/apache2_module/SetHeaders.cpp +92 -143
  35. data/src/apache2_module/SetHeaders.cpp.cxxcodebuilder +106 -0
  36. data/src/cxx_supportlib/Constants.h +86 -146
  37. data/src/cxx_supportlib/Constants.h.cxxcodebuilder +43 -0
  38. data/src/cxx_supportlib/DataStructures/LString.h +40 -23
  39. data/src/cxx_supportlib/MemoryKit/mbuf.cpp +60 -25
  40. data/src/cxx_supportlib/MemoryKit/mbuf.h +50 -25
  41. data/src/cxx_supportlib/ServerKit/CookieUtils.h +36 -3
  42. data/src/cxx_supportlib/ServerKit/HeaderTable.h +2 -8
  43. data/src/cxx_supportlib/ServerKit/HttpServer.h +6 -15
  44. data/src/cxx_supportlib/WatchdogLauncher.cpp +4 -4
  45. data/src/cxx_supportlib/WatchdogLauncher.h +2 -3
  46. data/src/nginx_module/CacheLocationConfig.c +623 -780
  47. data/src/nginx_module/CacheLocationConfig.c.cxxcodebuilder +214 -0
  48. data/src/nginx_module/Configuration.h +1 -1
  49. data/src/nginx_module/ConfigurationCommands.c +404 -535
  50. data/src/nginx_module/ConfigurationCommands.c.cxxcodebuilder +157 -0
  51. data/src/nginx_module/CreateLocationConfig.c +82 -206
  52. data/src/nginx_module/CreateLocationConfig.c.cxxcodebuilder +98 -0
  53. data/src/nginx_module/LocationConfig.h +97 -0
  54. data/src/nginx_module/LocationConfig.h.cxxcodebuilder +131 -0
  55. data/src/nginx_module/MergeLocationConfig.c +157 -278
  56. data/src/nginx_module/MergeLocationConfig.c.cxxcodebuilder +144 -0
  57. data/src/nginx_module/ngx_http_passenger_module.c +4 -10
  58. data/src/ruby_supportlib/phusion_passenger.rb +4 -4
  59. data/src/ruby_supportlib/phusion_passenger/config/validate_install_command.rb +2 -2
  60. data/src/ruby_supportlib/phusion_passenger/packaging.rb +2 -0
  61. data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +6 -0
  62. data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +1 -1
  63. data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +27 -8
  64. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +120 -2
  65. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/lock_file.rb +1 -1
  66. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/spawn.rb +4 -4
  67. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/version.rb +1 -1
  68. data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/api.rb +5 -5
  69. metadata +24 -15
  70. data/src/apache2_module/ConfigurationCommands.cpp.erb +0 -109
  71. data/src/apache2_module/ConfigurationFields.hpp.erb +0 -98
  72. data/src/apache2_module/ConfigurationSetters.cpp.erb +0 -128
  73. data/src/apache2_module/CreateDirConfig.cpp.erb +0 -72
  74. data/src/apache2_module/MergeDirConfig.cpp.erb +0 -82
  75. data/src/apache2_module/SetHeaders.cpp.erb +0 -91
  76. data/src/cxx_supportlib/Constants.h.erb +0 -41
  77. data/src/nginx_module/CacheLocationConfig.c.erb +0 -171
  78. data/src/nginx_module/ConfigurationCommands.c.erb +0 -144
  79. data/src/nginx_module/ConfigurationFields.h +0 -145
  80. data/src/nginx_module/ConfigurationFields.h.erb +0 -112
  81. data/src/nginx_module/CreateLocationConfig.c.erb +0 -78
  82. data/src/nginx_module/MergeLocationConfig.c.erb +0 -118
@@ -0,0 +1,166 @@
1
+ # encoding: utf-8
2
+
3
+ # Copyright (c) 2016 Phusion Holding B.V.
4
+ #
5
+ # "Union Station" and "Passenger" are trademarks of Phusion Holding B.V.
6
+ #
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"), to deal
9
+ # in the Software without restriction, including without limitation the rights
10
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ # copies of the Software, and to permit persons to whom the Software is
12
+ # furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included in
15
+ # all copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ # THE SOFTWARE.
24
+
25
+ module CxxCodeBuilder
26
+ # Builds array and struct initialization code.
27
+ class InitializerBuilder
28
+ def initialize(builder, start_character, end_character)
29
+ @builder = builder
30
+ @start_character = start_character
31
+ @end_character = end_character
32
+ @elements = []
33
+ end
34
+
35
+ # Adds an array/struct initializer element to the internal buffer.
36
+ # The code is added verbatim, so you can supply expressions. If you
37
+ # want to add a string element, use `#string_element` instead.
38
+ #
39
+ # Example:
40
+ #
41
+ # array_initializer do
42
+ # element '1 + 2'
43
+ # end
44
+ #
45
+ # Output:
46
+ #
47
+ # [
48
+ # 1 + 2
49
+ # ]
50
+ def element(code)
51
+ @elements << code
52
+ end
53
+
54
+ # Adds an array/struct initializer string element to the internal buffer.
55
+ #
56
+ # Example:
57
+ #
58
+ # array_initializer do
59
+ # string_element 'hello world'
60
+ # end
61
+ #
62
+ # Output:
63
+ #
64
+ # [
65
+ # "hello world"
66
+ # ]
67
+ def string_element(str)
68
+ element(str.inspect)
69
+ end
70
+
71
+ # Adds an array initializer (in the form of `[x, y, z]`) to the internal
72
+ # buffer. This works exactly the same as `Builder#array_initializer`, and
73
+ # allows you to nest an array initializer inside a parent array/struct
74
+ # initializer.
75
+ #
76
+ # Example:
77
+ #
78
+ # struct_initializer do
79
+ # array_initializer_element do
80
+ # element 1
81
+ # element 2
82
+ # end
83
+ # array_initializer_element do
84
+ # element 3
85
+ # element 4
86
+ # end
87
+ # end
88
+ #
89
+ # Output:
90
+ #
91
+ # {
92
+ # [
93
+ # 1,
94
+ # 2
95
+ # ],
96
+ # [
97
+ # 3,
98
+ # 4
99
+ # ]
100
+ # }
101
+ def array_initializer_element(&block)
102
+ subbuilder = InitializerBuilder.new(@builder, '[', ']')
103
+ subbuilder.instance_eval(&block)
104
+ @elements << subbuilder
105
+ end
106
+
107
+ # Adds a struct initializer (in the form of `{x, y, z}`) to the internal
108
+ # buffer. This works exactly the same as `Builder#struct_initializer`, and
109
+ # allows you to nest a struct initializer inside a parent array/struct
110
+ # initializer.
111
+ #
112
+ # Example:
113
+ #
114
+ # array_initializer do
115
+ # struct_initializer_element do
116
+ # string_element 'Joe'
117
+ # element 1
118
+ # end
119
+ # struct_initializer_element do
120
+ # string_element 'Jane'
121
+ # element 2
122
+ # end
123
+ # end
124
+ #
125
+ # Output:
126
+ #
127
+ # [
128
+ # {
129
+ # "Joe",
130
+ # 1
131
+ # },
132
+ # {
133
+ # "Jane",
134
+ # 2
135
+ # }
136
+ # ]
137
+ def struct_initializer_element(&block)
138
+ subbuilder = InitializerBuilder.new(@builder, '{', '}')
139
+ subbuilder.instance_eval(&block)
140
+ @elements << subbuilder
141
+ end
142
+
143
+ alias array_element array_initializer_element
144
+ alias struct_element struct_initializer_element
145
+
146
+ # @private
147
+ def write_code_without_newline
148
+ @builder.add_code(@start_character)
149
+ @builder.indent do
150
+ @elements.each_with_index do |elem, i|
151
+ if elem.respond_to?(:write_code_without_newline)
152
+ elem.write_code_without_newline
153
+ else
154
+ @builder.add_code_without_newline(elem)
155
+ end
156
+
157
+ if i != @elements.size - 1
158
+ @builder.add_raw_code(',')
159
+ end
160
+ @builder.newline
161
+ end
162
+ end
163
+ @builder.add_code_without_newline(@end_character)
164
+ end
165
+ end
166
+ end
@@ -57,7 +57,8 @@ task 'test:install_deps' do
57
57
  end
58
58
 
59
59
  if !PlatformInfo.locate_ruby_tool('bundle') || bundler_too_old?
60
- sh "#{gem_install} bundler"
60
+ # workaround for issue "bluecloth not found" when using 1.12.1
61
+ sh "#{gem_install} bundler --version 1.11.2"
61
62
  end
62
63
 
63
64
  if install_base_deps && install_doctools
@@ -6,6 +6,8 @@ server_name <%= app[:server_names].join(' ') %>;
6
6
  <% else %>
7
7
  listen <%= nginx_listen_address(app) %> ssl;
8
8
  <% end %>
9
+ ssl_certificate <%= app[:ssl_certificate] %>;
10
+ ssl_certificate_key <%= app[:ssl_certificate_key] %>;
9
11
  <% else %>
10
12
  listen <%= nginx_listen_address(app) %>;
11
13
  <% end %>
@@ -17,10 +19,7 @@ server_name <%= app[:server_names].join(' ') %>;
17
19
 
18
20
  passenger_app_root '<%= app[:root] %>';
19
21
  passenger_enabled on;
20
- <% if app[:ssl] %>
21
- ssl_certificate <%= app[:ssl_certificate] %>;
22
- ssl_certificate_key <%= app[:ssl_certificate_key] %>;
23
- <% end %>
22
+
24
23
  <% if app[:union_station_key] %>
25
24
  union_station_support on;
26
25
  union_station_key <%= app[:union_station_key] %>;
@@ -36,6 +35,9 @@ passenger_enabled on;
36
35
  <% end %>
37
36
 
38
37
  <%= nginx_option(app, :environment, :passenger_app_env) %>
38
+ <%= nginx_option(app, :ruby) %>
39
+ <%= nginx_option(app, :python) %>
40
+ <%= nginx_option(app, :nodejs) %>
39
41
  <%= nginx_option(app, :spawn_method) %>
40
42
  <%= nginx_option(app, :app_type) %>
41
43
  <%= nginx_option(app, :startup_file) %>
@@ -332,15 +332,15 @@ Controller::onAppResponseBegin(Client *client, Request *req) {
332
332
  resp->date = resp->headers.lookup(HTTP_DATE);
333
333
  resp->setCookie = resp->headers.lookup(ServerKit::HTTP_SET_COOKIE);
334
334
  if (resp->setCookie != NULL) {
335
- // Remove Set-Cookie from resp->headers without deallocating it.
335
+ // Move the Set-Cookie header from resp->headers to resp->setCookie;
336
+ // remove Set-Cookie from resp->headers without deallocating it.
336
337
  LString *copy;
337
338
 
338
339
  copy = (LString *) psg_palloc(req->pool, sizeof(LString));
339
- *copy = *resp->setCookie;
340
+ psg_lstr_init(copy);
341
+ psg_lstr_move_and_append(resp->setCookie, req->pool, copy);
340
342
 
341
- resp->setCookie->start = NULL;
342
- resp->setCookie->end = NULL;
343
- resp->setCookie->size = 0;
343
+ P_ASSERT_EQ(resp->setCookie->size, 0);
344
344
  psg_lstr_append(resp->setCookie, req->pool, "x", 1);
345
345
  resp->headers.erase(ServerKit::HTTP_SET_COOKIE);
346
346
 
@@ -1023,16 +1023,6 @@ initializeWorkingObjects(const WorkingObjectsPtr &wo, InstanceDirToucherPtr &ins
1023
1023
  if (options.get("integration_mode") == "standalone") {
1024
1024
  instanceOptions.properties["standalone_engine"] = options.get("standalone_engine");
1025
1025
  }
1026
- if (options.has("web_server_config_files")) {
1027
- vector<string> configFiles = options.getStrSet("web_server_config_files");
1028
- Json::Value array(Json::arrayValue);
1029
-
1030
- foreach (string configFile, configFiles) {
1031
- array.append(configFile);
1032
- }
1033
-
1034
- instanceOptions.properties["web_server_config_files"] = array;
1035
- }
1036
1026
  wo->instanceDir = boost::make_shared<InstanceDirectory>(instanceOptions,
1037
1027
  options.get("instance_registry_dir"));
1038
1028
  options.set("instance_dir", wo->instanceDir->getPath());
@@ -1,266 +1,199 @@
1
1
  /*
2
- * Phusion Passenger - https://www.phusionpassenger.com/
3
- * Copyright (c) 2010-2015 Phusion Holding B.V.
2
+ * Phusion Passenger - https://www.phusionpassenger.com/
3
+ * Copyright (c) 2010-2016 Phusion Holding B.V.
4
4
  *
5
- * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
- * trademarks of Phusion Holding B.V.
5
+ * "Passenger", "Phusion Passenger" and "Union Station" are registered
6
+ * trademarks of Phusion Holding B.V.
7
7
  *
8
- * Permission is hereby granted, free of charge, to any person obtaining a copy
9
- * of this software and associated documentation files (the "Software"), to deal
10
- * in the Software without restriction, including without limitation the rights
11
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- * copies of the Software, and to permit persons to whom the Software is
13
- * furnished to do so, subject to the following conditions:
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
14
  *
15
- * The above copyright notice and this permission notice shall be included in
16
- * all copies or substantial portions of the Software.
15
+ * The above copyright notice and this permission notice shall be included in
16
+ * all copies or substantial portions of the Software.
17
17
  *
18
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
- * THE SOFTWARE.
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ * THE SOFTWARE.
25
25
  */
26
26
 
27
27
  /*
28
- * ConfigurationCommands.cpp is automatically generated from ConfigurationCommands.cpp.erb,
28
+ * ConfigurationCommands.cpp is automatically generated from ConfigurationCommands.cpp.cxxcodebuilder,
29
29
  * using definitions from src/ruby_supportlib/phusion_passenger/apache2/config_options.rb.
30
30
  * Edits to ConfigurationCommands.cpp will be lost.
31
31
  *
32
32
  * To update ConfigurationCommands.cpp:
33
33
  * rake apache2
34
34
  *
35
- * To force regeneration of ConfigurationCommands.c:
35
+ * To force regeneration of ConfigurationCommands.cpp:
36
36
  * rm -f src/apache2_module/ConfigurationCommands.cpp
37
37
  * rake src/apache2_module/ConfigurationCommands.cpp
38
38
  */
39
39
 
40
-
41
-
42
-
43
-
44
- AP_INIT_TAKE1("PassengerRuby",
45
- (Take1Func) cmd_passenger_ruby,
46
- NULL,
47
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
48
- "The Ruby interpreter to use."),
49
-
50
-
51
- AP_INIT_TAKE1("PassengerPython",
52
- (Take1Func) cmd_passenger_python,
53
- NULL,
54
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
55
- "The Python interpreter to use."),
56
-
57
-
58
- AP_INIT_TAKE1("PassengerNodejs",
59
- (Take1Func) cmd_passenger_nodejs,
60
- NULL,
61
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
62
- "The Node.js command to use."),
63
-
64
-
65
- AP_INIT_TAKE1("PassengerMeteorAppSettings",
66
- (Take1Func) cmd_passenger_meteor_app_settings,
67
- NULL,
68
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
69
- "Settings file for (non-bundled) Meteor apps."),
70
-
71
-
72
- AP_INIT_TAKE1("PassengerAppEnv",
73
- (Take1Func) cmd_passenger_app_env,
74
- NULL,
75
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
76
- "The environment under which applications are run."),
77
-
78
-
79
- AP_INIT_TAKE1("PassengerMinInstances",
80
- (Take1Func) cmd_passenger_min_instances,
81
- NULL,
82
- OR_LIMIT | ACCESS_CONF | RSRC_CONF,
83
- "The minimum number of application instances to keep when cleaning idle instances."),
84
-
85
-
86
- AP_INIT_TAKE1("PassengerMaxInstancesPerApp",
87
- (Take1Func) cmd_passenger_max_instances_per_app,
88
- NULL,
89
- RSRC_CONF,
90
- "The maximum number of simultaneously alive application instances a single application may occupy."),
91
-
92
-
93
- AP_INIT_TAKE1("PassengerUser",
94
- (Take1Func) cmd_passenger_user,
95
- NULL,
96
- ACCESS_CONF | RSRC_CONF,
97
- "The user that Ruby applications must run as."),
98
-
99
-
100
- AP_INIT_TAKE1("PassengerGroup",
101
- (Take1Func) cmd_passenger_group,
102
- NULL,
103
- ACCESS_CONF | RSRC_CONF,
104
- "The group that Ruby applications must run as."),
105
-
106
-
107
- AP_INIT_FLAG("PassengerErrorOverride",
108
- (FlagFunc) cmd_passenger_error_override,
109
- NULL,
110
- OR_ALL,
111
- "Allow Apache to handle error response."),
112
-
113
-
114
- AP_INIT_TAKE1("PassengerMaxRequests",
115
- (Take1Func) cmd_passenger_max_requests,
116
- NULL,
117
- OR_LIMIT | ACCESS_CONF | RSRC_CONF,
118
- "The maximum number of requests that an application instance may process."),
119
-
120
-
121
- AP_INIT_TAKE1("PassengerStartTimeout",
122
- (Take1Func) cmd_passenger_start_timeout,
123
- NULL,
124
- OR_LIMIT | ACCESS_CONF | RSRC_CONF,
125
- "A timeout for application startup."),
126
-
127
-
128
- AP_INIT_FLAG("PassengerHighPerformance",
129
- (FlagFunc) cmd_passenger_high_performance,
130
- NULL,
131
- OR_ALL,
132
- "Enable or disable Passenger's high performance mode."),
133
-
134
-
135
- AP_INIT_FLAG("PassengerEnabled",
136
- (FlagFunc) cmd_passenger_enabled,
137
- NULL,
138
- OR_ALL,
139
- "Enable or disable Phusion Passenger."),
140
-
141
-
142
- AP_INIT_TAKE1("PassengerMaxRequestQueueSize",
143
- (Take1Func) cmd_passenger_max_request_queue_size,
144
- NULL,
145
- OR_ALL,
146
- "The maximum number of queued requests."),
147
-
148
-
149
- AP_INIT_TAKE1("PassengerMaxPreloaderIdleTime",
150
- (Take1Func) cmd_passenger_max_preloader_idle_time,
151
- NULL,
152
- RSRC_CONF,
153
- "The maximum number of seconds that a preloader process may be idle before it is shutdown."),
154
-
155
-
156
- AP_INIT_FLAG("PassengerLoadShellEnvvars",
157
- (FlagFunc) cmd_passenger_load_shell_envvars,
158
- NULL,
159
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
160
- "Whether to load environment variables from the shell before running the application."),
161
-
162
-
163
- AP_INIT_FLAG("PassengerBufferUpload",
164
- (FlagFunc) cmd_passenger_buffer_upload,
165
- NULL,
166
- OR_ALL,
167
- "Whether to buffer file uploads."),
168
-
169
-
170
- AP_INIT_TAKE1("PassengerAppType",
171
- (Take1Func) cmd_passenger_app_type,
172
- NULL,
173
- OR_ALL,
174
- "Force specific application type."),
175
-
176
-
177
- AP_INIT_TAKE1("PassengerStartupFile",
178
- (Take1Func) cmd_passenger_startup_file,
179
- NULL,
180
- OR_ALL,
181
- "Force specific startup file."),
182
-
183
-
184
- AP_INIT_FLAG("PassengerStickySessions",
185
- (FlagFunc) cmd_passenger_sticky_sessions,
186
- NULL,
187
- OR_ALL,
188
- "Whether to enable sticky sessions."),
189
-
190
-
191
- AP_INIT_FLAG("PassengerStickySessionsCookieName",
192
- (FlagFunc) cmd_passenger_sticky_sessions_cookie_name,
193
- NULL,
194
- OR_ALL,
195
- "The cookie name to use for sticky sessions."),
196
-
197
-
198
- AP_INIT_TAKE1("PassengerSpawnMethod",
199
- (Take1Func) cmd_passenger_spawn_method,
200
- NULL,
201
- RSRC_CONF,
202
- "The spawn method to use."),
203
-
204
-
205
- AP_INIT_FLAG("PassengerShowVersionInHeader",
206
- (FlagFunc) cmd_passenger_show_version_in_header,
207
- NULL,
208
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
209
- "Whether to show the Phusion Passenger version number in the X-Powered-By header."),
210
-
211
-
212
- AP_INIT_FLAG("PassengerFriendlyErrorPages",
213
- (FlagFunc) cmd_passenger_friendly_error_pages,
214
- NULL,
215
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
216
- "Whether to display friendly error pages when something goes wrong."),
217
-
218
-
219
- AP_INIT_TAKE1("PassengerRestartDir",
220
- (Take1Func) cmd_passenger_restart_dir,
221
- NULL,
222
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
223
- "The directory in which Passenger should look for restart.txt."),
224
-
225
-
226
- AP_INIT_TAKE1("PassengerAppGroupName",
227
- (Take1Func) cmd_passenger_app_group_name,
228
- NULL,
229
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
230
- "Application process group name."),
231
-
232
-
233
- AP_INIT_TAKE1("PassengerForceMaxConcurrentRequestsPerProcess",
234
- (Take1Func) cmd_passenger_force_max_concurrent_requests_per_process,
235
- NULL,
236
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
237
- "Force Passenger to believe that an application process can handle the given number of concurrent requests per process"),
238
-
239
-
240
- AP_INIT_TAKE1("PassengerLveMinUid",
241
- (Take1Func) cmd_passenger_lve_min_uid,
242
- NULL,
243
- RSRC_CONF,
244
- "Minimum user id starting from which entering LVE and CageFS is allowed."),
245
-
246
-
247
- AP_INIT_TAKE1("RailsEnv",
248
- (Take1Func) cmd_passenger_app_env,
249
- NULL,
250
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
251
- "The environment under which applications are run."),
252
-
253
-
254
- AP_INIT_TAKE1("RackEnv",
255
- (Take1Func) cmd_passenger_app_env,
256
- NULL,
257
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
258
- "The environment under which applications are run."),
259
-
260
-
261
- AP_INIT_TAKE1("RailsSpawnMethod",
262
- (Take1Func) cmd_passenger_spawn_method,
263
- NULL,
264
- RSRC_CONF,
265
- "The spawn method to use."),
266
-
40
+ AP_INIT_TAKE1("PassengerRuby",
41
+ (Take1Func) cmd_passenger_ruby,
42
+ NULL,
43
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
44
+ "The Ruby interpreter to use."),
45
+ AP_INIT_TAKE1("PassengerPython",
46
+ (Take1Func) cmd_passenger_python,
47
+ NULL,
48
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
49
+ "The Python interpreter to use."),
50
+ AP_INIT_TAKE1("PassengerNodejs",
51
+ (Take1Func) cmd_passenger_nodejs,
52
+ NULL,
53
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
54
+ "The Node.js command to use."),
55
+ AP_INIT_TAKE1("PassengerMeteorAppSettings",
56
+ (Take1Func) cmd_passenger_meteor_app_settings,
57
+ NULL,
58
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
59
+ "Settings file for (non-bundled) Meteor apps."),
60
+ AP_INIT_TAKE1("PassengerAppEnv",
61
+ (Take1Func) cmd_passenger_app_env,
62
+ NULL,
63
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
64
+ "The environment under which applications are run."),
65
+ AP_INIT_TAKE1("PassengerMinInstances",
66
+ (Take1Func) cmd_passenger_min_instances,
67
+ NULL,
68
+ OR_LIMIT | ACCESS_CONF | RSRC_CONF,
69
+ "The minimum number of application instances to keep when cleaning idle instances."),
70
+ AP_INIT_TAKE1("PassengerMaxInstancesPerApp",
71
+ (Take1Func) cmd_passenger_max_instances_per_app,
72
+ NULL,
73
+ RSRC_CONF,
74
+ "The maximum number of simultaneously alive application instances a single application may occupy."),
75
+ AP_INIT_TAKE1("PassengerUser",
76
+ (Take1Func) cmd_passenger_user,
77
+ NULL,
78
+ ACCESS_CONF | RSRC_CONF,
79
+ "The user that Ruby applications must run as."),
80
+ AP_INIT_TAKE1("PassengerGroup",
81
+ (Take1Func) cmd_passenger_group,
82
+ NULL,
83
+ ACCESS_CONF | RSRC_CONF,
84
+ "The group that Ruby applications must run as."),
85
+ AP_INIT_FLAG("PassengerErrorOverride",
86
+ (FlagFunc) cmd_passenger_error_override,
87
+ NULL,
88
+ OR_ALL,
89
+ "Allow Apache to handle error response."),
90
+ AP_INIT_TAKE1("PassengerMaxRequests",
91
+ (Take1Func) cmd_passenger_max_requests,
92
+ NULL,
93
+ OR_LIMIT | ACCESS_CONF | RSRC_CONF,
94
+ "The maximum number of requests that an application instance may process."),
95
+ AP_INIT_TAKE1("PassengerStartTimeout",
96
+ (Take1Func) cmd_passenger_start_timeout,
97
+ NULL,
98
+ OR_LIMIT | ACCESS_CONF | RSRC_CONF,
99
+ "A timeout for application startup."),
100
+ AP_INIT_FLAG("PassengerHighPerformance",
101
+ (FlagFunc) cmd_passenger_high_performance,
102
+ NULL,
103
+ OR_ALL,
104
+ "Enable or disable Passenger's high performance mode."),
105
+ AP_INIT_FLAG("PassengerEnabled",
106
+ (FlagFunc) cmd_passenger_enabled,
107
+ NULL,
108
+ OR_ALL,
109
+ "Enable or disable Phusion Passenger."),
110
+ AP_INIT_TAKE1("PassengerMaxRequestQueueSize",
111
+ (Take1Func) cmd_passenger_max_request_queue_size,
112
+ NULL,
113
+ OR_ALL,
114
+ "The maximum number of queued requests."),
115
+ AP_INIT_TAKE1("PassengerMaxPreloaderIdleTime",
116
+ (Take1Func) cmd_passenger_max_preloader_idle_time,
117
+ NULL,
118
+ RSRC_CONF,
119
+ "The maximum number of seconds that a preloader process may be idle before it is shutdown."),
120
+ AP_INIT_FLAG("PassengerLoadShellEnvvars",
121
+ (FlagFunc) cmd_passenger_load_shell_envvars,
122
+ NULL,
123
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
124
+ "Whether to load environment variables from the shell before running the application."),
125
+ AP_INIT_FLAG("PassengerBufferUpload",
126
+ (FlagFunc) cmd_passenger_buffer_upload,
127
+ NULL,
128
+ OR_ALL,
129
+ "Whether to buffer file uploads."),
130
+ AP_INIT_TAKE1("PassengerAppType",
131
+ (Take1Func) cmd_passenger_app_type,
132
+ NULL,
133
+ OR_ALL,
134
+ "Force specific application type."),
135
+ AP_INIT_TAKE1("PassengerStartupFile",
136
+ (Take1Func) cmd_passenger_startup_file,
137
+ NULL,
138
+ OR_ALL,
139
+ "Force specific startup file."),
140
+ AP_INIT_FLAG("PassengerStickySessions",
141
+ (FlagFunc) cmd_passenger_sticky_sessions,
142
+ NULL,
143
+ OR_ALL,
144
+ "Whether to enable sticky sessions."),
145
+ AP_INIT_FLAG("PassengerStickySessionsCookieName",
146
+ (FlagFunc) cmd_passenger_sticky_sessions_cookie_name,
147
+ NULL,
148
+ OR_ALL,
149
+ "The cookie name to use for sticky sessions."),
150
+ AP_INIT_TAKE1("PassengerSpawnMethod",
151
+ (Take1Func) cmd_passenger_spawn_method,
152
+ NULL,
153
+ RSRC_CONF,
154
+ "The spawn method to use."),
155
+ AP_INIT_FLAG("PassengerShowVersionInHeader",
156
+ (FlagFunc) cmd_passenger_show_version_in_header,
157
+ NULL,
158
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
159
+ "Whether to show the Phusion Passenger version number in the X-Powered-By header."),
160
+ AP_INIT_FLAG("PassengerFriendlyErrorPages",
161
+ (FlagFunc) cmd_passenger_friendly_error_pages,
162
+ NULL,
163
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
164
+ "Whether to display friendly error pages when something goes wrong."),
165
+ AP_INIT_TAKE1("PassengerRestartDir",
166
+ (Take1Func) cmd_passenger_restart_dir,
167
+ NULL,
168
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
169
+ "The directory in which Passenger should look for restart.txt."),
170
+ AP_INIT_TAKE1("PassengerAppGroupName",
171
+ (Take1Func) cmd_passenger_app_group_name,
172
+ NULL,
173
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
174
+ "Application process group name."),
175
+ AP_INIT_TAKE1("PassengerForceMaxConcurrentRequestsPerProcess",
176
+ (Take1Func) cmd_passenger_force_max_concurrent_requests_per_process,
177
+ NULL,
178
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
179
+ "Force Passenger to believe that an application process can handle the given number of concurrent requests per process"),
180
+ AP_INIT_TAKE1("PassengerLveMinUid",
181
+ (Take1Func) cmd_passenger_lve_min_uid,
182
+ NULL,
183
+ RSRC_CONF,
184
+ "Minimum user id starting from which entering LVE and CageFS is allowed."),
185
+ AP_INIT_TAKE1("RailsEnv",
186
+ (Take1Func) cmd_passenger_app_env,
187
+ NULL,
188
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
189
+ "The environment under which applications are run."),
190
+ AP_INIT_TAKE1("RackEnv",
191
+ (Take1Func) cmd_passenger_app_env,
192
+ NULL,
193
+ OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
194
+ "The environment under which applications are run."),
195
+ AP_INIT_TAKE1("RailsSpawnMethod",
196
+ (Take1Func) cmd_passenger_spawn_method,
197
+ NULL,
198
+ RSRC_CONF,
199
+ "The spawn method to use."),