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.

Files changed (79) hide show
  1. data.tar.gz.asc +7 -7
  2. data/NEWS +27 -0
  3. data/bin/passenger-config +6 -3
  4. data/bin/passenger-install-apache2-module +2 -2
  5. data/bin/passenger-install-nginx-module +16 -2
  6. data/build/agents.rb +4 -0
  7. data/build/apache2.rb +1 -1
  8. data/build/cplusplus_support.rb +1 -1
  9. data/build/cxx_tests.rb +3 -0
  10. data/build/packaging.rb +51 -8
  11. data/build/ruby_extension.rb +1 -1
  12. data/doc/Packaging.txt.md +20 -7
  13. data/doc/Users guide Apache.html +1 -1
  14. data/doc/Users guide Apache.txt +1 -1
  15. data/doc/Users guide Nginx.html +5 -4
  16. data/doc/Users guide Nginx.txt +1 -1
  17. data/doc/users_guide_snippets/installation.txt +5 -3
  18. data/ext/apache2/Configuration.cpp +12 -0
  19. data/ext/apache2/Configuration.hpp +7 -4
  20. data/ext/apache2/Hooks.cpp +29 -19
  21. data/ext/common/AgentsStarter.cpp +85 -57
  22. data/ext/common/AgentsStarter.h +570 -42
  23. data/ext/common/ApplicationPool2/DirectSpawner.h +5 -2
  24. data/ext/common/ApplicationPool2/Implementation.cpp +7 -1
  25. data/ext/common/ApplicationPool2/Pool.h +6 -3
  26. data/ext/common/ApplicationPool2/Process.h +12 -3
  27. data/ext/common/ApplicationPool2/SmartSpawner.h +2 -1
  28. data/ext/common/Constants.h +4 -1
  29. data/ext/common/EventedBufferedInput.h +139 -16
  30. data/ext/common/MultiLibeio.cpp +4 -2
  31. data/ext/common/SafeLibev.h +15 -62
  32. data/ext/common/ServerInstanceDir.h +10 -26
  33. data/ext/common/Utils.cpp +1 -3
  34. data/ext/common/Utils.h +1 -1
  35. data/ext/common/Utils/StrIntUtils.cpp +9 -0
  36. data/ext/common/Utils/StrIntUtils.h +5 -0
  37. data/ext/common/Utils/VariantMap.h +63 -14
  38. data/ext/common/agents/Base.cpp +50 -15
  39. data/ext/common/agents/HelperAgent/AgentOptions.h +20 -12
  40. data/ext/common/agents/HelperAgent/FileBackedPipe.h +1 -1
  41. data/ext/common/agents/HelperAgent/Main.cpp +5 -4
  42. data/ext/common/agents/HelperAgent/RequestHandler.h +1 -1
  43. data/ext/common/agents/LoggingAgent/Main.cpp +0 -1
  44. data/ext/common/agents/LoggingAgent/RemoteSender.h +2 -2
  45. data/ext/common/agents/SpawnPreparer.cpp +23 -5
  46. data/ext/common/agents/Watchdog/AgentWatcher.cpp +508 -0
  47. data/ext/common/agents/Watchdog/HelperAgentWatcher.cpp +93 -0
  48. data/ext/common/agents/Watchdog/LoggingAgentWatcher.cpp +68 -0
  49. data/ext/common/agents/Watchdog/Main.cpp +180 -802
  50. data/ext/common/agents/Watchdog/ServerInstanceDirToucher.cpp +111 -0
  51. data/ext/nginx/Configuration.c +107 -92
  52. data/ext/nginx/Configuration.h +1 -0
  53. data/ext/nginx/ContentHandler.c +6 -6
  54. data/ext/nginx/ContentHandler.h +1 -1
  55. data/ext/nginx/config +8 -2
  56. data/ext/nginx/ngx_http_passenger_module.c +54 -60
  57. data/ext/nginx/ngx_http_passenger_module.h +6 -6
  58. data/lib/phusion_passenger.rb +17 -10
  59. data/lib/phusion_passenger/admin_tools/server_instance.rb +2 -2
  60. data/lib/phusion_passenger/common_library.rb +0 -1
  61. data/lib/phusion_passenger/platform_info.rb +10 -1
  62. data/lib/phusion_passenger/platform_info/depcheck.rb +4 -4
  63. data/lib/phusion_passenger/platform_info/depcheck_specs/compiler_toolchain.rb +2 -2
  64. data/lib/phusion_passenger/platform_info/ruby.rb +7 -0
  65. data/lib/phusion_passenger/request_handler.rb +119 -42
  66. data/lib/phusion_passenger/request_handler/thread_handler.rb +25 -22
  67. data/lib/phusion_passenger/standalone/command.rb +2 -0
  68. data/lib/phusion_passenger/standalone/runtime_installer.rb +4 -3
  69. data/lib/phusion_passenger/standalone/start_command.rb +49 -37
  70. data/resources/templates/nginx/pcre_checksum_could_not_be_verified.txt.erb +11 -0
  71. data/test/cxx/CxxTestMain.cpp +2 -0
  72. data/test/cxx/EventedBufferedInputTest.cpp +758 -0
  73. data/test/cxx/ServerInstanceDirTest.cpp +16 -31
  74. data/test/cxx/TestSupport.cpp +2 -1
  75. data/test/cxx/VariantMapTest.cpp +23 -11
  76. metadata +8 -4
  77. metadata.gz.asc +7 -7
  78. data/ext/common/AgentsStarter.hpp +0 -655
  79. 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
