passenger 5.2.1 → 5.2.2

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 (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +8 -0
  3. data/CODE_OF_CONDUCT.md +52 -0
  4. data/README.md +17 -9
  5. data/build/agent.rb +3 -1
  6. data/build/cxx_tests.rb +1 -0
  7. data/build/schema_printer.rb +1 -0
  8. data/build/support/cxx_dependency_map.rb +338 -31
  9. data/dev/configkit-schemas/index.json +64 -15
  10. data/dev/copy_boost_headers +1 -0
  11. data/images/justin.png +0 -0
  12. data/images/passenger_logo.svg +45 -0
  13. data/images/spark.png +0 -0
  14. data/resources/templates/standalone/http.erb +4 -0
  15. data/src/agent/AgentMain.cpp +4 -0
  16. data/src/agent/Core/AdminPanelConnector.h +133 -5
  17. data/src/agent/Core/ApplicationPool/Implementation.cpp +1 -0
  18. data/src/agent/Core/ApplicationPool/Options.h +7 -1
  19. data/src/agent/Core/ApplicationPool/Pool.h +1 -0
  20. data/src/agent/Core/ApplicationPool/Pool/GroupUtils.cpp +11 -0
  21. data/src/agent/Core/ApplicationPool/Process.cpp +52 -0
  22. data/src/agent/Core/ApplicationPool/Process.h +4 -8
  23. data/src/agent/Core/Config.h +6 -2
  24. data/src/agent/Core/ConfigChange.cpp +12 -1
  25. data/src/agent/Core/ConfigChange.h +3 -0
  26. data/src/agent/Core/Controller/Config.h +1 -1
  27. data/src/agent/Core/Controller/InitRequest.cpp +1 -1
  28. data/src/agent/Core/Controller/InternalUtils.cpp +2 -2
  29. data/src/agent/Core/CoreMain.cpp +18 -5
  30. data/src/agent/Core/SpawningKit/BackgroundIOCapturer.h +8 -4
  31. data/src/agent/Core/SpawningKit/DirectSpawner.h +3 -1
  32. data/src/agent/Core/SpawningKit/PipeWatcher.h +9 -4
  33. data/src/agent/Core/SpawningKit/SmartSpawner.h +5 -3
  34. data/src/agent/Core/SpawningKit/Spawner.h +1 -1
  35. data/src/agent/ExecHelper/ExecHelperMain.cpp +295 -0
  36. data/src/agent/Shared/Fundamentals/Initialization.cpp +11 -8
  37. data/src/agent/Shared/Fundamentals/Initialization.h +2 -2
  38. data/src/agent/Watchdog/Config.h +5 -2
  39. data/src/apache2_module/Config.cpp +13 -0
  40. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +30 -0
  41. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +90 -0
  42. data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +18 -2
  43. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +5 -0
  44. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +12 -0
  45. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -0
  46. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +13 -0
  47. data/src/apache2_module/Hooks.cpp +4 -0
  48. data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp +55 -0
  49. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +65 -0
  50. data/src/cxx_supportlib/BackgroundEventLoop.cpp +3 -3
  51. data/src/cxx_supportlib/ConfigKit/Schema.h +53 -31
  52. data/src/cxx_supportlib/ConfigKit/Store.h +12 -8
  53. data/src/cxx_supportlib/Constants.h +2 -1
  54. data/src/cxx_supportlib/DataStructures/StringKeyTable.h +4 -0
  55. data/src/cxx_supportlib/FileTools/PathManipCBindings.cpp +22 -1
  56. data/src/cxx_supportlib/FileTools/PathManipCBindings.h +3 -1
  57. data/src/cxx_supportlib/LoggingKit/Config.h +2 -0
  58. data/src/cxx_supportlib/LoggingKit/Context.h +28 -0
  59. data/src/cxx_supportlib/LoggingKit/Forward.h +0 -1
  60. data/src/cxx_supportlib/LoggingKit/Implementation.cpp +112 -9
  61. data/src/cxx_supportlib/LoggingKit/Logging.h +4 -2
  62. data/src/cxx_supportlib/WebSocketCommandReverseServer.h +34 -43
  63. data/src/cxx_supportlib/vendor-modified/boost/call_traits.hpp +20 -0
  64. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer.hpp +62 -0
  65. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/base.hpp +3123 -0
  66. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/debug.hpp +248 -0
  67. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/details.hpp +498 -0
  68. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/space_optimized.hpp +1719 -0
  69. data/src/cxx_supportlib/vendor-modified/boost/circular_buffer_fwd.hpp +43 -0
  70. data/src/cxx_supportlib/vendor-modified/boost/detail/call_traits.hpp +172 -0
  71. data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +48 -0
  72. data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +72 -0
  73. data/src/nginx_module/ConfigGeneral/ManifestGeneration.c +32 -0
  74. data/src/nginx_module/ConfigGeneral/ManifestGeneration.h +3 -0
  75. data/src/nginx_module/Configuration.c +25 -0
  76. data/src/nginx_module/ContentHandler.c +42 -4
  77. data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +5 -0
  78. data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +13 -0
  79. data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +5 -0
  80. data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +4 -0
  81. data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c +30 -0
  82. data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c +60 -0
  83. data/src/nginx_module/MainConfig/AutoGeneratedStruct.h +20 -0
  84. data/src/nginx_module/ngx_http_passenger_module.c +4 -0
  85. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  86. data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +37 -1
  87. data/src/ruby_supportlib/phusion_passenger/constants.rb +1 -0
  88. data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +42 -1
  89. data/src/ruby_supportlib/phusion_passenger/packaging.rb +2 -0
  90. data/src/ruby_supportlib/phusion_passenger/platform_info/crypto.rb +13 -3
  91. data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +20 -0
  92. metadata +16 -2
@@ -507,6 +507,8 @@ construct_request_buffer(ngx_http_request_t *r, passenger_loc_conf_t *slcf,
507
507
  ngx_table_elt_t *header;
508
508
  size_t len;
509
509
  ngx_str_t public_dir_parent;
510
+ ngx_str_t public_dir_resolved;
511
+ const char *temp_path;
510
512
  ngx_http_script_len_code_pt lcode;
511
513
  ngx_http_script_code_pt code;
512
514
  ngx_http_script_engine_t e, le;
@@ -682,10 +684,46 @@ construct_request_buffer(ngx_http_request_t *r, passenger_loc_conf_t *slcf,
682
684
  if (slcf->autogenerated.app_group_name.data == NULL) {
683
685
  PUSH_STATIC_STR("!~PASSENGER_APP_GROUP_NAME: ");
684
686
  if (slcf->autogenerated.app_root.data == NULL) {
685
- public_dir_parent.data = (u_char *) psg_extract_dir_name_static(
686
- (const char *) context->public_dir.data,
687
- context->public_dir.len,
688
- &public_dir_parent.len);
687
+ if (context->base_uri.data == NULL) {
688
+ /* If no passenger_base_uri applies, then the app
689
+ * group name is based on the parent directory of
690
+ * the document root.
691
+ */
692
+ public_dir_parent.data = (u_char *) psg_extract_dir_name_static(
693
+ (const char *) context->public_dir.data,
694
+ context->public_dir.len,
695
+ &public_dir_parent.len);
696
+ } else {
697
+ /* If a passenger_base_uri applies, then the document
698
+ * root may be a symlink. We base the app group name
699
+ * on `extractDirName(resolveSymlink(public_dir))`.
700
+ */
701
+ public_dir_resolved.data = (u_char *)
702
+ psg_resolve_symlink((const char *) context->public_dir.data,
703
+ context->public_dir.len, &public_dir_resolved.len);
704
+ if (public_dir_resolved.data == NULL) {
705
+ /* Resolve or memory allocation error. Fallback to
706
+ * assuming that no passenger_base_uri applies.
707
+ */
708
+ ngx_log_error(NGX_LOG_ERR, r->connection->log, ngx_errno,
709
+ "error resolving symlink %V",
710
+ &context->public_dir);
711
+ public_dir_parent.data = (u_char *) psg_extract_dir_name_static(
712
+ (const char *) context->public_dir.data,
713
+ context->public_dir.len,
714
+ &public_dir_parent.len);
715
+ } else {
716
+ temp_path = psg_extract_dir_name_static(
717
+ (const char *) public_dir_resolved.data,
718
+ public_dir_resolved.len,
719
+ &public_dir_parent.len);
720
+ public_dir_parent.data = ngx_pnalloc(r->pool,
721
+ public_dir_parent.len);
722
+ memcpy(public_dir_parent.data, temp_path,
723
+ public_dir_parent.len);
724
+ free(public_dir_resolved.data);
725
+ }
726
+ }
689
727
  if (b != NULL) {
690
728
  b->last = ngx_copy(b->last, public_dir_parent.data,
691
729
  public_dir_parent.len);
@@ -66,6 +66,7 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
66
66
  conf->group.len = 0;
67
67
  conf->app_group_name.data = NULL;
68
68
  conf->app_group_name.len = 0;
69
+ conf->monitor_log_file = NGX_CONF_UNSET_PTR;
69
70
  conf->app_root.data = NULL;
70
71
  conf->app_root.len = 0;
71
72
  conf->app_rights.data = NULL;
@@ -162,6 +163,10 @@ passenger_create_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *con
162
163
  conf->app_group_name_source_file.len = 0;
163
164
  conf->app_group_name_source_line = 0;
164
165
  conf->app_group_name_explicitly_set = 0;
166
+ conf->monitor_log_file_source_file.data = NULL;
167
+ conf->monitor_log_file_source_file.len = 0;
168
+ conf->monitor_log_file_source_line = 0;
169
+ conf->monitor_log_file_explicitly_set = 0;
165
170
  conf->app_root_source_file.data = NULL;
166
171
  conf->app_root_source_file.len = 0;
167
172
  conf->app_root_source_line = 0;
@@ -250,6 +250,19 @@ generate_config_manifest_for_autogenerated_loc_conf(manifest_gen_ctx_t *ctx, pas
250
250
  (const char *) plcf->autogenerated.app_group_name.data,
251
251
  plcf->autogenerated.app_group_name.len);
252
252
  }
253
+ if (plcf->autogenerated.monitor_log_file_explicitly_set) {
254
+ find_or_create_manifest_app_and_loc_options_containers(ctx,
255
+ plcf, cscf, clcf, &app_options_container, &loc_options_container);
256
+ option_container = find_or_create_manifest_option_container(ctx,
257
+ app_options_container,
258
+ "passenger_monitor_log_file",
259
+ sizeof("passenger_monitor_log_file") - 1);
260
+ hierarchy_member = add_manifest_option_container_hierarchy_member(option_container,
261
+ &plcf->autogenerated.monitor_log_file_source_file,
262
+ plcf->autogenerated.monitor_log_file_source_line);
263
+ psg_json_value_set_str_array(hierarchy_member, "value",
264
+ plcf->autogenerated.monitor_log_file);
265
+ }
253
266
  if (plcf->autogenerated.app_root_explicitly_set) {
254
267
  find_or_create_manifest_app_and_loc_options_containers(ctx,
255
268
  plcf, cscf, clcf, &app_options_container, &loc_options_container);
@@ -96,6 +96,11 @@ passenger_merge_autogenerated_loc_conf(passenger_autogenerated_loc_conf_t *conf,
96
96
  ngx_conf_merge_str_value(conf->app_group_name,
97
97
  prev->app_group_name,
98
98
  NULL);
99
+ if (merge_string_array(cf, &prev->monitor_log_file, &conf->monitor_log_file) != NGX_OK) {
100
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
101
+ "cannot merge \"passenger_monitor_log_file\" configurations");
102
+ return 0;
103
+ }
99
104
  ngx_conf_merge_str_value(conf->app_root,
100
105
  prev->app_root,
101
106
  NULL);
@@ -56,6 +56,7 @@ typedef struct {
56
56
  ngx_uint_t max_request_queue_size;
57
57
  ngx_uint_t max_requests;
58
58
  ngx_uint_t min_instances;
59
+ ngx_array_t *monitor_log_file;
59
60
  ngx_int_t request_queue_overflow_status_code;
60
61
  ngx_int_t start_timeout;
61
62
  ngx_flag_t sticky_sessions;
@@ -102,6 +103,7 @@ typedef struct {
102
103
  ngx_str_t max_requests_source_file;
103
104
  ngx_str_t meteor_app_settings_source_file;
104
105
  ngx_str_t min_instances_source_file;
106
+ ngx_str_t monitor_log_file_source_file;
105
107
  ngx_str_t nodejs_source_file;
106
108
  ngx_str_t python_source_file;
107
109
  ngx_str_t request_queue_overflow_status_code_source_file;
@@ -149,6 +151,7 @@ typedef struct {
149
151
  ngx_uint_t max_requests_source_line;
150
152
  ngx_uint_t meteor_app_settings_source_line;
151
153
  ngx_uint_t min_instances_source_line;
154
+ ngx_uint_t monitor_log_file_source_line;
152
155
  ngx_uint_t nodejs_source_line;
153
156
  ngx_uint_t python_source_line;
154
157
  ngx_uint_t request_queue_overflow_status_code_source_line;
@@ -196,6 +199,7 @@ typedef struct {
196
199
  ngx_int_t max_requests_explicitly_set;
197
200
  ngx_int_t meteor_app_settings_explicitly_set;
198
201
  ngx_int_t min_instances_explicitly_set;
202
+ ngx_int_t monitor_log_file_explicitly_set;
199
203
  ngx_int_t nodejs_explicitly_set;
200
204
  ngx_int_t python_explicitly_set;
201
205
  ngx_int_t request_queue_overflow_status_code_explicitly_set;
@@ -44,6 +44,8 @@ passenger_create_autogenerated_main_conf(passenger_autogenerated_main_conf_t *co
44
44
  conf->root_dir.len = 0;
45
45
  conf->ctl = NULL;
46
46
  conf->abort_on_startup_error = NGX_CONF_UNSET;
47
+ conf->dump_config_manifest.data = NULL;
48
+ conf->dump_config_manifest.len = 0;
47
49
  conf->log_level = NGX_CONF_UNSET_UINT;
48
50
  conf->log_file.data = NULL;
49
51
  conf->log_file.len = 0;
@@ -70,6 +72,14 @@ passenger_create_autogenerated_main_conf(passenger_autogenerated_main_conf_t *co
70
72
  conf->response_buffer_high_watermark = NGX_CONF_UNSET_UINT;
71
73
  conf->stat_throttle_rate = NGX_CONF_UNSET_UINT;
72
74
  conf->show_version_in_header = NGX_CONF_UNSET;
75
+ conf->admin_panel_url.data = NULL;
76
+ conf->admin_panel_url.len = 0;
77
+ conf->admin_panel_auth_type.data = NULL;
78
+ conf->admin_panel_auth_type.len = 0;
79
+ conf->admin_panel_username.data = NULL;
80
+ conf->admin_panel_username.len = 0;
81
+ conf->admin_panel_password.data = NULL;
82
+ conf->admin_panel_password.len = 0;
73
83
 
74
84
  conf->root_dir_source_file.data = NULL;
75
85
  conf->root_dir_source_file.len = 0;
@@ -83,6 +93,10 @@ passenger_create_autogenerated_main_conf(passenger_autogenerated_main_conf_t *co
83
93
  conf->abort_on_startup_error_source_file.len = 0;
84
94
  conf->abort_on_startup_error_source_line = 0;
85
95
  conf->abort_on_startup_error_explicitly_set = 0;
96
+ conf->dump_config_manifest_source_file.data = NULL;
97
+ conf->dump_config_manifest_source_file.len = 0;
98
+ conf->dump_config_manifest_source_line = 0;
99
+ conf->dump_config_manifest_explicitly_set = 0;
86
100
  conf->log_level_source_file.data = NULL;
87
101
  conf->log_level_source_file.len = 0;
88
102
  conf->log_level_source_line = 0;
@@ -159,5 +173,21 @@ passenger_create_autogenerated_main_conf(passenger_autogenerated_main_conf_t *co
159
173
  conf->show_version_in_header_source_file.len = 0;
160
174
  conf->show_version_in_header_source_line = 0;
161
175
  conf->show_version_in_header_explicitly_set = 0;
176
+ conf->admin_panel_url_source_file.data = NULL;
177
+ conf->admin_panel_url_source_file.len = 0;
178
+ conf->admin_panel_url_source_line = 0;
179
+ conf->admin_panel_url_explicitly_set = 0;
180
+ conf->admin_panel_auth_type_source_file.data = NULL;
181
+ conf->admin_panel_auth_type_source_file.len = 0;
182
+ conf->admin_panel_auth_type_source_line = 0;
183
+ conf->admin_panel_auth_type_explicitly_set = 0;
184
+ conf->admin_panel_username_source_file.data = NULL;
185
+ conf->admin_panel_username_source_file.len = 0;
186
+ conf->admin_panel_username_source_line = 0;
187
+ conf->admin_panel_username_explicitly_set = 0;
188
+ conf->admin_panel_password_source_file.data = NULL;
189
+ conf->admin_panel_password_source_file.len = 0;
190
+ conf->admin_panel_password_source_line = 0;
191
+ conf->admin_panel_password_explicitly_set = 0;
162
192
  }
163
193
 
@@ -78,6 +78,18 @@ generate_config_manifest_for_autogenerated_main_conf(manifest_gen_ctx_t *ctx, pa
78
78
  psg_json_value_set_bool(hierarchy_member, "value",
79
79
  conf->autogenerated.abort_on_startup_error);
80
80
  }
81
+ if (conf->autogenerated.dump_config_manifest_explicitly_set) {
82
+ option_container = find_or_create_manifest_option_container(ctx,
83
+ ctx->global_config_container,
84
+ "passenger_dump_config_manifest",
85
+ sizeof("passenger_dump_config_manifest") - 1);
86
+ hierarchy_member = add_manifest_option_container_hierarchy_member(option_container,
87
+ &conf->autogenerated.dump_config_manifest_source_file,
88
+ conf->autogenerated.dump_config_manifest_source_line);
89
+ psg_json_value_set_str(hierarchy_member, "value",
90
+ (const char *) conf->autogenerated.dump_config_manifest.data,
91
+ conf->autogenerated.dump_config_manifest.len);
92
+ }
81
93
  if (conf->autogenerated.log_level_explicitly_set) {
82
94
  option_container = find_or_create_manifest_option_container(ctx,
83
95
  ctx->global_config_container,
@@ -294,6 +306,54 @@ generate_config_manifest_for_autogenerated_main_conf(manifest_gen_ctx_t *ctx, pa
294
306
  psg_json_value_set_bool(hierarchy_member, "value",
295
307
  conf->autogenerated.show_version_in_header);
296
308
  }
309
+ if (conf->autogenerated.admin_panel_url_explicitly_set) {
310
+ option_container = find_or_create_manifest_option_container(ctx,
311
+ ctx->global_config_container,
312
+ "passenger_admin_panel_url",
313
+ sizeof("passenger_admin_panel_url") - 1);
314
+ hierarchy_member = add_manifest_option_container_hierarchy_member(option_container,
315
+ &conf->autogenerated.admin_panel_url_source_file,
316
+ conf->autogenerated.admin_panel_url_source_line);
317
+ psg_json_value_set_str(hierarchy_member, "value",
318
+ (const char *) conf->autogenerated.admin_panel_url.data,
319
+ conf->autogenerated.admin_panel_url.len);
320
+ }
321
+ if (conf->autogenerated.admin_panel_auth_type_explicitly_set) {
322
+ option_container = find_or_create_manifest_option_container(ctx,
323
+ ctx->global_config_container,
324
+ "passenger_admin_panel_auth_type",
325
+ sizeof("passenger_admin_panel_auth_type") - 1);
326
+ hierarchy_member = add_manifest_option_container_hierarchy_member(option_container,
327
+ &conf->autogenerated.admin_panel_auth_type_source_file,
328
+ conf->autogenerated.admin_panel_auth_type_source_line);
329
+ psg_json_value_set_str(hierarchy_member, "value",
330
+ (const char *) conf->autogenerated.admin_panel_auth_type.data,
331
+ conf->autogenerated.admin_panel_auth_type.len);
332
+ }
333
+ if (conf->autogenerated.admin_panel_username_explicitly_set) {
334
+ option_container = find_or_create_manifest_option_container(ctx,
335
+ ctx->global_config_container,
336
+ "passenger_admin_panel_username",
337
+ sizeof("passenger_admin_panel_username") - 1);
338
+ hierarchy_member = add_manifest_option_container_hierarchy_member(option_container,
339
+ &conf->autogenerated.admin_panel_username_source_file,
340
+ conf->autogenerated.admin_panel_username_source_line);
341
+ psg_json_value_set_str(hierarchy_member, "value",
342
+ (const char *) conf->autogenerated.admin_panel_username.data,
343
+ conf->autogenerated.admin_panel_username.len);
344
+ }
345
+ if (conf->autogenerated.admin_panel_password_explicitly_set) {
346
+ option_container = find_or_create_manifest_option_container(ctx,
347
+ ctx->global_config_container,
348
+ "passenger_admin_panel_password",
349
+ sizeof("passenger_admin_panel_password") - 1);
350
+ hierarchy_member = add_manifest_option_container_hierarchy_member(option_container,
351
+ &conf->autogenerated.admin_panel_password_source_file,
352
+ conf->autogenerated.admin_panel_password_source_line);
353
+ psg_json_value_set_str(hierarchy_member, "value",
354
+ (const char *) conf->autogenerated.admin_panel_password.data,
355
+ conf->autogenerated.admin_panel_password.len);
356
+ }
297
357
 
298
358
  /*
299
359
  * No autogenerated code for:
@@ -53,9 +53,14 @@ typedef struct {
53
53
  ngx_uint_t stat_throttle_rate;
54
54
  ngx_flag_t turbocaching;
55
55
  ngx_flag_t user_switching;
56
+ ngx_str_t admin_panel_auth_type;
57
+ ngx_str_t admin_panel_password;
58
+ ngx_str_t admin_panel_url;
59
+ ngx_str_t admin_panel_username;
56
60
  ngx_str_t data_buffer_dir;
57
61
  ngx_str_t default_group;
58
62
  ngx_str_t default_user;
63
+ ngx_str_t dump_config_manifest;
59
64
  ngx_str_t file_descriptor_log_file;
60
65
  ngx_str_t instance_registry_dir;
61
66
  ngx_str_t log_file;
@@ -63,12 +68,17 @@ typedef struct {
63
68
  ngx_str_t security_update_check_proxy;
64
69
 
65
70
  ngx_str_t abort_on_startup_error_source_file;
71
+ ngx_str_t admin_panel_auth_type_source_file;
72
+ ngx_str_t admin_panel_password_source_file;
73
+ ngx_str_t admin_panel_url_source_file;
74
+ ngx_str_t admin_panel_username_source_file;
66
75
  ngx_str_t core_file_descriptor_ulimit_source_file;
67
76
  ngx_str_t ctl_source_file;
68
77
  ngx_str_t data_buffer_dir_source_file;
69
78
  ngx_str_t default_group_source_file;
70
79
  ngx_str_t default_user_source_file;
71
80
  ngx_str_t disable_security_update_check_source_file;
81
+ ngx_str_t dump_config_manifest_source_file;
72
82
  ngx_str_t file_descriptor_log_file_source_file;
73
83
  ngx_str_t instance_registry_dir_source_file;
74
84
  ngx_str_t log_file_source_file;
@@ -86,12 +96,17 @@ typedef struct {
86
96
  ngx_str_t user_switching_source_file;
87
97
 
88
98
  ngx_uint_t abort_on_startup_error_source_line;
99
+ ngx_uint_t admin_panel_auth_type_source_line;
100
+ ngx_uint_t admin_panel_password_source_line;
101
+ ngx_uint_t admin_panel_url_source_line;
102
+ ngx_uint_t admin_panel_username_source_line;
89
103
  ngx_uint_t core_file_descriptor_ulimit_source_line;
90
104
  ngx_uint_t ctl_source_line;
91
105
  ngx_uint_t data_buffer_dir_source_line;
92
106
  ngx_uint_t default_group_source_line;
93
107
  ngx_uint_t default_user_source_line;
94
108
  ngx_uint_t disable_security_update_check_source_line;
109
+ ngx_uint_t dump_config_manifest_source_line;
95
110
  ngx_uint_t file_descriptor_log_file_source_line;
96
111
  ngx_uint_t instance_registry_dir_source_line;
97
112
  ngx_uint_t log_file_source_line;
@@ -109,12 +124,17 @@ typedef struct {
109
124
  ngx_uint_t user_switching_source_line;
110
125
 
111
126
  ngx_int_t abort_on_startup_error_explicitly_set;
127
+ ngx_int_t admin_panel_auth_type_explicitly_set;
128
+ ngx_int_t admin_panel_password_explicitly_set;
129
+ ngx_int_t admin_panel_url_explicitly_set;
130
+ ngx_int_t admin_panel_username_explicitly_set;
112
131
  ngx_int_t core_file_descriptor_ulimit_explicitly_set;
113
132
  ngx_int_t ctl_explicitly_set;
114
133
  ngx_int_t data_buffer_dir_explicitly_set;
115
134
  ngx_int_t default_group_explicitly_set;
116
135
  ngx_int_t default_user_explicitly_set;
117
136
  ngx_int_t disable_security_update_check_explicitly_set;
137
+ ngx_int_t dump_config_manifest_explicitly_set;
118
138
  ngx_int_t file_descriptor_log_file_explicitly_set;
119
139
  ngx_int_t instance_registry_dir_explicitly_set;
120
140
  ngx_int_t log_file_explicitly_set;
@@ -374,6 +374,10 @@ start_watchdog(ngx_cycle_t *cycle) {
374
374
  psg_json_value_set_ngx_uint (w_config, "pool_idle_time", autogenerated_main_conf->pool_idle_time);
375
375
  psg_json_value_set_ngx_uint (w_config, "response_buffer_high_watermark", autogenerated_main_conf->response_buffer_high_watermark);
376
376
  psg_json_value_set_ngx_uint (w_config, "stat_throttle_rate", autogenerated_main_conf->stat_throttle_rate);
377
+ psg_json_value_set_ngx_str_ne(w_config, "admin_panel_url", &autogenerated_main_conf->admin_panel_url);
378
+ psg_json_value_set_ngx_str_ne(w_config, "admin_panel_auth_type", &autogenerated_main_conf->admin_panel_auth_type);
379
+ psg_json_value_set_ngx_str_ne(w_config, "admin_panel_username", &autogenerated_main_conf->admin_panel_username);
380
+ psg_json_value_set_ngx_str_ne(w_config, "admin_panel_password", &autogenerated_main_conf->admin_panel_password);
377
381
 
378
382
  if (autogenerated_main_conf->prestart_uris != NGX_CONF_UNSET_PTR) {
379
383
  psg_json_value_set_strset(w_config, "prestart_urls", (ngx_str_t *) autogenerated_main_conf->prestart_uris->elts,
@@ -31,7 +31,7 @@ module PhusionPassenger
31
31
 
32
32
  PACKAGE_NAME = 'passenger'
33
33
  # Run 'rake src/cxx_supportlib/Constants.h configkit_schemas_inline_comments' after changing this number.
34
- VERSION_STRING = '5.2.1'
34
+ VERSION_STRING = '5.2.2'
35
35
 
36
36
  PREFERRED_NGINX_VERSION = '1.12.2'
37
37
  NGINX_SHA256_CHECKSUM = '305f379da1d5fb5aefa79e45c829852ca6983c7cd2a79328f8e084a324cf0416'
@@ -1,5 +1,5 @@
1
1
  # Phusion Passenger - https://www.phusionpassenger.com/
2
- # Copyright (c) 2014-2017 Phusion Holding B.V.
2
+ # Copyright (c) 2014-2018 Phusion Holding B.V.
3
3
  #
4
4
  # "Passenger", "Phusion Passenger" and "Union Station" are registered
5
5
  # trademarks of Phusion Holding B.V.
@@ -107,6 +107,12 @@ APACHE2_CONFIGURATION_OPTIONS = [
107
107
  :function => 'cmd_passenger_ctl',
108
108
  :desc => "Set advanced #{PROGRAM_NAME} options."
109
109
  },
110
+ {
111
+ :name => 'PassengerDumpConfigManifest',
112
+ :type => :string,
113
+ :context => :global,
114
+ :desc => "Dump the #{SHORT_PROGRAM_NAME} config manifest to the given file, for debugging purposes."
115
+ },
110
116
  {
111
117
  :name => 'PassengerDefaultRuby',
112
118
  :type => :string,
@@ -260,6 +266,30 @@ APACHE2_CONFIGURATION_OPTIONS = [
260
266
  :header => 'PASSENGER_MAX_PROCESSES',
261
267
  :desc => 'The maximum number of simultaneously alive application instances a single application may occupy.'
262
268
  },
269
+ {
270
+ :name => 'PassengerAdminPanelUrl',
271
+ :type => :string,
272
+ :context => :global,
273
+ :desc => 'Connect to an admin panel at the given connector URL'
274
+ },
275
+ {
276
+ :name => 'PassengerAdminPanelAuthType',
277
+ :type => :string,
278
+ :context => :global,
279
+ :desc => 'The authentication type to use when connecting to the admin panel'
280
+ },
281
+ {
282
+ :name => 'PassengerAdminPanelUsername',
283
+ :type => :string,
284
+ :context => :global,
285
+ :desc => 'The username to use when connecting to the admin panel using basic authentication'
286
+ },
287
+ {
288
+ :name => 'PassengerAdminPanelPassword',
289
+ :type => :string,
290
+ :context => :global,
291
+ :desc => 'The password to use when connecting to the admin panel using basic authentication'
292
+ },
263
293
 
264
294
  ###### Per-application configuration ######
265
295
 
@@ -399,6 +429,12 @@ APACHE2_CONFIGURATION_OPTIONS = [
399
429
  :dynamic_default => 'PassengerAppRoot plus PassengerAppEnv',
400
430
  :desc => 'Application process group name.'
401
431
  },
432
+ {
433
+ :name => 'PassengerMonitorLogFile',
434
+ :type => :string_set,
435
+ :header => nil,
436
+ :desc => 'Log file path to monitor.'
437
+ },
402
438
  {
403
439
  :name => 'PassengerForceMaxConcurrentRequestsPerProcess',
404
440
  :type => :integer,
@@ -86,6 +86,7 @@ module PhusionPassenger
86
86
  # but there's no real average upload size anyway so we choose mem safety instead.
87
87
  DEFAULT_FILE_BUFFERED_CHANNEL_THRESHOLD = 1024 * 128
88
88
  SERVER_KIT_MAX_SERVER_ENDPOINTS = 4
89
+ LOG_MONITORING_MAX_LINES = 200
89
90
 
90
91
  # Time limits
91
92
  PROCESS_SHUTDOWN_TIMEOUT = 60 # In seconds
@@ -1,5 +1,5 @@
1
1
  # Phusion Passenger - https://www.phusionpassenger.com/
2
- # Copyright (c) 2013-2017 Phusion Holding B.V.
2
+ # Copyright (c) 2013-2018 Phusion Holding B.V.
3
3
  #
4
4
  # "Passenger", "Phusion Passenger" and "Union Station" are registered
5
5
  # trademarks of Phusion Holding B.V.
@@ -129,6 +129,13 @@ NGINX_CONFIGURATION_OPTIONS = [
129
129
  :context => [:main],
130
130
  :struct => 'NGX_HTTP_MAIN_CONF_OFFSET'
131
131
  },
132
+ {
133
+ :name => 'passenger_dump_config_manifest',
134
+ :scope => :global,
135
+ :type => :string,
136
+ :context => [:main],
137
+ :struct => 'NGX_HTTP_MAIN_CONF_OFFSET'
138
+ },
132
139
  {
133
140
  :name => 'passenger_log_level',
134
141
  :scope => :global,
@@ -285,6 +292,34 @@ NGINX_CONFIGURATION_OPTIONS = [
285
292
  :type => :uinteger,
286
293
  :dynamic_default => 'passenger_core_file_descriptor_ulimit'
287
294
  },
295
+ {
296
+ :name => 'passenger_admin_panel_url',
297
+ :scope => :global,
298
+ :type => :string,
299
+ :context => [:main],
300
+ :struct => 'NGX_HTTP_MAIN_CONF_OFFSET'
301
+ },
302
+ {
303
+ :name => 'passenger_admin_panel_auth_type',
304
+ :scope => :global,
305
+ :type => :string,
306
+ :context => [:main],
307
+ :struct => 'NGX_HTTP_MAIN_CONF_OFFSET'
308
+ },
309
+ {
310
+ :name => 'passenger_admin_panel_username',
311
+ :scope => :global,
312
+ :type => :string,
313
+ :context => [:main],
314
+ :struct => 'NGX_HTTP_MAIN_CONF_OFFSET'
315
+ },
316
+ {
317
+ :name => 'passenger_admin_panel_password',
318
+ :scope => :global,
319
+ :type => :string,
320
+ :context => [:main],
321
+ :struct => 'NGX_HTTP_MAIN_CONF_OFFSET'
322
+ },
288
323
  {
289
324
  :name => 'passenger_enabled',
290
325
  :scope => :location,
@@ -388,6 +423,12 @@ NGINX_CONFIGURATION_OPTIONS = [
388
423
  :type => :string,
389
424
  :dynamic_default => 'passenger_app_root plus passenger_app_env'
390
425
  },
426
+ {
427
+ :name => 'passenger_monitor_log_file',
428
+ :scope => :application,
429
+ :type => :string_array,
430
+ :header => nil
431
+ },
391
432
  {
392
433
  :name => 'passenger_app_root',
393
434
  :scope => :application,