passenger 4.0.2 → 4.0.3
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.
- data.tar.gz.asc +7 -7
- data/NEWS +27 -0
- data/bin/passenger-config +6 -3
- data/bin/passenger-install-apache2-module +2 -2
- data/bin/passenger-install-nginx-module +16 -2
- data/build/agents.rb +4 -0
- data/build/apache2.rb +1 -1
- data/build/cplusplus_support.rb +1 -1
- data/build/cxx_tests.rb +3 -0
- data/build/packaging.rb +51 -8
- data/build/ruby_extension.rb +1 -1
- data/doc/Packaging.txt.md +20 -7
- data/doc/Users guide Apache.html +1 -1
- data/doc/Users guide Apache.txt +1 -1
- data/doc/Users guide Nginx.html +5 -4
- data/doc/Users guide Nginx.txt +1 -1
- data/doc/users_guide_snippets/installation.txt +5 -3
- data/ext/apache2/Configuration.cpp +12 -0
- data/ext/apache2/Configuration.hpp +7 -4
- data/ext/apache2/Hooks.cpp +29 -19
- data/ext/common/AgentsStarter.cpp +85 -57
- data/ext/common/AgentsStarter.h +570 -42
- data/ext/common/ApplicationPool2/DirectSpawner.h +5 -2
- data/ext/common/ApplicationPool2/Implementation.cpp +7 -1
- data/ext/common/ApplicationPool2/Pool.h +6 -3
- data/ext/common/ApplicationPool2/Process.h +12 -3
- data/ext/common/ApplicationPool2/SmartSpawner.h +2 -1
- data/ext/common/Constants.h +4 -1
- data/ext/common/EventedBufferedInput.h +139 -16
- data/ext/common/MultiLibeio.cpp +4 -2
- data/ext/common/SafeLibev.h +15 -62
- data/ext/common/ServerInstanceDir.h +10 -26
- data/ext/common/Utils.cpp +1 -3
- data/ext/common/Utils.h +1 -1
- data/ext/common/Utils/StrIntUtils.cpp +9 -0
- data/ext/common/Utils/StrIntUtils.h +5 -0
- data/ext/common/Utils/VariantMap.h +63 -14
- data/ext/common/agents/Base.cpp +50 -15
- data/ext/common/agents/HelperAgent/AgentOptions.h +20 -12
- data/ext/common/agents/HelperAgent/FileBackedPipe.h +1 -1
- data/ext/common/agents/HelperAgent/Main.cpp +5 -4
- data/ext/common/agents/HelperAgent/RequestHandler.h +1 -1
- data/ext/common/agents/LoggingAgent/Main.cpp +0 -1
- data/ext/common/agents/LoggingAgent/RemoteSender.h +2 -2
- data/ext/common/agents/SpawnPreparer.cpp +23 -5
- data/ext/common/agents/Watchdog/AgentWatcher.cpp +508 -0
- data/ext/common/agents/Watchdog/HelperAgentWatcher.cpp +93 -0
- data/ext/common/agents/Watchdog/LoggingAgentWatcher.cpp +68 -0
- data/ext/common/agents/Watchdog/Main.cpp +180 -802
- data/ext/common/agents/Watchdog/ServerInstanceDirToucher.cpp +111 -0
- data/ext/nginx/Configuration.c +107 -92
- data/ext/nginx/Configuration.h +1 -0
- data/ext/nginx/ContentHandler.c +6 -6
- data/ext/nginx/ContentHandler.h +1 -1
- data/ext/nginx/config +8 -2
- data/ext/nginx/ngx_http_passenger_module.c +54 -60
- data/ext/nginx/ngx_http_passenger_module.h +6 -6
- data/lib/phusion_passenger.rb +17 -10
- data/lib/phusion_passenger/admin_tools/server_instance.rb +2 -2
- data/lib/phusion_passenger/common_library.rb +0 -1
- data/lib/phusion_passenger/platform_info.rb +10 -1
- data/lib/phusion_passenger/platform_info/depcheck.rb +4 -4
- data/lib/phusion_passenger/platform_info/depcheck_specs/compiler_toolchain.rb +2 -2
- data/lib/phusion_passenger/platform_info/ruby.rb +7 -0
- data/lib/phusion_passenger/request_handler.rb +119 -42
- data/lib/phusion_passenger/request_handler/thread_handler.rb +25 -22
- data/lib/phusion_passenger/standalone/command.rb +2 -0
- data/lib/phusion_passenger/standalone/runtime_installer.rb +4 -3
- data/lib/phusion_passenger/standalone/start_command.rb +49 -37
- data/resources/templates/nginx/pcre_checksum_could_not_be_verified.txt.erb +11 -0
- data/test/cxx/CxxTestMain.cpp +2 -0
- data/test/cxx/EventedBufferedInputTest.cpp +758 -0
- data/test/cxx/ServerInstanceDirTest.cpp +16 -31
- data/test/cxx/TestSupport.cpp +2 -1
- data/test/cxx/VariantMapTest.cpp +23 -11
- metadata +8 -4
- metadata.gz.asc +7 -7
- data/ext/common/AgentsStarter.hpp +0 -655
- data/lib/phusion_passenger/utils/robust_interruption.rb +0 -173
data.tar.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABAgAGBQJRn9OwAAoJECrHRaUKISqM2xYIAKE41ZDQV2ulFOBNCbIZidxB
|
6
|
+
XXl0iOyX47E1YxjA2YZEA5qZO0XRYY6Sm/1fzCZtODnP2gMMGf4sES/Afvdjh4G3
|
7
|
+
gWL6wf7j9rU/dUTdWh4q9DZxsUXtIGRLXjA9KFWKwO2Qb2BXe8Jmc444+DHvQvSh
|
8
|
+
wEiNOUfumIRalaMkXhBKSsLV6UaOTMBy3IinuRWq+8KVCt94jP4baErEzVJb37+I
|
9
|
+
s//uBkH2iKcMV3ccAgS7J3VeQ9Ye6+Lo7z7/T5lM17aQ2huKZ/XEUfRSyiEIkafb
|
10
|
+
6aIfEkv9ADznI21qp9I60/lGoATuLcpXKC6zpqcB+rX5T9Dui+gF0yw0jIbGn8w=
|
11
|
+
=OGrJ
|
12
12
|
-----END PGP SIGNATURE-----
|
data/NEWS
CHANGED
@@ -1,3 +1,30 @@
|
|
1
|
+
Release 4.0.3
|
2
|
+
-------------
|
3
|
+
|
4
|
+
* Better protection is now provided against application processes that
|
5
|
+
are stuck and refuse to shut down cleanly. Since version 4.0.0,
|
6
|
+
Phusion Passenger already forcefully shuts down all processes during
|
7
|
+
web server shutdown. In addition to this, 4.0.3 now also forcefully
|
8
|
+
shuts down processes that take more than 1 minute to shut down, even
|
9
|
+
outside the context of web server shutdowns. This feature does not,
|
10
|
+
however, protect against requests that take too long. Use
|
11
|
+
PassengerMaxRequestTime (Apache) or passenger_max_request_time (Nginx)
|
12
|
+
for that.
|
13
|
+
* Fixed a crash in the HelperAgent which results in frequent process
|
14
|
+
restarts in some traffic patterns. Fixes issue #862.
|
15
|
+
* Fixed a problem that prevents processes from being spawned correctly
|
16
|
+
if the user's bashrc changes working directory. Fixes issue #851.
|
17
|
+
* passenger-status now also displays CPU usage.
|
18
|
+
* The installer now checks for checksums when automatically downloading
|
19
|
+
PCRE and Nginx. Contributed by Joshua Lund.
|
20
|
+
* An error is now printed when trying to daemonize Phusion Passenger
|
21
|
+
Standalone on Ruby implementations that don't support forking.
|
22
|
+
Contributed by Benjamin Fleischer.
|
23
|
+
* Although Phusion Passenger already supported JRuby, *installing*
|
24
|
+
Phusion Passenger with JRuby was not possible. This has been fixed.
|
25
|
+
* Various other minor bug fixes.
|
26
|
+
|
27
|
+
|
1
28
|
Release 4.0.2
|
2
29
|
-------------
|
3
30
|
|
data/bin/passenger-config
CHANGED
@@ -36,6 +36,7 @@ def help
|
|
36
36
|
puts
|
37
37
|
puts "Options:"
|
38
38
|
puts " --root Show Phusion Passenger's root directory."
|
39
|
+
puts " --includedir Show the Nginx runtime library headers directory."
|
39
40
|
puts " --nginx-libs Show Nginx runtime library flags."
|
40
41
|
puts " --compiled Check whether runtime libraries are compiled."
|
41
42
|
puts " --ruby-command Print the correct command for invoking the Ruby interpreter."
|
@@ -46,14 +47,16 @@ def common_library
|
|
46
47
|
require 'phusion_passenger/common_library'
|
47
48
|
return COMMON_LIBRARY.
|
48
49
|
only(*NGINX_LIBS_SELECTOR).
|
49
|
-
set_output_dir("#{PhusionPassenger.
|
50
|
+
set_output_dir("#{PhusionPassenger.lib_dir}/common/libpassenger_common")
|
50
51
|
end
|
51
52
|
|
52
53
|
case ARGV[0]
|
53
54
|
when "--root"
|
54
55
|
puts PhusionPassenger.source_root
|
56
|
+
when "--includedir"
|
57
|
+
puts PhusionPassenger.include_dir
|
55
58
|
when "--nginx-libs"
|
56
|
-
text = "#{common_library.link_objects_as_string} #{PhusionPassenger.
|
59
|
+
text = "#{common_library.link_objects_as_string} #{PhusionPassenger.lib_dir}/common/libboost_oxt.a"
|
57
60
|
if PhusionPassenger::PlatformInfo.has_math_library?
|
58
61
|
text << " -lm"
|
59
62
|
end
|
@@ -64,7 +67,7 @@ when "--compiled"
|
|
64
67
|
exit 1
|
65
68
|
end
|
66
69
|
end
|
67
|
-
if File.exist?("#{PhusionPassenger.
|
70
|
+
if File.exist?("#{PhusionPassenger.lib_dir}/common/libboost_oxt.a")
|
68
71
|
exit 0
|
69
72
|
else
|
70
73
|
exit 1
|
@@ -55,14 +55,14 @@ class Installer < PhusionPassenger::AbstractInstaller
|
|
55
55
|
'libcurl-dev',
|
56
56
|
'openssl-dev',
|
57
57
|
'zlib-dev',
|
58
|
-
'ruby-dev',
|
58
|
+
PlatformInfo.passenger_needs_ruby_dev_header? ? 'ruby-dev' : nil,
|
59
59
|
'ruby-openssl',
|
60
60
|
'rubygems',
|
61
61
|
'rake',
|
62
62
|
'rack',
|
63
63
|
'apache2',
|
64
64
|
'apache2-dev'
|
65
|
-
]
|
65
|
+
].compact
|
66
66
|
# Some broken servers don't have apr-config or apu-config installed.
|
67
67
|
# Nevertheless, it is possible to compile Apache modules if Apache
|
68
68
|
# was configured with --included-apr. So here we check whether
|
@@ -27,6 +27,7 @@ $LOAD_PATH.unshift("#{source_root}/lib")
|
|
27
27
|
require 'phusion_passenger'
|
28
28
|
PhusionPassenger.locate_directories
|
29
29
|
|
30
|
+
require 'digest'
|
30
31
|
require 'optparse'
|
31
32
|
require 'fileutils'
|
32
33
|
require 'phusion_passenger/platform_info/ruby'
|
@@ -47,7 +48,7 @@ class Installer < PhusionPassenger::AbstractInstaller
|
|
47
48
|
'gcc',
|
48
49
|
'g++',
|
49
50
|
'download-tool',
|
50
|
-
'ruby-dev',
|
51
|
+
PlatformInfo.passenger_needs_ruby_dev_header? ? 'ruby-dev' : nil,
|
51
52
|
'ruby-openssl',
|
52
53
|
'rubygems',
|
53
54
|
'rake',
|
@@ -55,7 +56,7 @@ class Installer < PhusionPassenger::AbstractInstaller
|
|
55
56
|
'libcurl-dev',
|
56
57
|
'openssl-dev',
|
57
58
|
'zlib-dev'
|
58
|
-
]
|
59
|
+
].compact
|
59
60
|
return [specs, ids]
|
60
61
|
end
|
61
62
|
|
@@ -187,6 +188,14 @@ private
|
|
187
188
|
|
188
189
|
if download(url, tarball)
|
189
190
|
Dir.chdir(@working_dir) do
|
191
|
+
puts "<banner>Verifying PCRE checksum...</banner>"
|
192
|
+
if Digest::SHA256.file(tarball) != PCRE_SHA256_CHECKSUM
|
193
|
+
new_screen
|
194
|
+
render_template "nginx/pcre_checksum_could_not_be_verified"
|
195
|
+
wait
|
196
|
+
return nil
|
197
|
+
end
|
198
|
+
|
190
199
|
puts "<banner>Extracting PCRE source tarball...</banner>"
|
191
200
|
if sh("tar", "xzvf", tarball)
|
192
201
|
return "#{@working_dir}/#{dirname}"
|
@@ -217,6 +226,11 @@ private
|
|
217
226
|
|
218
227
|
if download(url, tarball)
|
219
228
|
Dir.chdir(@working_dir) do
|
229
|
+
puts "<banner>Verifying Nginx checksum...</banner>"
|
230
|
+
if Digest::SHA256.file(tarball) != NGINX_SHA256_CHECKSUM
|
231
|
+
return nil
|
232
|
+
end
|
233
|
+
|
220
234
|
puts "<banner>Extracting Nginx source tarball...</banner>"
|
221
235
|
if sh("tar", "xzvf", tarball)
|
222
236
|
return "#{@working_dir}/#{dirname}"
|
data/build/agents.rb
CHANGED
@@ -24,6 +24,10 @@
|
|
24
24
|
watchdog_libs = COMMON_LIBRARY.only(:base, 'AgentsBase.o', 'Utils/Base64.o')
|
25
25
|
dependencies = [
|
26
26
|
'ext/common/agents/Watchdog/Main.cpp',
|
27
|
+
'ext/common/agents/Watchdog/AgentWatcher.cpp',
|
28
|
+
'ext/common/agents/Watchdog/HelperAgentWatcher.cpp',
|
29
|
+
'ext/common/agents/Watchdog/LoggingAgentWatcher.cpp',
|
30
|
+
'ext/common/agents/Watchdog/ServerInstanceDirToucher.cpp',
|
27
31
|
'ext/common/ServerInstanceDir.h',
|
28
32
|
'ext/common/ResourceLocator.h',
|
29
33
|
'ext/common/Utils/VariantMap.h',
|
data/build/apache2.rb
CHANGED
@@ -47,7 +47,7 @@ APACHE2_MODULE_INPUT_FILES = {
|
|
47
47
|
ext/apache2/Configuration.hpp
|
48
48
|
ext/apache2/Bucket.h
|
49
49
|
ext/apache2/DirectoryMapper.h
|
50
|
-
ext/common/AgentsStarter.
|
50
|
+
ext/common/AgentsStarter.h
|
51
51
|
ext/common/Exceptions.h
|
52
52
|
ext/common/Logging.h
|
53
53
|
ext/common/RandomGenerator.h
|
data/build/cplusplus_support.rb
CHANGED
@@ -73,7 +73,7 @@ def create_c_executable(target, sources, linkflags = "#{EXTRA_PRE_CFLAGS} #{EXTR
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def create_shared_library(target, sources, flags = "#{EXTRA_PRE_CXXFLAGS} #{EXTRA_PRE_LDFLAGS} #{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS} #{PlatformInfo.portability_ldflags} #{EXTRA_LDFLAGS}")
|
76
|
-
if
|
76
|
+
if PlatformInfo.os_name == "macosx"
|
77
77
|
shlib_flag = "-flat_namespace -bundle -undefined dynamic_lookup"
|
78
78
|
else
|
79
79
|
shlib_flag = "-shared"
|
data/build/cxx_tests.rb
CHANGED
@@ -123,6 +123,9 @@ TEST_CXX_OBJECTS = {
|
|
123
123
|
'test/cxx/EventedClientTest.o' => %w(
|
124
124
|
test/cxx/EventedClientTest.cpp
|
125
125
|
ext/common/EventedClient.h),
|
126
|
+
'test/cxx/EventedBufferedInput.o' => %w(
|
127
|
+
test/cxx/EventedBufferedInputTest.cpp
|
128
|
+
ext/common/EventedBufferedInput.h),
|
126
129
|
'test/cxx/MessageServerTest.o' => %w(
|
127
130
|
test/cxx/MessageServerTest.cpp
|
128
131
|
ext/common/Logging.h
|
data/build/packaging.rb
CHANGED
@@ -181,23 +181,30 @@ task :fakeroot => [:apache2, :nginx] + Packaging::ASCII_DOCS do
|
|
181
181
|
# We don't use CONFIG['archdir'] and the like because we want
|
182
182
|
# the files to be installed to /usr, and the Ruby interpreter
|
183
183
|
# on the packaging machine might be in /usr/local.
|
184
|
-
|
184
|
+
fake_rubylibdir = "#{fakeroot}/usr/lib/ruby/vendor_ruby"
|
185
|
+
fake_libdir = "#{fakeroot}/usr/lib/phusion-passenger"
|
185
186
|
fake_native_support_dir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}/#{CONFIG['arch']}"
|
186
|
-
fake_agents_dir = "#{fakeroot}
|
187
|
-
fake_helper_scripts_dir = "#{fakeroot}
|
187
|
+
fake_agents_dir = "#{fakeroot}/usr/lib/#{GLOBAL_NAMESPACE_DIRNAME}/agents"
|
188
|
+
fake_helper_scripts_dir = "#{fakeroot}/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/helper-scripts"
|
188
189
|
fake_resources_dir = "#{fakeroot}/usr/share/phusion-passenger"
|
189
|
-
|
190
|
+
fake_include_dir = "#{fakeroot}/usr/share/phusion-passenger/include"
|
191
|
+
fake_docdir = "#{fakeroot}/usr/share/doc/#{GLOBAL_NAMESPACE_DIRNAME}"
|
190
192
|
fake_bindir = "#{fakeroot}/usr/bin"
|
191
193
|
fake_sbindir = "#{fakeroot}/usr/sbin"
|
192
|
-
|
193
|
-
|
194
|
+
fake_apache2_module_dir = "#{fakeroot}/usr/lib/apache2/modules"
|
195
|
+
fake_apache2_module = "#{fake_apache2_module_dir}/mod_passenger.so"
|
196
|
+
fake_ruby_extension_source_dir = "#{fakeroot}/usr/share/phusion-passenger/ruby_extension_source"
|
194
197
|
|
195
198
|
sh "rm -rf #{fakeroot}"
|
196
199
|
sh "mkdir -p #{fakeroot}"
|
197
200
|
|
201
|
+
sh "mkdir -p #{fake_rubylibdir}"
|
202
|
+
sh "cp #{PhusionPassenger.ruby_libdir}/phusion_passenger.rb #{fake_rubylibdir}/"
|
203
|
+
sh "cp -R #{PhusionPassenger.ruby_libdir}/phusion_passenger #{fake_rubylibdir}/"
|
204
|
+
|
198
205
|
sh "mkdir -p #{fake_libdir}"
|
199
|
-
sh "cp #{PhusionPassenger.
|
200
|
-
sh "
|
206
|
+
sh "cp -R #{PhusionPassenger.lib_dir}/common #{fake_libdir}/"
|
207
|
+
sh "rm -rf #{fake_libdir}/common/libboost_oxt"
|
201
208
|
|
202
209
|
sh "mkdir -p #{fake_native_support_dir}"
|
203
210
|
native_support_archdir = PlatformInfo.ruby_extension_binary_compatibility_id
|
@@ -208,12 +215,30 @@ task :fakeroot => [:apache2, :nginx] + Packaging::ASCII_DOCS do
|
|
208
215
|
sh "cp -R #{PhusionPassenger.agents_dir}/* #{fake_agents_dir}/"
|
209
216
|
sh "rm -rf #{fake_agents_dir}/*.dSYM"
|
210
217
|
sh "rm -rf #{fake_agents_dir}/*/*.dSYM"
|
218
|
+
sh "rm -rf #{fake_agents_dir}/*.o"
|
211
219
|
|
212
220
|
sh "mkdir -p #{fake_helper_scripts_dir}"
|
213
221
|
sh "cp -R #{PhusionPassenger.helper_scripts_dir}/* #{fake_helper_scripts_dir}/"
|
214
222
|
|
215
223
|
sh "mkdir -p #{fake_resources_dir}"
|
216
224
|
sh "cp -R resources/* #{fake_resources_dir}/"
|
225
|
+
|
226
|
+
sh "mkdir -p #{fake_include_dir}"
|
227
|
+
# Infer headers that the Nginx module needs
|
228
|
+
headers = []
|
229
|
+
Dir["ext/nginx/*.[ch]"].each do |filename|
|
230
|
+
File.read(filename).split("\n").grep(%r{#include "common/(.+)"}) do |match|
|
231
|
+
headers << ["ext/common/#{$1}", $1]
|
232
|
+
end
|
233
|
+
end
|
234
|
+
headers.each do |header|
|
235
|
+
target = "#{fake_include_dir}/#{header[1]}"
|
236
|
+
dir = File.dirname(target)
|
237
|
+
if !File.directory?(dir)
|
238
|
+
sh "mkdir -p #{dir}"
|
239
|
+
end
|
240
|
+
sh "cp #{header[0]} #{target}"
|
241
|
+
end
|
217
242
|
|
218
243
|
sh "mkdir -p #{fake_docdir}"
|
219
244
|
Packaging::ASCII_DOCS.each do |docfile|
|
@@ -234,6 +259,24 @@ task :fakeroot => [:apache2, :nginx] + Packaging::ASCII_DOCS do
|
|
234
259
|
sh "mkdir -p #{fake_apache2_module_dir}"
|
235
260
|
sh "cp #{APACHE2_MODULE} #{fake_apache2_module_dir}/"
|
236
261
|
|
262
|
+
sh "mkdir -p #{fake_ruby_extension_source_dir}"
|
263
|
+
sh "cp -R #{PhusionPassenger.ruby_extension_source_dir}/* #{fake_ruby_extension_source_dir}"
|
264
|
+
|
265
|
+
puts "Creating #{fake_rubylibdir}/phusion_passenger/locations.ini"
|
266
|
+
File.open("#{fake_rubylibdir}/phusion_passenger/locations.ini", "w") do |f|
|
267
|
+
f.puts "natively_packaged=true"
|
268
|
+
f.puts "bin=/usr/bin"
|
269
|
+
f.puts "agents=/usr/lib/phusion-passenger/agents"
|
270
|
+
f.puts "libdir=/usr/lib/phusion-passenger"
|
271
|
+
f.puts "helper_scripts=/usr/share/phusion-passenger/helper-scripts"
|
272
|
+
f.puts "resources=/usr/share/phusion-passenger"
|
273
|
+
f.puts "includedir=/usr/share/phusion-passenger/include"
|
274
|
+
f.puts "doc=/usr/share/doc/phusion-passenger"
|
275
|
+
f.puts "rubylibdir=/usr/lib/ruby/vendor_ruby"
|
276
|
+
f.puts "apache2_module=/usr/lib/apache2/modules/mod_passenger.so"
|
277
|
+
f.puts "ruby_extension_source=/usr/share/phusion-passenger/ruby_extension_source"
|
278
|
+
end
|
279
|
+
|
237
280
|
sh "find #{fakeroot} -name .DS_Store -print0 | xargs -0 rm -f"
|
238
281
|
end
|
239
282
|
|
data/build/ruby_extension.rb
CHANGED
data/doc/Packaging.txt.md
CHANGED
@@ -84,13 +84,15 @@ The location configuration file is an ini file that looks as follows:
|
|
84
84
|
[locations]
|
85
85
|
natively_packaged=true
|
86
86
|
bin=/usr/bin
|
87
|
-
agents=/usr/lib/phusion-passenger
|
87
|
+
agents=/usr/lib/phusion-passenger/agents
|
88
|
+
libdir=/usr/lib/phusion-passenger
|
88
89
|
helper_scripts=/usr/share/phusion-passenger/helper-scripts
|
89
90
|
resources=/usr/share/phusion-passenger
|
90
|
-
|
91
|
-
|
91
|
+
includedir=/usr/share/phusion-passenger/include
|
92
|
+
doc=/usr/share/doc/phusion-passenger
|
93
|
+
rubylibdir=/usr/lib/ruby/vendor_ruby
|
92
94
|
apache2_module=/usr/lib/apache2/modules/mod_passenger.so
|
93
|
-
ruby_extension_source=/usr/share/
|
95
|
+
ruby_extension_source=/usr/share/phusion-passenger/ruby_extension_source
|
94
96
|
|
95
97
|
All keys except fo `natively_packaged` specify the locations of assets and asset
|
96
98
|
directories. The "Asset types" section provides a description of all asset types.
|
@@ -192,6 +194,20 @@ a list of all possible assets and asset directories.
|
|
192
194
|
|
193
195
|
Value when originally packaged: `<SOURCE_ROOT>/doc`.
|
194
196
|
|
197
|
+
* `includedir`
|
198
|
+
|
199
|
+
A directory that contains the Phusion Passenger header files that are
|
200
|
+
necessary for compiling Nginx.
|
201
|
+
|
202
|
+
Value when originally packaged: `<SOURCE_ROOT>/ext`
|
203
|
+
|
204
|
+
* `libdir`
|
205
|
+
|
206
|
+
A directory that contains the Phusion Passenger library files, e.g.
|
207
|
+
libboost_oxt.a and various .o files.
|
208
|
+
|
209
|
+
Value when originally packaged: `<SOURCE_ROOT>/libout`
|
210
|
+
|
195
211
|
* `rubylibdir`
|
196
212
|
|
197
213
|
A directory that contains the Phusion Passenger Ruby library files. Note that
|
@@ -249,6 +265,3 @@ You can generate a fakeroot with the command `rake fakeroot`. This will
|
|
249
265
|
generate an FHS-compliant directory tree in `pkg/fakeroot`, which you can
|
250
266
|
directly package or with minor modifications. The fakeroot even contains
|
251
267
|
a location configuration file.
|
252
|
-
|
253
|
-
If the default fakeroot structure is not sufficient, please consider
|
254
|
-
sending a patch.
|
data/doc/Users guide Apache.html
CHANGED
@@ -3673,7 +3673,7 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
|
|
3673
3673
|
<div class="paragraph"><p>The maximum number of <a href="#application_process">application processes</a> that may
|
3674
3674
|
simultaneously exist. A larger number results in higher memory usage,
|
3675
3675
|
but improves the ability to handle concurrent HTTP requests.</p></div>
|
3676
|
-
<div class="paragraph"><p>The optimal value depends on your system’s hardware and your workload. You can learn more at the Phusion article <a href="http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/">Tuning Phusion Passenger’s
|
3676
|
+
<div class="paragraph"><p>The optimal value depends on your system’s hardware and your workload. You can learn more at the Phusion article <a href="http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/">Tuning Phusion Passenger’s concurrency settings</a>.</p></div>
|
3677
3677
|
<div class="paragraph"><p>If you find that your server is running out of memory then you should lower this value.</p></div>
|
3678
3678
|
<div class="paragraph"><p>This option may only occur once, in the global server configuration.
|
3679
3679
|
The default value is <em>6</em>.</p></div>
|
data/doc/Users guide Apache.txt
CHANGED
@@ -994,7 +994,7 @@ The maximum number of <<application_process,application processes>> that may
|
|
994
994
|
simultaneously exist. A larger number results in higher memory usage,
|
995
995
|
but improves the ability to handle concurrent HTTP requests.
|
996
996
|
|
997
|
-
The optimal value depends on your system's hardware and your workload. You can learn more at the Phusion article link:http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/[Tuning Phusion Passenger's
|
997
|
+
The optimal value depends on your system's hardware and your workload. You can learn more at the Phusion article link:http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/[Tuning Phusion Passenger's concurrency settings].
|
998
998
|
|
999
999
|
If you find that your server is running out of memory then you should lower this value.
|
1000
1000
|
|
data/doc/Users guide Nginx.html
CHANGED
@@ -1431,9 +1431,10 @@ chmod o+x /home/phusion</pre>
|
|
1431
1431
|
</div>
|
1432
1432
|
</div>
|
1433
1433
|
<span class="anchor_helper" id="run_passenger_installer"></span><h4 class="float" data-anchor="run_passenger_installer">Step 5: run the Phusion Passenger installer</h4>
|
1434
|
-
<div class="paragraph"><p>Nginx is a different from other web servers in that it does not support loadable modules. The only way to extend Nginx is to recompile it entirely from source.
|
1434
|
+
<div class="paragraph"><p>Nginx is a different from other web servers in that it does not support loadable modules. The only way to extend Nginx is to recompile it entirely from source. Since Phusion Passenger consists of some external executables plus an Nginx module, you must recompile Nginx when first installing Phusion Passenger, but also when upgrading Nginx itself or when upgrading the Phusion Passenger version.</p></div>
|
1435
|
+
<div class="paragraph"><p>Recompiling Nginx and the Phusion Passenger executables is what we will do in this step. The good news is that Phusion Passenger provides a tool to make this easy for you.</p></div>
|
1435
1436
|
<div class="paragraph"><p>If you’ve already installed Nginx before, but without Phusion Passenger support, then you <strong>should</strong> uninstall it first. You don’t have to, because you can also install another Nginx with Phusion Passenger support, in parallel to the existing Nginx. We merely recommend uninstalling the existing in order to avoid user confusion, but the choice is yours.</p></div>
|
1436
|
-
<div class="paragraph"><p>If you had previously installed Nginx with Phusion Passenger support, and you are upgrading, then you don’t have to uninstall your existing Nginx first. Instead we’ll overwrite it this step.</p></div>
|
1437
|
+
<div class="paragraph"><p>If you had previously installed Nginx with Phusion Passenger support, and you are upgrading, then you don’t have to uninstall your existing Nginx first. Instead we’ll overwrite it this step. But it is important that you recompile Nginx with the configure parameters that you used last time.</p></div>
|
1437
1438
|
<div class="paragraph"><p>Here’s how you can uninstall the original Nginx:</p></div>
|
1438
1439
|
<div class="ulist"><ul>
|
1439
1440
|
<li>
|
@@ -1453,7 +1454,7 @@ If you installed the existing Nginx through YUM, run <span class="monospaced">yu
|
|
1453
1454
|
<pre>passenger-install-nginx-module</pre>
|
1454
1455
|
</div>
|
1455
1456
|
</div>
|
1456
|
-
<div class="paragraph"><p>At some point it will ask you which prefix to install Nginx to. If you’re upgrading, then specify the same prefix that you used last time.</p></div>
|
1457
|
+
<div class="paragraph"><p>At some point it will ask you which prefix to install Nginx to. If you’re upgrading, then specify the same prefix that you used last time, as well as the same configuration parameters that you used last time.</p></div>
|
1457
1458
|
<span class="anchor_helper" id="verify_passenger_running"></span><h4 class="float" data-anchor="verify_passenger_running">Step 6: Verifying that Phusion Passenger is running</h4>
|
1458
1459
|
<div class="paragraph"><p>Restart your web server and run:</p></div>
|
1459
1460
|
<div class="listingblock">
|
@@ -3621,7 +3622,7 @@ In an <em>if</em> configuration scope.
|
|
3621
3622
|
<div class="paragraph"><p>The maximum number of <a href="#application_process">application processes</a> that may
|
3622
3623
|
simultanously exist. A larger number results in higher memory usage,
|
3623
3624
|
but improves the ability to handle concurrent HTTP requests.</p></div>
|
3624
|
-
<div class="paragraph"><p>The optimal value depends on your system’s hardware and your workload. You can learn more at the Phusion article <a href="http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/">Tuning Phusion Passenger’s
|
3625
|
+
<div class="paragraph"><p>The optimal value depends on your system’s hardware and your workload. You can learn more at the Phusion article <a href="http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/">Tuning Phusion Passenger’s concurrency settings</a>.</p></div>
|
3625
3626
|
<div class="paragraph"><p>If you find that your server is running out of memory then you should lower this value.</p></div>
|
3626
3627
|
<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
|
3627
3628
|
The default value is <em>6</em>.</p></div>
|
data/doc/Users guide Nginx.txt
CHANGED
@@ -981,7 +981,7 @@ The maximum number of <<application_process,application processes>> that may
|
|
981
981
|
simultanously exist. A larger number results in higher memory usage,
|
982
982
|
but improves the ability to handle concurrent HTTP requests.
|
983
983
|
|
984
|
-
The optimal value depends on your system's hardware and your workload. You can learn more at the Phusion article link:http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/[Tuning Phusion Passenger's
|
984
|
+
The optimal value depends on your system's hardware and your workload. You can learn more at the Phusion article link:http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/[Tuning Phusion Passenger's concurrency settings].
|
985
985
|
|
986
986
|
If you find that your server is running out of memory then you should lower this value.
|
987
987
|
|
@@ -145,11 +145,13 @@ configuration file. However, it doesn't copy any files to outside the Phusion Pa
|
|
145
145
|
`passenger-install-apache2-module` is actually just a user-friendly frontend around the command `rake apache2`, which performs the actual compilation of Phusion Passenger.
|
146
146
|
endif::[]
|
147
147
|
ifdef::nginx[]
|
148
|
-
Nginx is a different from other web servers in that it does not support loadable modules. The only way to extend Nginx is to recompile it entirely from source.
|
148
|
+
Nginx is a different from other web servers in that it does not support loadable modules. The only way to extend Nginx is to recompile it entirely from source. Since Phusion Passenger consists of some external executables plus an Nginx module, you must recompile Nginx when first installing Phusion Passenger, but also when upgrading Nginx itself or when upgrading the Phusion Passenger version.
|
149
|
+
|
150
|
+
Recompiling Nginx and the Phusion Passenger executables is what we will do in this step. The good news is that Phusion Passenger provides a tool to make this easy for you.
|
149
151
|
|
150
152
|
If you've already installed Nginx before, but without Phusion Passenger support, then you *should* uninstall it first. You don't have to, because you can also install another Nginx with Phusion Passenger support, in parallel to the existing Nginx. We merely recommend uninstalling the existing in order to avoid user confusion, but the choice is yours.
|
151
153
|
|
152
|
-
If you had previously installed Nginx with Phusion Passenger support, and you are upgrading, then you don't have to uninstall your existing Nginx first. Instead we'll overwrite it this step.
|
154
|
+
If you had previously installed Nginx with Phusion Passenger support, and you are upgrading, then you don't have to uninstall your existing Nginx first. Instead we'll overwrite it this step. But it is important that you recompile Nginx with the configure parameters that you used last time.
|
153
155
|
|
154
156
|
Here's how you can uninstall the original Nginx:
|
155
157
|
|
@@ -162,7 +164,7 @@ To proceed with installing or upgrading Phusion Passenger, run the Phusion Passe
|
|
162
164
|
passenger-install-nginx-module
|
163
165
|
----------------------------------
|
164
166
|
|
165
|
-
At some point it will ask you which prefix to install Nginx to. If you're upgrading, then specify the same prefix that you used last time.
|
167
|
+
At some point it will ask you which prefix to install Nginx to. If you're upgrading, then specify the same prefix that you used last time, as well as the same configuration parameters that you used last time.
|
166
168
|
endif::[]
|
167
169
|
|
168
170
|
[[verify_passenger_running]]
|
@@ -283,6 +283,12 @@ DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_proxy_address, unionStationPro
|
|
283
283
|
DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_user, analyticsLogUser)
|
284
284
|
DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_group, analyticsLogGroup)
|
285
285
|
|
286
|
+
static const char *
|
287
|
+
cmd_passenger_ctl(cmd_parms *cmd, void *dummy, const char *name, const char *value) {
|
288
|
+
serverConfig.ctl.set(name, value);
|
289
|
+
return NULL;
|
290
|
+
}
|
291
|
+
|
286
292
|
static const char *
|
287
293
|
cmd_passenger_pre_start(cmd_parms *cmd, void *pcfg, const char *arg) {
|
288
294
|
serverConfig.prestartURLs.insert(arg);
|
@@ -458,6 +464,7 @@ cmd_passenger_use_global_queue(cmd_parms *cmd, void *pcfg, int arg) {
|
|
458
464
|
|
459
465
|
|
460
466
|
typedef const char * (*Take1Func)();
|
467
|
+
typedef const char * (*Take2Func)();
|
461
468
|
typedef const char * (*FlagFunc)();
|
462
469
|
|
463
470
|
const command_rec passenger_commands[] = {
|
@@ -467,6 +474,11 @@ const command_rec passenger_commands[] = {
|
|
467
474
|
NULL,
|
468
475
|
RSRC_CONF,
|
469
476
|
"The Passenger root folder."),
|
477
|
+
AP_INIT_TAKE2("PassengerCtl",
|
478
|
+
(Take2Func) cmd_passenger_ctl,
|
479
|
+
NULL,
|
480
|
+
RSRC_CONF,
|
481
|
+
"Set advanced options."),
|
470
482
|
AP_INIT_TAKE1("PassengerDefaultRuby",
|
471
483
|
(Take1Func) cmd_passenger_default_ruby,
|
472
484
|
NULL,
|