passenger 5.2.3 → 5.3.0
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 +13 -0
- data/CONTRIBUTORS +5 -1
- data/build/agent.rb +22 -2
- data/build/cxx_tests.rb +41 -5
- data/build/misc.rb +4 -1
- data/build/support/cxx_dependency_map.rb +1746 -908
- data/build/support/vendor/cxx_hinted_parser/CxxHintedParser.sublime-project +8 -0
- data/build/support/vendor/cxx_hinted_parser/Gemfile +5 -0
- data/build/support/vendor/cxx_hinted_parser/Gemfile.lock +30 -0
- data/{src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core → build/support/vendor/cxx_hinted_parser}/LICENSE.md +1 -1
- data/build/support/vendor/cxx_hinted_parser/README.md +95 -0
- data/build/support/vendor/cxx_hinted_parser/Rakefile +4 -0
- data/{src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/initialize.rb → build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser.rb} +2 -9
- data/build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser/parser.rb +239 -0
- data/dev/ci/README.md +15 -2
- data/dev/ci/lib/set-container-envvars.sh +6 -0
- data/dev/ci/lib/setup-container.sh +4 -1
- data/dev/ci/scripts/debug-console-wrapper.sh +3 -1
- data/dev/ci/setup-host +5 -0
- data/dev/ci/tests/binaries/Jenkinsfile +105 -0
- data/dev/ci/tests/binaries/build-linux +38 -0
- data/dev/ci/tests/binaries/build-macos +40 -0
- data/dev/ci/tests/binaries/prepare-macos +38 -0
- data/dev/ci/tests/binaries/test-linux +45 -0
- data/dev/ci/tests/binaries/test-macos +38 -0
- data/dev/ci/tests/debian/Jenkinsfile +2 -2
- data/dev/ci/tests/rpm/Jenkinsfile +1 -1
- data/dev/configkit-schemas/index.json +3 -24
- data/dev/vagrant/nginx_rakefile +0 -1
- data/package.json +15 -5
- data/resources/templates/error_renderer/.editorconfig +19 -0
- data/resources/templates/error_renderer/with_details/README.md +9 -0
- data/resources/templates/error_renderer/with_details/dist/bundle.js +33 -0
- data/resources/templates/error_renderer/with_details/dist/styles.css +17 -0
- data/resources/templates/error_renderer/with_details/src/DetailsView.jsx +52 -0
- data/resources/templates/error_renderer/with_details/src/GetHelpView.jsx +61 -0
- data/resources/templates/error_renderer/with_details/src/JourneyView.css +50 -0
- data/resources/templates/error_renderer/with_details/src/JourneyView.jsx +621 -0
- data/resources/templates/error_renderer/with_details/src/PageMain.css +114 -0
- data/resources/templates/error_renderer/with_details/src/PageMain.jsx +136 -0
- data/resources/templates/error_renderer/with_details/src/ProblemDescriptionView.jsx +14 -0
- data/resources/templates/error_renderer/with_details/src/ProcessDetailsView.jsx +56 -0
- data/resources/templates/error_renderer/with_details/src/SolutionDescriptionView.css +5 -0
- data/resources/templates/error_renderer/with_details/src/SolutionDescriptionView.jsx +15 -0
- data/resources/templates/error_renderer/with_details/src/SummaryView.jsx +35 -0
- data/resources/templates/error_renderer/with_details/src/SystemComponentView.css +34 -0
- data/resources/templates/error_renderer/with_details/src/SystemComponentView.jsx +168 -0
- data/resources/templates/error_renderer/with_details/src/SystemComponentsView.css +13 -0
- data/resources/templates/error_renderer/with_details/src/SystemComponentsView.jsx +116 -0
- data/resources/templates/error_renderer/with_details/src/Tab.jsx +12 -0
- data/resources/templates/error_renderer/with_details/src/Tabs.jsx +104 -0
- data/resources/templates/error_renderer/with_details/src/bootstrap/bootstrap.css +3446 -0
- data/resources/templates/error_renderer/with_details/src/bootstrap/bootstrap.js +293 -0
- data/resources/templates/error_renderer/with_details/src/bootstrap/config.json +401 -0
- data/resources/templates/error_renderer/with_details/src/index.html.template +22 -0
- data/resources/templates/error_renderer/with_details/src/index.jsx +23 -0
- data/resources/templates/error_renderer/with_details/webpack.config.js +47 -0
- data/resources/templates/error_renderer/without_details/dist/bundle.js +1 -0
- data/resources/templates/error_renderer/without_details/dist/styles.css +1 -0
- data/resources/templates/{undisclosed_error.html.template → error_renderer/without_details/src/index.html.template} +7 -11
- data/resources/templates/error_renderer/without_details/src/index.js +1 -0
- data/resources/templates/{error_layout.css → error_renderer/without_details/src/main.css} +5 -2
- data/resources/templates/error_renderer/without_details/webpack.config.js +42 -0
- data/src/agent/AgentMain.cpp +3 -3
- data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +13 -0
- data/src/agent/Core/ApplicationPool/Common.h +3 -4
- data/src/agent/Core/ApplicationPool/Context.h +27 -17
- data/src/agent/Core/ApplicationPool/Group.h +3 -1
- data/src/agent/Core/ApplicationPool/Group/InitializationAndShutdown.cpp +2 -12
- data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +55 -10
- data/src/agent/Core/ApplicationPool/Group/LifetimeAndBasics.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/SpawningAndRestarting.cpp +13 -6
- data/src/agent/Core/ApplicationPool/Implementation.cpp +16 -100
- data/src/agent/Core/ApplicationPool/Options.h +8 -65
- data/src/agent/Core/ApplicationPool/Pool.h +4 -21
- data/src/agent/Core/ApplicationPool/Pool/AnalyticsCollection.cpp +1 -60
- data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +10 -13
- data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +3 -8
- data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +2 -34
- data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Process.cpp +17 -12
- data/src/agent/Core/ApplicationPool/Process.h +146 -93
- data/src/agent/Core/ApplicationPool/Session.h +2 -2
- data/src/agent/Core/ApplicationPool/Socket.h +28 -27
- data/src/agent/Core/Config.h +1 -3
- data/src/agent/Core/ConfigChange.cpp +2 -4
- data/src/agent/Core/Controller.h +2 -8
- data/src/agent/Core/Controller/BufferBody.cpp +0 -2
- data/src/agent/Core/Controller/CheckoutSession.cpp +12 -24
- data/src/agent/Core/Controller/Config.h +1 -9
- data/src/agent/Core/Controller/ForwardResponse.cpp +0 -34
- data/src/agent/Core/Controller/Hooks.cpp +0 -7
- data/src/agent/Core/Controller/InitRequest.cpp +0 -43
- data/src/agent/Core/Controller/InitializationAndShutdown.cpp +0 -4
- data/src/agent/Core/Controller/Request.h +1 -35
- data/src/agent/Core/Controller/SendRequest.cpp +0 -32
- data/src/agent/Core/CoreMain.cpp +19 -32
- data/src/agent/Core/SpawningKit/Config.h +329 -55
- data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +369 -0
- data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h.cxxcodebuilder +307 -0
- data/src/agent/Core/SpawningKit/Context.h +211 -0
- data/src/agent/Core/SpawningKit/DirectSpawner.h +112 -122
- data/src/agent/Core/SpawningKit/DummySpawner.h +59 -20
- data/src/agent/Core/SpawningKit/ErrorRenderer.h +117 -0
- data/src/agent/Core/SpawningKit/Exceptions.h +1157 -0
- data/src/agent/Core/SpawningKit/Factory.h +24 -17
- data/src/agent/Core/SpawningKit/{BackgroundIOCapturer.h → Handshake/BackgroundIOCapturer.h} +48 -18
- data/src/agent/Core/SpawningKit/Handshake/Perform.h +1650 -0
- data/src/agent/Core/SpawningKit/Handshake/Prepare.h +582 -0
- data/src/agent/Core/SpawningKit/Handshake/Session.h +91 -0
- data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +100 -0
- data/src/agent/Core/SpawningKit/Journey.h +561 -0
- data/src/agent/Core/SpawningKit/PipeWatcher.h +41 -18
- data/src/agent/Core/SpawningKit/README.md +534 -0
- data/src/agent/Core/SpawningKit/Result.h +182 -7
- data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h +69 -0
- data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h.cxxcodebuilder +110 -0
- data/src/agent/Core/SpawningKit/SmartSpawner.h +1027 -562
- data/src/agent/Core/SpawningKit/Spawner.h +70 -1134
- data/src/agent/Core/SpawningKit/UserSwitchingRules.h +3 -33
- data/src/agent/README.md +2 -3
- data/src/agent/Shared/ApiServerUtils.h +2 -3
- data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +932 -0
- data/src/agent/Watchdog/Config.h +1 -3
- data/src/agent/Watchdog/WatchdogMain.cpp +2 -1
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +5 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +5 -0
- data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +22 -13
- data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +5 -0
- data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +3 -0
- data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +13 -0
- data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -0
- data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +13 -0
- data/src/cxx_supportlib/Constants.h +3 -1
- data/src/cxx_supportlib/Exceptions.h +0 -121
- data/src/cxx_supportlib/LoggingKit/Implementation.cpp +7 -6
- data/src/cxx_supportlib/LoggingKit/Logging.h +3 -1
- data/src/cxx_supportlib/Utils.cpp +42 -0
- data/src/cxx_supportlib/Utils.h +7 -0
- data/src/cxx_supportlib/Utils/IOUtils.cpp +58 -0
- data/src/cxx_supportlib/Utils/IOUtils.h +13 -0
- data/src/cxx_supportlib/Utils/JsonUtils.h +130 -23
- data/src/cxx_supportlib/Utils/ScopeGuard.h +9 -4
- data/src/cxx_supportlib/Utils/StrIntUtils.cpp +7 -0
- data/src/cxx_supportlib/Utils/StrIntUtils.h +1 -0
- data/src/cxx_supportlib/Utils/SystemTime.h +1 -1
- data/src/cxx_supportlib/Utils/Timer.h +1 -1
- data/src/cxx_supportlib/WebSocketCommandReverseServer.h +6 -4
- data/src/cxx_supportlib/vendor-copy/adhoc_lve.h +1 -0
- data/src/helper-scripts/node-loader.js +54 -59
- data/src/helper-scripts/rack-loader.rb +63 -60
- data/src/helper-scripts/rack-preloader.rb +125 -72
- data/src/helper-scripts/wsgi-loader.py +100 -43
- data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +120 -112
- data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +15 -8
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +142 -142
- data/src/nginx_module/ConfigGeneral/ManifestGeneration.c +26 -15
- data/src/nginx_module/ConfigGeneral/ManifestGeneration.h +3 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +76 -70
- data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c +114 -99
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +170 -156
- data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +38 -35
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +5 -1
- data/src/ruby_supportlib/phusion_passenger.rb +5 -5
- data/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb +14 -1
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +8 -0
- data/src/ruby_supportlib/phusion_passenger/common_library.rb +0 -3
- data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +0 -1
- data/src/ruby_supportlib/phusion_passenger/constants.rb +2 -0
- data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +646 -238
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +117 -95
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +0 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/apache2.rb +5 -1
- data/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb +92 -69
- data/src/ruby_supportlib/phusion_passenger/public_api.rb +0 -17
- data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +0 -3
- data/src/ruby_supportlib/phusion_passenger/request_handler.rb +4 -5
- data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +0 -22
- metadata +64 -67
- data/resources/templates/error_layout.html.template +0 -86
- data/resources/templates/general_error.html.template +0 -1
- data/resources/templates/general_error_with_html.html.template +0 -1
- data/src/agent/Core/ApplicationPool/ErrorRenderer.h +0 -131
- data/src/agent/Core/SpawningKit/Options.h +0 -41
- data/src/agent/Core/UnionStation/Connection.h +0 -173
- data/src/agent/Core/UnionStation/Context.h +0 -536
- data/src/agent/Core/UnionStation/StopwatchLog.h +0 -147
- data/src/agent/Core/UnionStation/Transaction.h +0 -249
- data/src/agent/SpawnPreparer/SpawnPreparerMain.cpp +0 -208
- data/src/cxx_supportlib/UnionStationFilterSupport.cpp +0 -67
- data/src/cxx_supportlib/UnionStationFilterSupport.h +0 -1622
- data/src/nodejs_supportlib/phusion_passenger/log_express.js +0 -106
- data/src/nodejs_supportlib/phusion_passenger/log_mongodb.js +0 -202
- data/src/nodejs_supportlib/phusion_passenger/ustreporter.js +0 -227
- data/src/nodejs_supportlib/phusion_passenger/ustrouter_connector.js +0 -448
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/CONFIG.md +0 -37
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/Gemfile +0 -17
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/Gemfile.lock +0 -59
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/README-API.md +0 -5
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/README.md +0 -117
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/Rakefile +0 -115
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core.rb +0 -423
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/api.rb +0 -238
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/connection.rb +0 -67
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/context.rb +0 -281
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/lock.rb +0 -62
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/log.rb +0 -66
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/message_channel.rb +0 -157
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter.rb +0 -150
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/basics.rb +0 -199
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/controllers.rb +0 -187
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/misc.rb +0 -303
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/view_rendering.rb +0 -91
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/simple_json.rb +0 -396
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/spec_helper.rb +0 -279
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/time_point.rb +0 -39
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/transaction.rb +0 -173
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/utils.rb +0 -177
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/version.rb +0 -32
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/version_data.rb +0 -44
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.example +0 -16
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.travis +0 -20
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/ruby_versions.yml.travis-with-sudo +0 -18
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/union_station_hooks_core.gemspec +0 -23
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/Gemfile +0 -14
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/Gemfile.lock +0 -45
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/LICENSE.md +0 -19
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/README.md +0 -104
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/Rakefile +0 -160
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails.rb +0 -200
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/action_controller_extension.rb +0 -45
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/action_view_subscriber.rb +0 -55
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/active_record_subscriber.rb +0 -41
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/active_support_benchmarkable_extension.rb +0 -47
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/active_support_cache_subscriber.rb +0 -79
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/exception_logger.rb +0 -57
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/version.rb +0 -32
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/version_data.rb +0 -44
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/union_station_hooks_rails.gemspec +0 -34
@@ -24,7 +24,7 @@
|
|
24
24
|
# THE SOFTWARE.
|
25
25
|
|
26
26
|
import sys, os, re, imp, threading, signal, traceback, socket, select, struct, logging, errno
|
27
|
-
import tempfile
|
27
|
+
import tempfile, json, time
|
28
28
|
|
29
29
|
options = {}
|
30
30
|
|
@@ -32,27 +32,41 @@ def abort(message):
|
|
32
32
|
sys.stderr.write(message + "\n")
|
33
33
|
sys.exit(1)
|
34
34
|
|
35
|
-
def
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
35
|
+
def try_write_file(path, contents):
|
36
|
+
try:
|
37
|
+
with open(path, 'w') as f:
|
38
|
+
f.write(contents)
|
39
|
+
except IOError as e:
|
40
|
+
logging.warn('Warning: unable to write to ' + path + ': ' + e.message)
|
41
|
+
|
42
|
+
def initialize_logging():
|
43
|
+
logging.basicConfig(
|
44
|
+
level = logging.WARNING,
|
45
|
+
format = "[ pid=%(process)d, time=%(asctime)s ]: %(message)s")
|
46
|
+
if hasattr(logging, 'captureWarnings'):
|
47
|
+
logging.captureWarnings(True)
|
41
48
|
|
42
|
-
def
|
49
|
+
def read_startup_arguments():
|
43
50
|
global options
|
44
51
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
52
|
+
work_dir = os.getenv('PASSENGER_SPAWN_WORK_DIR')
|
53
|
+
path = work_dir + '/args.json'
|
54
|
+
with open(path, 'r') as f:
|
55
|
+
options = json.load(f)
|
56
|
+
|
57
|
+
def record_journey_step_begin(step, state):
|
58
|
+
work_dir = os.getenv('PASSENGER_SPAWN_WORK_DIR')
|
59
|
+
step_dir = work_dir + '/response/steps/' + step.lower()
|
60
|
+
try_write_file(step_dir + '/state', state)
|
61
|
+
try_write_file(step_dir + '/begin_time', str(time.time()))
|
62
|
+
|
63
|
+
def record_journey_step_end(step, state):
|
64
|
+
work_dir = os.getenv('PASSENGER_SPAWN_WORK_DIR')
|
65
|
+
step_dir = work_dir + '/response/steps/' + step.lower()
|
66
|
+
try_write_file(step_dir + '/state', state)
|
67
|
+
if not os.path.exists(step_dir + '/begin_time') and not os.path.exists(step_dir + '/begin_time_monotonic'):
|
68
|
+
try_write_file(step_dir + '/begin_time', str(time.time()))
|
69
|
+
try_write_file(step_dir + '/end_time', str(time.time()))
|
56
70
|
|
57
71
|
def load_app():
|
58
72
|
global options
|
@@ -63,7 +77,7 @@ def load_app():
|
|
63
77
|
|
64
78
|
def create_server_socket():
|
65
79
|
global options
|
66
|
-
|
80
|
+
|
67
81
|
UNIX_PATH_MAX = int(options.get('UNIX_PATH_MAX', 100))
|
68
82
|
if 'socket_dir' in options:
|
69
83
|
socket_dir = options['socket_dir']
|
@@ -115,8 +129,27 @@ def install_signal_handlers():
|
|
115
129
|
signal.signal(signal.SIGABRT, debug_and_exit)
|
116
130
|
|
117
131
|
def advertise_sockets(socket_filename):
|
118
|
-
|
119
|
-
|
132
|
+
work_dir = os.getenv('PASSENGER_SPAWN_WORK_DIR')
|
133
|
+
path = work_dir + '/response/properties.json'
|
134
|
+
doc = {
|
135
|
+
'sockets': [
|
136
|
+
{
|
137
|
+
'name': 'main',
|
138
|
+
'address': 'unix:' + socket_filename,
|
139
|
+
'protocol': 'session',
|
140
|
+
'concurrency': 1,
|
141
|
+
'accept_http_requests': True
|
142
|
+
}
|
143
|
+
]
|
144
|
+
}
|
145
|
+
with open(path, 'w') as f:
|
146
|
+
json.dump(doc, f)
|
147
|
+
|
148
|
+
def advertise_readiness():
|
149
|
+
work_dir = os.getenv('PASSENGER_SPAWN_WORK_DIR')
|
150
|
+
path = work_dir + '/response/finish'
|
151
|
+
with open(path, 'w') as f:
|
152
|
+
f.write('1')
|
120
153
|
|
121
154
|
if sys.version_info[0] >= 3:
|
122
155
|
def reraise_exception(exc_info):
|
@@ -146,7 +179,7 @@ class RequestHandler:
|
|
146
179
|
self.server = server_socket
|
147
180
|
self.owner_pipe = owner_pipe
|
148
181
|
self.app = app
|
149
|
-
|
182
|
+
|
150
183
|
def main_loop(self):
|
151
184
|
done = False
|
152
185
|
try:
|
@@ -193,7 +226,7 @@ class RequestHandler:
|
|
193
226
|
return self.server.accept()
|
194
227
|
else:
|
195
228
|
return (None, None)
|
196
|
-
|
229
|
+
|
197
230
|
def parse_request(self, client):
|
198
231
|
buf = b''
|
199
232
|
while len(buf) < 4:
|
@@ -202,14 +235,14 @@ class RequestHandler:
|
|
202
235
|
return (None, None)
|
203
236
|
buf += tmp
|
204
237
|
header_size = struct.unpack('>I', buf)[0]
|
205
|
-
|
238
|
+
|
206
239
|
buf = b''
|
207
240
|
while len(buf) < header_size:
|
208
241
|
tmp = client.recv(header_size - len(buf))
|
209
242
|
if len(tmp) == 0:
|
210
243
|
return (None, None)
|
211
244
|
buf += tmp
|
212
|
-
|
245
|
+
|
213
246
|
headers = buf.split(b"\0")
|
214
247
|
headers.pop() # Remove trailing "\0"
|
215
248
|
env = {}
|
@@ -219,7 +252,7 @@ class RequestHandler:
|
|
219
252
|
i += 2
|
220
253
|
|
221
254
|
return (env, client)
|
222
|
-
|
255
|
+
|
223
256
|
if hasattr(socket, '_fileobject'):
|
224
257
|
def wrap_input_socket(self, sock):
|
225
258
|
return socket._fileobject(sock, 'rb', 512)
|
@@ -271,7 +304,7 @@ class RequestHandler:
|
|
271
304
|
e = sys.exc_info()[1]
|
272
305
|
setattr(e, 'passenger', True)
|
273
306
|
raise e
|
274
|
-
|
307
|
+
|
275
308
|
def start_response(status, response_headers, exc_info = None):
|
276
309
|
if exc_info:
|
277
310
|
try:
|
@@ -283,10 +316,10 @@ class RequestHandler:
|
|
283
316
|
exc_info = None
|
284
317
|
elif headers_set:
|
285
318
|
raise AssertionError("Headers already set!")
|
286
|
-
|
319
|
+
|
287
320
|
headers_set[:] = [status, response_headers]
|
288
321
|
return write
|
289
|
-
|
322
|
+
|
290
323
|
# Django's django.template.base module goes through all WSGI
|
291
324
|
# environment values, and calls each value that is a callable.
|
292
325
|
# No idea why, but we work around that with the `do_it` parameter.
|
@@ -313,24 +346,48 @@ class RequestHandler:
|
|
313
346
|
if hasattr(result, 'close'):
|
314
347
|
result.close()
|
315
348
|
return False
|
316
|
-
|
349
|
+
|
317
350
|
def process_ping(self, env, input_stream, output_stream):
|
318
351
|
output_stream.sendall(b"pong")
|
319
352
|
|
320
353
|
|
321
354
|
if __name__ == "__main__":
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
355
|
+
initialize_logging()
|
356
|
+
record_journey_step_end('SUBPROCESS_EXEC_WRAPPER', 'STEP_PERFORMED')
|
357
|
+
record_journey_step_begin('SUBPROCESS_WRAPPER_PREPARATION', 'STEP_IN_PROGRESS')
|
358
|
+
try:
|
359
|
+
read_startup_arguments()
|
360
|
+
except Exception:
|
361
|
+
record_journey_step_end('SUBPROCESS_WRAPPER_PREPARATION', 'STEP_ERRORED')
|
362
|
+
raise
|
363
|
+
else:
|
364
|
+
record_journey_step_end('SUBPROCESS_WRAPPER_PREPARATION', 'STEP_PERFORMED')
|
365
|
+
|
366
|
+
|
367
|
+
record_journey_step_begin('SUBPROCESS_APP_LOAD_OR_EXEC', 'STEP_IN_PROGRESS')
|
368
|
+
try:
|
369
|
+
app_module = load_app()
|
370
|
+
except Exception:
|
371
|
+
record_journey_step_end('SUBPROCESS_APP_LOAD_OR_EXEC', 'STEP_ERRORED')
|
372
|
+
raise
|
373
|
+
else:
|
374
|
+
record_journey_step_end('SUBPROCESS_APP_LOAD_OR_EXEC', 'STEP_PERFORMED')
|
375
|
+
|
376
|
+
|
377
|
+
record_journey_step_begin('SUBPROCESS_LISTEN', 'STEP_IN_PROGRESS')
|
378
|
+
try:
|
379
|
+
socket_filename, server_socket = create_server_socket()
|
380
|
+
install_signal_handlers()
|
381
|
+
handler = RequestHandler(server_socket, sys.stdin, app_module.application)
|
382
|
+
advertise_sockets(socket_filename)
|
383
|
+
except Exception:
|
384
|
+
record_journey_step_end('SUBPROCESS_LISTEN', 'STEP_ERRORED')
|
385
|
+
raise
|
386
|
+
else:
|
387
|
+
record_journey_step_end('SUBPROCESS_LISTEN', 'STEP_PERFORMED')
|
388
|
+
|
389
|
+
|
390
|
+
advertise_readiness()
|
334
391
|
handler.main_loop()
|
335
392
|
try:
|
336
393
|
os.remove(socket_filename)
|
@@ -230,6 +230,14 @@
|
|
230
230
|
offsetof(passenger_loc_conf_t, autogenerated.app_file_descriptor_ulimit),
|
231
231
|
NULL
|
232
232
|
},
|
233
|
+
{
|
234
|
+
ngx_string("passenger_max_instances_per_app"),
|
235
|
+
NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
|
236
|
+
passenger_conf_set_max_instances_per_app,
|
237
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
238
|
+
offsetof(passenger_loc_conf_t, autogenerated.max_instances_per_app),
|
239
|
+
NULL
|
240
|
+
},
|
233
241
|
{
|
234
242
|
ngx_string("passenger_admin_panel_url"),
|
235
243
|
NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
|
@@ -262,14 +270,6 @@
|
|
262
270
|
offsetof(passenger_main_conf_t, autogenerated.admin_panel_password),
|
263
271
|
NULL
|
264
272
|
},
|
265
|
-
{
|
266
|
-
ngx_string("passenger_enabled"),
|
267
|
-
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
|
268
|
-
passenger_enabled,
|
269
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
270
|
-
offsetof(passenger_loc_conf_t, autogenerated.enabled),
|
271
|
-
NULL
|
272
|
-
},
|
273
273
|
{
|
274
274
|
ngx_string("passenger_ruby"),
|
275
275
|
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
@@ -326,22 +326,6 @@
|
|
326
326
|
offsetof(passenger_loc_conf_t, autogenerated.min_instances),
|
327
327
|
NULL
|
328
328
|
},
|
329
|
-
{
|
330
|
-
ngx_string("passenger_max_instances_per_app"),
|
331
|
-
NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
|
332
|
-
passenger_conf_set_max_instances_per_app,
|
333
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
334
|
-
offsetof(passenger_loc_conf_t, autogenerated.max_instances_per_app),
|
335
|
-
NULL
|
336
|
-
},
|
337
|
-
{
|
338
|
-
ngx_string("passenger_max_requests"),
|
339
|
-
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
340
|
-
passenger_conf_set_max_requests,
|
341
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
342
|
-
offsetof(passenger_loc_conf_t, autogenerated.max_requests),
|
343
|
-
NULL
|
344
|
-
},
|
345
329
|
{
|
346
330
|
ngx_string("passenger_start_timeout"),
|
347
331
|
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
@@ -350,22 +334,6 @@
|
|
350
334
|
offsetof(passenger_loc_conf_t, autogenerated.start_timeout),
|
351
335
|
NULL
|
352
336
|
},
|
353
|
-
{
|
354
|
-
ngx_string("passenger_base_uri"),
|
355
|
-
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
356
|
-
passenger_conf_set_base_uri,
|
357
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
358
|
-
offsetof(passenger_loc_conf_t, autogenerated.base_uris),
|
359
|
-
NULL
|
360
|
-
},
|
361
|
-
{
|
362
|
-
ngx_string("passenger_document_root"),
|
363
|
-
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
364
|
-
passenger_conf_set_document_root,
|
365
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
366
|
-
offsetof(passenger_loc_conf_t, autogenerated.document_root),
|
367
|
-
NULL
|
368
|
-
},
|
369
337
|
{
|
370
338
|
ngx_string("passenger_user"),
|
371
339
|
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
@@ -430,14 +398,6 @@
|
|
430
398
|
offsetof(passenger_loc_conf_t, autogenerated.max_preloader_idle_time),
|
431
399
|
NULL
|
432
400
|
},
|
433
|
-
{
|
434
|
-
ngx_string("passenger_ignore_headers"),
|
435
|
-
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_1MORE,
|
436
|
-
ngx_conf_set_bitmask_slot,
|
437
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
438
|
-
offsetof(passenger_loc_conf_t, upstream_config.ignore_headers),
|
439
|
-
&ngx_http_upstream_ignore_headers_masks
|
440
|
-
},
|
441
401
|
{
|
442
402
|
ngx_string("passenger_env_var"),
|
443
403
|
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE2,
|
@@ -446,6 +406,110 @@
|
|
446
406
|
offsetof(passenger_loc_conf_t, autogenerated.env_vars),
|
447
407
|
NULL
|
448
408
|
},
|
409
|
+
{
|
410
|
+
ngx_string("passenger_spawn_method"),
|
411
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
412
|
+
passenger_conf_set_spawn_method,
|
413
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
414
|
+
offsetof(passenger_loc_conf_t, autogenerated.spawn_method),
|
415
|
+
NULL
|
416
|
+
},
|
417
|
+
{
|
418
|
+
ngx_string("passenger_load_shell_envvars"),
|
419
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
|
420
|
+
passenger_conf_set_load_shell_envvars,
|
421
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
422
|
+
offsetof(passenger_loc_conf_t, autogenerated.load_shell_envvars),
|
423
|
+
NULL
|
424
|
+
},
|
425
|
+
{
|
426
|
+
ngx_string("passenger_max_request_queue_size"),
|
427
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
428
|
+
passenger_conf_set_max_request_queue_size,
|
429
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
430
|
+
offsetof(passenger_loc_conf_t, autogenerated.max_request_queue_size),
|
431
|
+
NULL
|
432
|
+
},
|
433
|
+
{
|
434
|
+
ngx_string("passenger_app_type"),
|
435
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
436
|
+
passenger_conf_set_app_type,
|
437
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
438
|
+
offsetof(passenger_loc_conf_t, autogenerated.app_type),
|
439
|
+
NULL
|
440
|
+
},
|
441
|
+
{
|
442
|
+
ngx_string("passenger_startup_file"),
|
443
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
444
|
+
passenger_conf_set_startup_file,
|
445
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
446
|
+
offsetof(passenger_loc_conf_t, autogenerated.startup_file),
|
447
|
+
NULL
|
448
|
+
},
|
449
|
+
{
|
450
|
+
ngx_string("passenger_restart_dir"),
|
451
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
452
|
+
passenger_conf_set_restart_dir,
|
453
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
454
|
+
offsetof(passenger_loc_conf_t, autogenerated.restart_dir),
|
455
|
+
NULL
|
456
|
+
},
|
457
|
+
{
|
458
|
+
ngx_string("passenger_abort_websockets_on_process_shutdown"),
|
459
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
|
460
|
+
passenger_conf_set_abort_websockets_on_process_shutdown,
|
461
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
462
|
+
offsetof(passenger_loc_conf_t, autogenerated.abort_websockets_on_process_shutdown),
|
463
|
+
NULL
|
464
|
+
},
|
465
|
+
{
|
466
|
+
ngx_string("passenger_force_max_concurrent_requests_per_process"),
|
467
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
468
|
+
passenger_conf_set_force_max_concurrent_requests_per_process,
|
469
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
470
|
+
offsetof(passenger_loc_conf_t, autogenerated.force_max_concurrent_requests_per_process),
|
471
|
+
NULL
|
472
|
+
},
|
473
|
+
{
|
474
|
+
ngx_string("passenger_enabled"),
|
475
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
|
476
|
+
passenger_enabled,
|
477
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
478
|
+
offsetof(passenger_loc_conf_t, autogenerated.enabled),
|
479
|
+
NULL
|
480
|
+
},
|
481
|
+
{
|
482
|
+
ngx_string("passenger_max_requests"),
|
483
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
484
|
+
passenger_conf_set_max_requests,
|
485
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
486
|
+
offsetof(passenger_loc_conf_t, autogenerated.max_requests),
|
487
|
+
NULL
|
488
|
+
},
|
489
|
+
{
|
490
|
+
ngx_string("passenger_base_uri"),
|
491
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
492
|
+
passenger_conf_set_base_uri,
|
493
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
494
|
+
offsetof(passenger_loc_conf_t, autogenerated.base_uris),
|
495
|
+
NULL
|
496
|
+
},
|
497
|
+
{
|
498
|
+
ngx_string("passenger_document_root"),
|
499
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
500
|
+
passenger_conf_set_document_root,
|
501
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
502
|
+
offsetof(passenger_loc_conf_t, autogenerated.document_root),
|
503
|
+
NULL
|
504
|
+
},
|
505
|
+
{
|
506
|
+
ngx_string("passenger_ignore_headers"),
|
507
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_1MORE,
|
508
|
+
ngx_conf_set_bitmask_slot,
|
509
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
510
|
+
offsetof(passenger_loc_conf_t, upstream_config.ignore_headers),
|
511
|
+
&ngx_http_upstream_ignore_headers_masks
|
512
|
+
},
|
449
513
|
{
|
450
514
|
ngx_string("passenger_set_header"),
|
451
515
|
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE2,
|
@@ -534,30 +598,6 @@
|
|
534
598
|
offsetof(passenger_loc_conf_t, upstream_config.intercept_errors),
|
535
599
|
NULL
|
536
600
|
},
|
537
|
-
{
|
538
|
-
ngx_string("passenger_spawn_method"),
|
539
|
-
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
540
|
-
passenger_conf_set_spawn_method,
|
541
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
542
|
-
offsetof(passenger_loc_conf_t, autogenerated.spawn_method),
|
543
|
-
NULL
|
544
|
-
},
|
545
|
-
{
|
546
|
-
ngx_string("passenger_load_shell_envvars"),
|
547
|
-
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
|
548
|
-
passenger_conf_set_load_shell_envvars,
|
549
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
550
|
-
offsetof(passenger_loc_conf_t, autogenerated.load_shell_envvars),
|
551
|
-
NULL
|
552
|
-
},
|
553
|
-
{
|
554
|
-
ngx_string("passenger_max_request_queue_size"),
|
555
|
-
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
556
|
-
passenger_conf_set_max_request_queue_size,
|
557
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
558
|
-
offsetof(passenger_loc_conf_t, autogenerated.max_request_queue_size),
|
559
|
-
NULL
|
560
|
-
},
|
561
601
|
{
|
562
602
|
ngx_string("passenger_request_queue_overflow_status_code"),
|
563
603
|
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
@@ -566,30 +606,6 @@
|
|
566
606
|
offsetof(passenger_loc_conf_t, autogenerated.request_queue_overflow_status_code),
|
567
607
|
NULL
|
568
608
|
},
|
569
|
-
{
|
570
|
-
ngx_string("passenger_restart_dir"),
|
571
|
-
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
572
|
-
passenger_conf_set_restart_dir,
|
573
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
574
|
-
offsetof(passenger_loc_conf_t, autogenerated.restart_dir),
|
575
|
-
NULL
|
576
|
-
},
|
577
|
-
{
|
578
|
-
ngx_string("passenger_app_type"),
|
579
|
-
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
580
|
-
passenger_conf_set_app_type,
|
581
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
582
|
-
offsetof(passenger_loc_conf_t, autogenerated.app_type),
|
583
|
-
NULL
|
584
|
-
},
|
585
|
-
{
|
586
|
-
ngx_string("passenger_startup_file"),
|
587
|
-
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
588
|
-
passenger_conf_set_startup_file,
|
589
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
590
|
-
offsetof(passenger_loc_conf_t, autogenerated.startup_file),
|
591
|
-
NULL
|
592
|
-
},
|
593
609
|
{
|
594
610
|
ngx_string("passenger_sticky_sessions"),
|
595
611
|
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
|
@@ -614,22 +630,6 @@
|
|
614
630
|
offsetof(passenger_loc_conf_t, autogenerated.vary_turbocache_by_cookie),
|
615
631
|
NULL
|
616
632
|
},
|
617
|
-
{
|
618
|
-
ngx_string("passenger_abort_websockets_on_process_shutdown"),
|
619
|
-
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG,
|
620
|
-
passenger_conf_set_abort_websockets_on_process_shutdown,
|
621
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
622
|
-
offsetof(passenger_loc_conf_t, autogenerated.abort_websockets_on_process_shutdown),
|
623
|
-
NULL
|
624
|
-
},
|
625
|
-
{
|
626
|
-
ngx_string("passenger_force_max_concurrent_requests_per_process"),
|
627
|
-
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
628
|
-
passenger_conf_set_force_max_concurrent_requests_per_process,
|
629
|
-
NGX_HTTP_LOC_CONF_OFFSET,
|
630
|
-
offsetof(passenger_loc_conf_t, autogenerated.force_max_concurrent_requests_per_process),
|
631
|
-
NULL
|
632
|
-
},
|
633
633
|
{
|
634
634
|
ngx_string("passenger_fly_with"),
|
635
635
|
NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
|
@@ -702,6 +702,14 @@
|
|
702
702
|
0,
|
703
703
|
NULL
|
704
704
|
},
|
705
|
+
{
|
706
|
+
ngx_string("passenger_app_log_file"),
|
707
|
+
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
|
708
|
+
passenger_enterprise_only,
|
709
|
+
NGX_HTTP_LOC_CONF_OFFSET,
|
710
|
+
offsetof(passenger_loc_conf_t, autogenerated.app_log_file),
|
711
|
+
NULL
|
712
|
+
},
|
705
713
|
{
|
706
714
|
ngx_string("passenger_debug_log_file"),
|
707
715
|
NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
|