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.
- checksums.yaml +4 -4
- data/CHANGELOG +8 -0
- data/CODE_OF_CONDUCT.md +52 -0
- data/README.md +17 -9
- data/build/agent.rb +3 -1
- data/build/cxx_tests.rb +1 -0
- data/build/schema_printer.rb +1 -0
- data/build/support/cxx_dependency_map.rb +338 -31
- data/dev/configkit-schemas/index.json +64 -15
- data/dev/copy_boost_headers +1 -0
- data/images/justin.png +0 -0
- data/images/passenger_logo.svg +45 -0
- data/images/spark.png +0 -0
- data/resources/templates/standalone/http.erb +4 -0
- data/src/agent/AgentMain.cpp +4 -0
- data/src/agent/Core/AdminPanelConnector.h +133 -5
- data/src/agent/Core/ApplicationPool/Implementation.cpp +1 -0
- data/src/agent/Core/ApplicationPool/Options.h +7 -1
- data/src/agent/Core/ApplicationPool/Pool.h +1 -0
- data/src/agent/Core/ApplicationPool/Pool/GroupUtils.cpp +11 -0
- data/src/agent/Core/ApplicationPool/Process.cpp +52 -0
- data/src/agent/Core/ApplicationPool/Process.h +4 -8
- data/src/agent/Core/Config.h +6 -2
- data/src/agent/Core/ConfigChange.cpp +12 -1
- data/src/agent/Core/ConfigChange.h +3 -0
- data/src/agent/Core/Controller/Config.h +1 -1
- data/src/agent/Core/Controller/InitRequest.cpp +1 -1
- data/src/agent/Core/Controller/InternalUtils.cpp +2 -2
- data/src/agent/Core/CoreMain.cpp +18 -5
- data/src/agent/Core/SpawningKit/BackgroundIOCapturer.h +8 -4
- data/src/agent/Core/SpawningKit/DirectSpawner.h +3 -1
- data/src/agent/Core/SpawningKit/PipeWatcher.h +9 -4
- data/src/agent/Core/SpawningKit/SmartSpawner.h +5 -3
- data/src/agent/Core/SpawningKit/Spawner.h +1 -1
- data/src/agent/ExecHelper/ExecHelperMain.cpp +295 -0
- data/src/agent/Shared/Fundamentals/Initialization.cpp +11 -8
- data/src/agent/Shared/Fundamentals/Initialization.h +2 -2
- data/src/agent/Watchdog/Config.h +5 -2
- data/src/apache2_module/Config.cpp +13 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +30 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +90 -0
- data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +18 -2
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +5 -0
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +12 -0
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -0
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +13 -0
- data/src/apache2_module/Hooks.cpp +4 -0
- data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp +55 -0
- data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +65 -0
- data/src/cxx_supportlib/BackgroundEventLoop.cpp +3 -3
- data/src/cxx_supportlib/ConfigKit/Schema.h +53 -31
- data/src/cxx_supportlib/ConfigKit/Store.h +12 -8
- data/src/cxx_supportlib/Constants.h +2 -1
- data/src/cxx_supportlib/DataStructures/StringKeyTable.h +4 -0
- data/src/cxx_supportlib/FileTools/PathManipCBindings.cpp +22 -1
- data/src/cxx_supportlib/FileTools/PathManipCBindings.h +3 -1
- data/src/cxx_supportlib/LoggingKit/Config.h +2 -0
- data/src/cxx_supportlib/LoggingKit/Context.h +28 -0
- data/src/cxx_supportlib/LoggingKit/Forward.h +0 -1
- data/src/cxx_supportlib/LoggingKit/Implementation.cpp +112 -9
- data/src/cxx_supportlib/LoggingKit/Logging.h +4 -2
- data/src/cxx_supportlib/WebSocketCommandReverseServer.h +34 -43
- data/src/cxx_supportlib/vendor-modified/boost/call_traits.hpp +20 -0
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer.hpp +62 -0
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/base.hpp +3123 -0
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/debug.hpp +248 -0
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/details.hpp +498 -0
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/space_optimized.hpp +1719 -0
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer_fwd.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/detail/call_traits.hpp +172 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +48 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +72 -0
- data/src/nginx_module/ConfigGeneral/ManifestGeneration.c +32 -0
- data/src/nginx_module/ConfigGeneral/ManifestGeneration.h +3 -0
- data/src/nginx_module/Configuration.c +25 -0
- data/src/nginx_module/ContentHandler.c +42 -4
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +5 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +13 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +5 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +4 -0
- data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c +30 -0
- data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c +60 -0
- data/src/nginx_module/MainConfig/AutoGeneratedStruct.h +20 -0
- data/src/nginx_module/ngx_http_passenger_module.c +4 -0
- data/src/ruby_supportlib/phusion_passenger.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +37 -1
- data/src/ruby_supportlib/phusion_passenger/constants.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +42 -1
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +2 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info/crypto.rb +13 -3
- data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +20 -0
- metadata +16 -2
@@ -38,6 +38,66 @@
|
|
38
38
|
* rake src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp
|
39
39
|
*/
|
40
40
|
|
41
|
+
static const char *
|
42
|
+
cmd_passenger_admin_panel_auth_type(cmd_parms *cmd, void *pcfg, const char *arg) {
|
43
|
+
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
|
44
|
+
if (err != NULL) {
|
45
|
+
ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->temp_pool,
|
46
|
+
"WARNING: %s", err);
|
47
|
+
}
|
48
|
+
|
49
|
+
serverConfig.adminPanelAuthTypeSourceFile = cmd->directive->filename;
|
50
|
+
serverConfig.adminPanelAuthTypeSourceLine = cmd->directive->line_num;
|
51
|
+
serverConfig.adminPanelAuthTypeExplicitlySet = true;
|
52
|
+
serverConfig.adminPanelAuthType = arg;
|
53
|
+
return NULL;
|
54
|
+
}
|
55
|
+
|
56
|
+
static const char *
|
57
|
+
cmd_passenger_admin_panel_password(cmd_parms *cmd, void *pcfg, const char *arg) {
|
58
|
+
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
|
59
|
+
if (err != NULL) {
|
60
|
+
ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->temp_pool,
|
61
|
+
"WARNING: %s", err);
|
62
|
+
}
|
63
|
+
|
64
|
+
serverConfig.adminPanelPasswordSourceFile = cmd->directive->filename;
|
65
|
+
serverConfig.adminPanelPasswordSourceLine = cmd->directive->line_num;
|
66
|
+
serverConfig.adminPanelPasswordExplicitlySet = true;
|
67
|
+
serverConfig.adminPanelPassword = arg;
|
68
|
+
return NULL;
|
69
|
+
}
|
70
|
+
|
71
|
+
static const char *
|
72
|
+
cmd_passenger_admin_panel_url(cmd_parms *cmd, void *pcfg, const char *arg) {
|
73
|
+
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
|
74
|
+
if (err != NULL) {
|
75
|
+
ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->temp_pool,
|
76
|
+
"WARNING: %s", err);
|
77
|
+
}
|
78
|
+
|
79
|
+
serverConfig.adminPanelUrlSourceFile = cmd->directive->filename;
|
80
|
+
serverConfig.adminPanelUrlSourceLine = cmd->directive->line_num;
|
81
|
+
serverConfig.adminPanelUrlExplicitlySet = true;
|
82
|
+
serverConfig.adminPanelUrl = arg;
|
83
|
+
return NULL;
|
84
|
+
}
|
85
|
+
|
86
|
+
static const char *
|
87
|
+
cmd_passenger_admin_panel_username(cmd_parms *cmd, void *pcfg, const char *arg) {
|
88
|
+
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
|
89
|
+
if (err != NULL) {
|
90
|
+
ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->temp_pool,
|
91
|
+
"WARNING: %s", err);
|
92
|
+
}
|
93
|
+
|
94
|
+
serverConfig.adminPanelUsernameSourceFile = cmd->directive->filename;
|
95
|
+
serverConfig.adminPanelUsernameSourceLine = cmd->directive->line_num;
|
96
|
+
serverConfig.adminPanelUsernameExplicitlySet = true;
|
97
|
+
serverConfig.adminPanelUsername = arg;
|
98
|
+
return NULL;
|
99
|
+
}
|
100
|
+
|
41
101
|
static const char *
|
42
102
|
cmd_passenger_allow_encoded_slashes(cmd_parms *cmd, void *pcfg, const char *arg) {
|
43
103
|
DirConfig *config = (DirConfig *) pcfg;
|
@@ -226,6 +286,21 @@ cmd_passenger_disable_security_update_check(cmd_parms *cmd, void *pcfg, const ch
|
|
226
286
|
return NULL;
|
227
287
|
}
|
228
288
|
|
289
|
+
static const char *
|
290
|
+
cmd_passenger_dump_config_manifest(cmd_parms *cmd, void *pcfg, const char *arg) {
|
291
|
+
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
|
292
|
+
if (err != NULL) {
|
293
|
+
ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->temp_pool,
|
294
|
+
"WARNING: %s", err);
|
295
|
+
}
|
296
|
+
|
297
|
+
serverConfig.dumpConfigManifestSourceFile = cmd->directive->filename;
|
298
|
+
serverConfig.dumpConfigManifestSourceLine = cmd->directive->line_num;
|
299
|
+
serverConfig.dumpConfigManifestExplicitlySet = true;
|
300
|
+
serverConfig.dumpConfigManifest = arg;
|
301
|
+
return NULL;
|
302
|
+
}
|
303
|
+
|
229
304
|
static const char *
|
230
305
|
cmd_passenger_enabled(cmd_parms *cmd, void *pcfg, const char *arg) {
|
231
306
|
DirConfig *config = (DirConfig *) pcfg;
|
@@ -502,6 +577,21 @@ cmd_passenger_min_instances(cmd_parms *cmd, void *pcfg, const char *arg) {
|
|
502
577
|
return setIntConfig(cmd, arg, config->mMinInstances, 0);
|
503
578
|
}
|
504
579
|
|
580
|
+
static const char *
|
581
|
+
cmd_passenger_monitor_log_file(cmd_parms *cmd, void *pcfg, const char *arg) {
|
582
|
+
const char *err = ap_check_cmd_context(cmd, NOT_IN_FILES);
|
583
|
+
if (err != NULL) {
|
584
|
+
return err;
|
585
|
+
}
|
586
|
+
|
587
|
+
DirConfig *config = (DirConfig *) pcfg;
|
588
|
+
config->mMonitorLogFileSourceFile = cmd->directive->filename;
|
589
|
+
config->mMonitorLogFileSourceLine = cmd->directive->line_num;
|
590
|
+
config->mMonitorLogFileExplicitlySet = true;
|
591
|
+
config->mMonitorLogFile.insert(arg);
|
592
|
+
return NULL;
|
593
|
+
}
|
594
|
+
|
505
595
|
static const char *
|
506
596
|
cmd_passenger_nodejs(cmd_parms *cmd, void *pcfg, const char *arg) {
|
507
597
|
const char *err = ap_check_cmd_context(cmd, NOT_IN_FILES);
|
@@ -28,6 +28,7 @@
|
|
28
28
|
|
29
29
|
#include <string>
|
30
30
|
#include <cstddef>
|
31
|
+
#include <string>
|
31
32
|
#include <boost/function.hpp>
|
32
33
|
#include <jsoncpp/json.h>
|
33
34
|
|
@@ -98,6 +99,17 @@ private:
|
|
98
99
|
Json::Value &appConfigContainer = findOrCreateAppConfigContainer(appGroupName);
|
99
100
|
*appOptionsContainer = &appConfigContainer["options"];
|
100
101
|
*locOptionsContainer = &appConfigContainer["default_location_configuration"];
|
102
|
+
|
103
|
+
// Create a default value for passenger_app_root
|
104
|
+
// if we just created this config container
|
105
|
+
if ((*appOptionsContainer)->empty()) {
|
106
|
+
addOptionsContainerStaticDefaultStr(**appOptionsContainer,
|
107
|
+
"PassengerAppGroupName",
|
108
|
+
appGroupName);
|
109
|
+
addOptionsContainerStaticDefaultStr(**appOptionsContainer,
|
110
|
+
"PassengerAppRoot",
|
111
|
+
inferDefaultAppRoot(csconf));
|
112
|
+
}
|
101
113
|
} else {
|
102
114
|
// We are inside a <Directory> or <Location>
|
103
115
|
string appGroupName = inferLocConfAppGroupName(csconf, pdconf);
|
@@ -135,6 +147,10 @@ private:
|
|
135
147
|
}
|
136
148
|
}
|
137
149
|
|
150
|
+
string inferDefaultAppRoot(core_server_config *csconf) {
|
151
|
+
return absolutizePath(csconf->ap_document_root + P_STATIC_STRING("/.."));
|
152
|
+
}
|
153
|
+
|
138
154
|
Json::Value &findOrCreateAppConfigContainer(const string &appGroupName) {
|
139
155
|
Json::Value &result = manifest["application_configurations"][appGroupName];
|
140
156
|
if (result.isNull()) {
|
@@ -261,8 +277,8 @@ private:
|
|
261
277
|
Json::Value &appConfigsContainer = manifest["application_configurations"];
|
262
278
|
Json::Value::iterator it, end = appConfigsContainer.end();
|
263
279
|
|
264
|
-
reverseValueHierarchiesInOptionsContainer(manifest["
|
265
|
-
reverseValueHierarchiesInOptionsContainer(manifest["
|
280
|
+
reverseValueHierarchiesInOptionsContainer(manifest["global_configuration"]);
|
281
|
+
reverseValueHierarchiesInOptionsContainer(manifest["default_application_configuration"]);
|
266
282
|
reverseValueHierarchiesInOptionsContainer(manifest["default_location_configuration"]);
|
267
283
|
|
268
284
|
for (it = appConfigsContainer.begin(); it != end; it++) {
|
@@ -77,6 +77,9 @@ createDirConfig_autoGenerated(DirConfig *config) {
|
|
77
77
|
* config->mMeteorAppSettings: default initialized
|
78
78
|
*/
|
79
79
|
config->mMinInstances = UNSET_INT_VALUE;
|
80
|
+
/*
|
81
|
+
* config->mMonitorLogFile: default initialized
|
82
|
+
*/
|
80
83
|
/*
|
81
84
|
* config->mNodejs: default initialized
|
82
85
|
*/
|
@@ -125,6 +128,7 @@ createDirConfig_autoGenerated(DirConfig *config) {
|
|
125
128
|
config->mMaxRequestsSourceLine = 0;
|
126
129
|
config->mMeteorAppSettingsSourceLine = 0;
|
127
130
|
config->mMinInstancesSourceLine = 0;
|
131
|
+
config->mMonitorLogFileSourceLine = 0;
|
128
132
|
config->mNodejsSourceLine = 0;
|
129
133
|
config->mPythonSourceLine = 0;
|
130
134
|
config->mRestartDirSourceLine = 0;
|
@@ -157,6 +161,7 @@ createDirConfig_autoGenerated(DirConfig *config) {
|
|
157
161
|
config->mMaxRequestsExplicitlySet = false;
|
158
162
|
config->mMeteorAppSettingsExplicitlySet = false;
|
159
163
|
config->mMinInstancesExplicitlySet = false;
|
164
|
+
config->mMonitorLogFileExplicitlySet = false;
|
160
165
|
config->mNodejsExplicitlySet = false;
|
161
166
|
config->mPythonExplicitlySet = false;
|
162
167
|
config->mRestartDirExplicitlySet = false;
|
@@ -292,6 +292,18 @@ ConfigManifestGenerator::autoGenerated_generateConfigManifestForDirConfig(server
|
|
292
292
|
pdconf->mMinInstancesSourceLine);
|
293
293
|
hierarchyMember["value"] = pdconf->mMinInstances;
|
294
294
|
}
|
295
|
+
if (pdconf->mMonitorLogFileExplicitlySet) {
|
296
|
+
findOrCreateAppAndLocOptionsContainers(serverRec, csconf, cdconf,
|
297
|
+
pdconf, context, &appOptionsContainer, &locOptionsContainer);
|
298
|
+
Json::Value &optionContainer = findOrCreateOptionContainer(*appOptionsContainer,
|
299
|
+
"PassengerMonitorLogFile",
|
300
|
+
sizeof("PassengerMonitorLogFile") - 1);
|
301
|
+
Json::Value &hierarchyMember = addOptionContainerHierarchyMember(optionContainer,
|
302
|
+
pdconf->mMonitorLogFileSourceFile,
|
303
|
+
pdconf->mMonitorLogFileSourceLine);
|
304
|
+
hierarchyMember["value"] = strCollectionToJson< std::set<std::string>, std::string >(
|
305
|
+
pdconf->mMonitorLogFile);
|
306
|
+
}
|
295
307
|
if (pdconf->mNodejsExplicitlySet) {
|
296
308
|
findOrCreateAppAndLocOptionsContainers(serverRec, csconf, cdconf,
|
297
309
|
pdconf, context, &appOptionsContainer, &locOptionsContainer);
|
@@ -126,6 +126,10 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
|
|
126
126
|
(add->mMinInstances != UNSET_INT_VALUE)
|
127
127
|
? add->mMinInstances
|
128
128
|
: base->mMinInstances;
|
129
|
+
config->mMonitorLogFile =
|
130
|
+
(!add->mMonitorLogFile.empty())
|
131
|
+
? add->mMonitorLogFile
|
132
|
+
: base->mMonitorLogFile;
|
129
133
|
config->mNodejs =
|
130
134
|
(!add->mNodejs.empty())
|
131
135
|
? add->mNodejs
|
@@ -188,6 +192,7 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
|
|
188
192
|
config->mMaxRequestsSourceFile = add->mMaxRequestsSourceFile;
|
189
193
|
config->mMeteorAppSettingsSourceFile = add->mMeteorAppSettingsSourceFile;
|
190
194
|
config->mMinInstancesSourceFile = add->mMinInstancesSourceFile;
|
195
|
+
config->mMonitorLogFileSourceFile = add->mMonitorLogFileSourceFile;
|
191
196
|
config->mNodejsSourceFile = add->mNodejsSourceFile;
|
192
197
|
config->mPythonSourceFile = add->mPythonSourceFile;
|
193
198
|
config->mRestartDirSourceFile = add->mRestartDirSourceFile;
|
@@ -220,6 +225,7 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
|
|
220
225
|
config->mMaxRequestsSourceLine = add->mMaxRequestsSourceLine;
|
221
226
|
config->mMeteorAppSettingsSourceLine = add->mMeteorAppSettingsSourceLine;
|
222
227
|
config->mMinInstancesSourceLine = add->mMinInstancesSourceLine;
|
228
|
+
config->mMonitorLogFileSourceLine = add->mMonitorLogFileSourceLine;
|
223
229
|
config->mNodejsSourceLine = add->mNodejsSourceLine;
|
224
230
|
config->mPythonSourceLine = add->mPythonSourceLine;
|
225
231
|
config->mRestartDirSourceLine = add->mRestartDirSourceLine;
|
@@ -252,6 +258,7 @@ mergeDirConfig_autoGenerated(DirConfig *config, DirConfig *base, DirConfig *add)
|
|
252
258
|
config->mMaxRequestsExplicitlySet = add->mMaxRequestsExplicitlySet;
|
253
259
|
config->mMeteorAppSettingsExplicitlySet = add->mMeteorAppSettingsExplicitlySet;
|
254
260
|
config->mMinInstancesExplicitlySet = add->mMinInstancesExplicitlySet;
|
261
|
+
config->mMonitorLogFileExplicitlySet = add->mMonitorLogFileExplicitlySet;
|
255
262
|
config->mNodejsExplicitlySet = add->mNodejsExplicitlySet;
|
256
263
|
config->mPythonExplicitlySet = add->mPythonExplicitlySet;
|
257
264
|
config->mRestartDirExplicitlySet = add->mRestartDirExplicitlySet;
|
@@ -194,6 +194,11 @@ struct AutoGeneratedDirConfig {
|
|
194
194
|
*/
|
195
195
|
std::set<std::string> mBaseURIs;
|
196
196
|
|
197
|
+
/*
|
198
|
+
* Log file path to monitor.
|
199
|
+
*/
|
200
|
+
std::set<std::string> mMonitorLogFile;
|
201
|
+
|
197
202
|
|
198
203
|
StaticString mAllowEncodedSlashesSourceFile;
|
199
204
|
StaticString mBufferResponseSourceFile;
|
@@ -226,6 +231,7 @@ struct AutoGeneratedDirConfig {
|
|
226
231
|
StaticString mStickySessionsCookieNameSourceFile;
|
227
232
|
StaticString mUserSourceFile;
|
228
233
|
StaticString mBaseURIsSourceFile;
|
234
|
+
StaticString mMonitorLogFileSourceFile;
|
229
235
|
|
230
236
|
unsigned int mAllowEncodedSlashesSourceLine;
|
231
237
|
unsigned int mBufferResponseSourceLine;
|
@@ -258,6 +264,7 @@ struct AutoGeneratedDirConfig {
|
|
258
264
|
unsigned int mStickySessionsCookieNameSourceLine;
|
259
265
|
unsigned int mUserSourceLine;
|
260
266
|
unsigned int mBaseURIsSourceLine;
|
267
|
+
unsigned int mMonitorLogFileSourceLine;
|
261
268
|
|
262
269
|
bool mAllowEncodedSlashesExplicitlySet: 1;
|
263
270
|
bool mBufferResponseExplicitlySet: 1;
|
@@ -290,6 +297,7 @@ struct AutoGeneratedDirConfig {
|
|
290
297
|
bool mStickySessionsCookieNameExplicitlySet: 1;
|
291
298
|
bool mUserExplicitlySet: 1;
|
292
299
|
bool mBaseURIsExplicitlySet: 1;
|
300
|
+
bool mMonitorLogFileExplicitlySet: 1;
|
293
301
|
|
294
302
|
|
295
303
|
bool
|
@@ -531,4 +539,9 @@ struct AutoGeneratedDirConfig {
|
|
531
539
|
return mBaseURIs;
|
532
540
|
}
|
533
541
|
|
542
|
+
const std::set<std::string> &
|
543
|
+
getMonitorLogFile() const {
|
544
|
+
return mMonitorLogFile;
|
545
|
+
}
|
546
|
+
|
534
547
|
};
|
@@ -1330,6 +1330,10 @@ public:
|
|
1330
1330
|
config["stat_throttle_rate"] = serverConfig.statThrottleRate;
|
1331
1331
|
config["turbocaching"] = serverConfig.turbocaching;
|
1332
1332
|
config["prestart_urls"] = strsetToJson(serverConfig.prestartURLs);
|
1333
|
+
config["admin_panel_url"] = nonEmptyString(serverConfig.adminPanelUrl);
|
1334
|
+
config["admin_panel_auth_type"] = nonEmptyString(serverConfig.adminPanelAuthType);
|
1335
|
+
config["admin_panel_username"] = nonEmptyString(serverConfig.adminPanelUsername);
|
1336
|
+
config["admin_panel_password"] = nonEmptyString(serverConfig.adminPanelPassword);
|
1333
1337
|
|
1334
1338
|
if (!serverConfig.logFile.empty()) {
|
1335
1339
|
config["log_target"] = serverConfig.logFile.toString();
|
@@ -47,6 +47,50 @@ void
|
|
47
47
|
ConfigManifestGenerator::autoGenerated_generateConfigManifestForServerConfig() {
|
48
48
|
Json::Value &globalOptionsContainer = manifest["global_configuration"];
|
49
49
|
|
50
|
+
if (serverConfig.adminPanelAuthTypeExplicitlySet) {
|
51
|
+
Json::Value &optionContainer = findOrCreateOptionContainer(globalOptionsContainer,
|
52
|
+
"PassengerAdminPanelAuthType",
|
53
|
+
sizeof("PassengerAdminPanelAuthType") - 1);
|
54
|
+
Json::Value &hierarchyMember = addOptionContainerHierarchyMember(optionContainer,
|
55
|
+
serverConfig.adminPanelAuthTypeSourceFile,
|
56
|
+
serverConfig.adminPanelAuthTypeSourceLine);
|
57
|
+
hierarchyMember["value"] = Json::Value(
|
58
|
+
serverConfig.adminPanelAuthType.data(),
|
59
|
+
serverConfig.adminPanelAuthType.data() + serverConfig.adminPanelAuthType.size());
|
60
|
+
}
|
61
|
+
if (serverConfig.adminPanelPasswordExplicitlySet) {
|
62
|
+
Json::Value &optionContainer = findOrCreateOptionContainer(globalOptionsContainer,
|
63
|
+
"PassengerAdminPanelPassword",
|
64
|
+
sizeof("PassengerAdminPanelPassword") - 1);
|
65
|
+
Json::Value &hierarchyMember = addOptionContainerHierarchyMember(optionContainer,
|
66
|
+
serverConfig.adminPanelPasswordSourceFile,
|
67
|
+
serverConfig.adminPanelPasswordSourceLine);
|
68
|
+
hierarchyMember["value"] = Json::Value(
|
69
|
+
serverConfig.adminPanelPassword.data(),
|
70
|
+
serverConfig.adminPanelPassword.data() + serverConfig.adminPanelPassword.size());
|
71
|
+
}
|
72
|
+
if (serverConfig.adminPanelUrlExplicitlySet) {
|
73
|
+
Json::Value &optionContainer = findOrCreateOptionContainer(globalOptionsContainer,
|
74
|
+
"PassengerAdminPanelUrl",
|
75
|
+
sizeof("PassengerAdminPanelUrl") - 1);
|
76
|
+
Json::Value &hierarchyMember = addOptionContainerHierarchyMember(optionContainer,
|
77
|
+
serverConfig.adminPanelUrlSourceFile,
|
78
|
+
serverConfig.adminPanelUrlSourceLine);
|
79
|
+
hierarchyMember["value"] = Json::Value(
|
80
|
+
serverConfig.adminPanelUrl.data(),
|
81
|
+
serverConfig.adminPanelUrl.data() + serverConfig.adminPanelUrl.size());
|
82
|
+
}
|
83
|
+
if (serverConfig.adminPanelUsernameExplicitlySet) {
|
84
|
+
Json::Value &optionContainer = findOrCreateOptionContainer(globalOptionsContainer,
|
85
|
+
"PassengerAdminPanelUsername",
|
86
|
+
sizeof("PassengerAdminPanelUsername") - 1);
|
87
|
+
Json::Value &hierarchyMember = addOptionContainerHierarchyMember(optionContainer,
|
88
|
+
serverConfig.adminPanelUsernameSourceFile,
|
89
|
+
serverConfig.adminPanelUsernameSourceLine);
|
90
|
+
hierarchyMember["value"] = Json::Value(
|
91
|
+
serverConfig.adminPanelUsername.data(),
|
92
|
+
serverConfig.adminPanelUsername.data() + serverConfig.adminPanelUsername.size());
|
93
|
+
}
|
50
94
|
if (serverConfig.dataBufferDirExplicitlySet) {
|
51
95
|
Json::Value &optionContainer = findOrCreateOptionContainer(globalOptionsContainer,
|
52
96
|
"PassengerDataBufferDir",
|
@@ -100,6 +144,17 @@ ConfigManifestGenerator::autoGenerated_generateConfigManifestForServerConfig() {
|
|
100
144
|
serverConfig.disableSecurityUpdateCheckSourceLine);
|
101
145
|
hierarchyMember["value"] = serverConfig.disableSecurityUpdateCheck == Apache2Module::ENABLED;
|
102
146
|
}
|
147
|
+
if (serverConfig.dumpConfigManifestExplicitlySet) {
|
148
|
+
Json::Value &optionContainer = findOrCreateOptionContainer(globalOptionsContainer,
|
149
|
+
"PassengerDumpConfigManifest",
|
150
|
+
sizeof("PassengerDumpConfigManifest") - 1);
|
151
|
+
Json::Value &hierarchyMember = addOptionContainerHierarchyMember(optionContainer,
|
152
|
+
serverConfig.dumpConfigManifestSourceFile,
|
153
|
+
serverConfig.dumpConfigManifestSourceLine);
|
154
|
+
hierarchyMember["value"] = Json::Value(
|
155
|
+
serverConfig.dumpConfigManifest.data(),
|
156
|
+
serverConfig.dumpConfigManifest.data() + serverConfig.dumpConfigManifest.size());
|
157
|
+
}
|
103
158
|
if (serverConfig.fileDescriptorLogFileExplicitlySet) {
|
104
159
|
Json::Value &optionContainer = findOrCreateOptionContainer(globalOptionsContainer,
|
105
160
|
"PassengerFileDescriptorLogFile",
|
@@ -94,6 +94,26 @@ struct AutoGeneratedServerConfig {
|
|
94
94
|
*/
|
95
95
|
int statThrottleRate;
|
96
96
|
|
97
|
+
/*
|
98
|
+
* The authentication type to use when connecting to the admin panel
|
99
|
+
*/
|
100
|
+
StaticString adminPanelAuthType;
|
101
|
+
|
102
|
+
/*
|
103
|
+
* The password to use when connecting to the admin panel using basic authentication
|
104
|
+
*/
|
105
|
+
StaticString adminPanelPassword;
|
106
|
+
|
107
|
+
/*
|
108
|
+
* Connect to an admin panel at the given connector URL
|
109
|
+
*/
|
110
|
+
StaticString adminPanelUrl;
|
111
|
+
|
112
|
+
/*
|
113
|
+
* The username to use when connecting to the admin panel using basic authentication
|
114
|
+
*/
|
115
|
+
StaticString adminPanelUsername;
|
116
|
+
|
97
117
|
/*
|
98
118
|
* The directory that Phusion Passenger data buffers should be stored into.
|
99
119
|
*/
|
@@ -114,6 +134,11 @@ struct AutoGeneratedServerConfig {
|
|
114
134
|
*/
|
115
135
|
StaticString defaultUser;
|
116
136
|
|
137
|
+
/*
|
138
|
+
* Dump the Passenger config manifest to the given file, for debugging purposes.
|
139
|
+
*/
|
140
|
+
StaticString dumpConfigManifest;
|
141
|
+
|
117
142
|
/*
|
118
143
|
* The Phusion Passenger file descriptor log file.
|
119
144
|
*/
|
@@ -156,10 +181,15 @@ struct AutoGeneratedServerConfig {
|
|
156
181
|
StaticString responseBufferHighWatermarkSourceFile;
|
157
182
|
StaticString socketBacklogSourceFile;
|
158
183
|
StaticString statThrottleRateSourceFile;
|
184
|
+
StaticString adminPanelAuthTypeSourceFile;
|
185
|
+
StaticString adminPanelPasswordSourceFile;
|
186
|
+
StaticString adminPanelUrlSourceFile;
|
187
|
+
StaticString adminPanelUsernameSourceFile;
|
159
188
|
StaticString dataBufferDirSourceFile;
|
160
189
|
StaticString defaultGroupSourceFile;
|
161
190
|
StaticString defaultRubySourceFile;
|
162
191
|
StaticString defaultUserSourceFile;
|
192
|
+
StaticString dumpConfigManifestSourceFile;
|
163
193
|
StaticString fileDescriptorLogFileSourceFile;
|
164
194
|
StaticString instanceRegistryDirSourceFile;
|
165
195
|
StaticString logFileSourceFile;
|
@@ -178,10 +208,15 @@ struct AutoGeneratedServerConfig {
|
|
178
208
|
unsigned int responseBufferHighWatermarkSourceLine;
|
179
209
|
unsigned int socketBacklogSourceLine;
|
180
210
|
unsigned int statThrottleRateSourceLine;
|
211
|
+
unsigned int adminPanelAuthTypeSourceLine;
|
212
|
+
unsigned int adminPanelPasswordSourceLine;
|
213
|
+
unsigned int adminPanelUrlSourceLine;
|
214
|
+
unsigned int adminPanelUsernameSourceLine;
|
181
215
|
unsigned int dataBufferDirSourceLine;
|
182
216
|
unsigned int defaultGroupSourceLine;
|
183
217
|
unsigned int defaultRubySourceLine;
|
184
218
|
unsigned int defaultUserSourceLine;
|
219
|
+
unsigned int dumpConfigManifestSourceLine;
|
185
220
|
unsigned int fileDescriptorLogFileSourceLine;
|
186
221
|
unsigned int instanceRegistryDirSourceLine;
|
187
222
|
unsigned int logFileSourceLine;
|
@@ -200,10 +235,15 @@ struct AutoGeneratedServerConfig {
|
|
200
235
|
bool responseBufferHighWatermarkExplicitlySet: 1;
|
201
236
|
bool socketBacklogExplicitlySet: 1;
|
202
237
|
bool statThrottleRateExplicitlySet: 1;
|
238
|
+
bool adminPanelAuthTypeExplicitlySet: 1;
|
239
|
+
bool adminPanelPasswordExplicitlySet: 1;
|
240
|
+
bool adminPanelUrlExplicitlySet: 1;
|
241
|
+
bool adminPanelUsernameExplicitlySet: 1;
|
203
242
|
bool dataBufferDirExplicitlySet: 1;
|
204
243
|
bool defaultGroupExplicitlySet: 1;
|
205
244
|
bool defaultRubyExplicitlySet: 1;
|
206
245
|
bool defaultUserExplicitlySet: 1;
|
246
|
+
bool dumpConfigManifestExplicitlySet: 1;
|
207
247
|
bool fileDescriptorLogFileExplicitlySet: 1;
|
208
248
|
bool instanceRegistryDirExplicitlySet: 1;
|
209
249
|
bool logFileExplicitlySet: 1;
|
@@ -224,6 +264,18 @@ struct AutoGeneratedServerConfig {
|
|
224
264
|
responseBufferHighWatermark = DEFAULT_RESPONSE_BUFFER_HIGH_WATERMARK;
|
225
265
|
socketBacklog = DEFAULT_SOCKET_BACKLOG;
|
226
266
|
statThrottleRate = DEFAULT_STAT_THROTTLE_RATE;
|
267
|
+
/*
|
268
|
+
* adminPanelAuthType: default initialized
|
269
|
+
*/
|
270
|
+
/*
|
271
|
+
* adminPanelPassword: default initialized
|
272
|
+
*/
|
273
|
+
/*
|
274
|
+
* adminPanelUrl: default initialized
|
275
|
+
*/
|
276
|
+
/*
|
277
|
+
* adminPanelUsername: default initialized
|
278
|
+
*/
|
227
279
|
/*
|
228
280
|
* dataBufferDir: default initialized
|
229
281
|
*/
|
@@ -232,6 +284,9 @@ struct AutoGeneratedServerConfig {
|
|
232
284
|
*/
|
233
285
|
defaultRuby = DEFAULT_RUBY;
|
234
286
|
defaultUser = PASSENGER_DEFAULT_USER;
|
287
|
+
/*
|
288
|
+
* dumpConfigManifest: default initialized
|
289
|
+
*/
|
235
290
|
/*
|
236
291
|
* fileDescriptorLogFile: default initialized
|
237
292
|
*/
|
@@ -262,10 +317,15 @@ struct AutoGeneratedServerConfig {
|
|
262
317
|
responseBufferHighWatermarkSourceLine = 0;
|
263
318
|
socketBacklogSourceLine = 0;
|
264
319
|
statThrottleRateSourceLine = 0;
|
320
|
+
adminPanelAuthTypeSourceLine = 0;
|
321
|
+
adminPanelPasswordSourceLine = 0;
|
322
|
+
adminPanelUrlSourceLine = 0;
|
323
|
+
adminPanelUsernameSourceLine = 0;
|
265
324
|
dataBufferDirSourceLine = 0;
|
266
325
|
defaultGroupSourceLine = 0;
|
267
326
|
defaultRubySourceLine = 0;
|
268
327
|
defaultUserSourceLine = 0;
|
328
|
+
dumpConfigManifestSourceLine = 0;
|
269
329
|
fileDescriptorLogFileSourceLine = 0;
|
270
330
|
instanceRegistryDirSourceLine = 0;
|
271
331
|
logFileSourceLine = 0;
|
@@ -284,10 +344,15 @@ struct AutoGeneratedServerConfig {
|
|
284
344
|
responseBufferHighWatermarkExplicitlySet = false;
|
285
345
|
socketBacklogExplicitlySet = false;
|
286
346
|
statThrottleRateExplicitlySet = false;
|
347
|
+
adminPanelAuthTypeExplicitlySet = false;
|
348
|
+
adminPanelPasswordExplicitlySet = false;
|
349
|
+
adminPanelUrlExplicitlySet = false;
|
350
|
+
adminPanelUsernameExplicitlySet = false;
|
287
351
|
dataBufferDirExplicitlySet = false;
|
288
352
|
defaultGroupExplicitlySet = false;
|
289
353
|
defaultRubyExplicitlySet = false;
|
290
354
|
defaultUserExplicitlySet = false;
|
355
|
+
dumpConfigManifestExplicitlySet = false;
|
291
356
|
fileDescriptorLogFileExplicitlySet = false;
|
292
357
|
instanceRegistryDirExplicitlySet = false;
|
293
358
|
logFileExplicitlySet = false;
|