- iQEcBAABAgAGBQJRiUovAAoJECrHRaUKISqM9g0H/jqfZM4QCAVVtppUhGTjv1xi
6
- jBtKy1/47H9KpU7xwsFtEViyfV6oyKdnTCUonJ8o7wZdlTu+g8mB2jE5zPVU7Lor
7
- M4BwvpfBPjser/E/MYAuXOdMHAA3DlSQko3ogVkENdzLsNk7zxnmt821zwSM9xr0
8
- 6LUG2mZqFA6RWChzPqAh49+w+BezAPj5XA+eUTlbITxoSWGLpJbbcmTTDu9ud7sU
9
- FeplAmxKsVUc+C2zLAeUck1VIdYjbrppQ/DIAt62BTNPbku2hzGh/qK6QMTBSfI9
10
- 1yKYWGWe/DQ9BHzH7T7Rhh2GvbHaoLpaQLyxZUce1rr+pKZ71AznubBrZAjPQJQ=
11
- =WyCF
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
 
@@ -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.source_root}/libout/common/libpassenger_common")
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.source_root}/libout/common/libboost_oxt.a"
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.source_root}/libout/common/libboost_oxt.a")
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}"
@@ -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',
@@ -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.hpp
50
+ ext/common/AgentsStarter.h
51
51
  ext/common/Exceptions.h
52
52
  ext/common/Logging.h
53
53
  ext/common/RandomGenerator.h
@@ -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 RUBY_PLATFORM =~ /darwin/
76
+ if PlatformInfo.os_name == "macosx"
77
77
  shlib_flag = "-flat_namespace -bundle -undefined dynamic_lookup"
78
78
  else
79
79
  shlib_flag = "-shared"
@@ -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
@@ -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
- fake_libdir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}"
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}#{NATIVELY_PACKAGED_AGENTS_DIR}"
187
- fake_helper_scripts_dir = "#{fakeroot}#{NATIVELY_PACKAGED_HELPER_SCRIPTS_DIR}"
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
- fake_docdir = "#{fakeroot}#{NATIVELY_PACKAGED_DOC_DIR}"
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
- fake_apache2_module = "#{fakeroot}#{NATIVELY_PACKAGED_APACHE2_MODULE}"
193
- fake_apache2_module_dir = File.dirname(fake_apache2_module)
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.ruby_libdir}/phusion_passenger.rb #{fake_libdir}/"
200
- sh "cp -R #{PhusionPassenger.ruby_libdir}/phusion_passenger #{fake_libdir}/"
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
 
@@ -21,7 +21,7 @@
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
22
  # THE SOFTWARE.
23
23
 
24
- if RUBY_PLATFORM =~ /java/
24
+ if !PlatformInfo.passenger_needs_ruby_dev_header?
25
25
  NATIVE_SUPPORT_TARGET = nil
26
26
 
27
27
  task :native_support do
@@ -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
- doc=/usr/share/doc
91
- rubylibdir=/usr/lib/ruby/1.9.0
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/phusion_passenger/ruby_native_support_source
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.
@@ -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 conurrency settings</a>.</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 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>
@@ -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 conurrency settings].
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
 
@@ -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. That’s 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>
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 conurrency settings</a>.</p></div>
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>
@@ -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 conurrency settings].
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. That's what we will do in this step. The good news is that Phusion Passenger provides a tool to make this easy for you.
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,