passenger 4.0.14 → 4.0.16

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 (121) hide show
  1. data.tar.gz.asc +7 -7
  2. data/NEWS +69 -0
  3. data/bin/passenger-install-apache2-module +7 -1
  4. data/bin/passenger-install-nginx-module +18 -1
  5. data/build/apache2.rb +25 -1
  6. data/build/basics.rb +7 -4
  7. data/build/debian.rb +72 -25
  8. data/build/nginx.rb +24 -0
  9. data/build/packaging.rb +45 -3
  10. data/debian.template/{control → control.template} +17 -8
  11. data/debian.template/ruby-passenger.install.template +1 -0
  12. data/debian.template/rules.template +9 -3
  13. data/dev/run_travis.sh +14 -0
  14. data/doc/Users guide Apache.idmap.txt +64 -48
  15. data/doc/Users guide Apache.txt +127 -93
  16. data/doc/Users guide Nginx.idmap.txt +46 -28
  17. data/doc/Users guide Nginx.txt +100 -12
  18. data/doc/images/{conservative_spawning.png → direct_spawning.png} +0 -0
  19. data/doc/images/{conservative_spawning.svg → direct_spawning.svg} +0 -0
  20. data/doc/users_guide_snippets/installation.txt +107 -66
  21. data/doc/users_guide_snippets/passenger_spawn_method.txt +1 -1
  22. data/doc/users_guide_snippets/rvm_helper_tool.txt +0 -12
  23. data/doc/users_guide_snippets/tips.txt +70 -3
  24. data/doc/users_guide_snippets/under_the_hood/page_caching_support.txt +2 -0
  25. data/doc/users_guide_snippets/under_the_hood/relationship_with_ruby.txt +114 -0
  26. data/ext/apache2/Configuration.cpp +53 -101
  27. data/ext/apache2/Configuration.hpp +19 -41
  28. data/ext/apache2/ConfigurationCommands.cpp +95 -0
  29. data/ext/apache2/ConfigurationCommands.cpp.erb +91 -0
  30. data/ext/apache2/ConfigurationFields.hpp +59 -0
  31. data/ext/apache2/ConfigurationFields.hpp.erb +89 -0
  32. data/ext/apache2/ConfigurationSetters.cpp +223 -0
  33. data/ext/apache2/ConfigurationSetters.cpp.erb +126 -0
  34. data/ext/apache2/CreateDirConfig.cpp +50 -0
  35. data/ext/apache2/CreateDirConfig.cpp.erb +71 -0
  36. data/ext/apache2/Hooks.cpp +6 -0
  37. data/ext/apache2/MergeDirConfig.cpp +103 -0
  38. data/ext/apache2/MergeDirConfig.cpp.erb +81 -0
  39. data/ext/common/ApplicationPool2/AppTypes.cpp +2 -0
  40. data/ext/common/ApplicationPool2/AppTypes.h +2 -0
  41. data/ext/common/ApplicationPool2/Common.h +1 -1
  42. data/ext/common/ApplicationPool2/Group.h +56 -7
  43. data/ext/common/ApplicationPool2/Implementation.cpp +133 -31
  44. data/ext/common/ApplicationPool2/Options.h +23 -2
  45. data/ext/common/ApplicationPool2/Pool.h +8 -1
  46. data/ext/common/ApplicationPool2/Process.h +9 -0
  47. data/ext/common/ApplicationPool2/Session.h +1 -0
  48. data/ext/common/ApplicationPool2/Spawner.h +21 -19
  49. data/ext/common/ApplicationPool2/SuperGroup.h +1 -1
  50. data/ext/common/Constants.h +21 -17
  51. data/ext/common/Constants.h.erb +1 -1
  52. data/ext/common/Exceptions.h +19 -0
  53. data/ext/common/ServerInstanceDir.h +8 -4
  54. data/ext/common/Utils.cpp +33 -1
  55. data/ext/common/Utils.h +14 -0
  56. data/ext/common/Utils/StrIntUtils.cpp +16 -0
  57. data/ext/common/Utils/StrIntUtils.h +5 -0
  58. data/ext/common/agents/HelperAgent/Main.cpp +5 -5
  59. data/ext/common/agents/HelperAgent/RequestHandler.h +94 -45
  60. data/ext/common/agents/LoggingAgent/Main.cpp +10 -26
  61. data/ext/common/agents/Watchdog/Main.cpp +4 -15
  62. data/ext/nginx/CacheLocationConfig.c +501 -0
  63. data/ext/nginx/CacheLocationConfig.c.erb +140 -0
  64. data/ext/nginx/Configuration.c +29 -453
  65. data/ext/nginx/Configuration.h +3 -21
  66. data/ext/nginx/ConfigurationCommands.c +501 -0
  67. data/ext/nginx/ConfigurationCommands.c.erb +136 -0
  68. data/ext/nginx/ConfigurationFields.h +89 -0
  69. data/ext/nginx/ConfigurationFields.h.erb +85 -0
  70. data/ext/nginx/ContentHandler.c +3 -166
  71. data/ext/nginx/CreateLocationConfig.c +146 -0
  72. data/ext/nginx/CreateLocationConfig.c.erb +70 -0
  73. data/ext/nginx/MergeLocationConfig.c +166 -0
  74. data/ext/nginx/MergeLocationConfig.c.erb +72 -0
  75. data/ext/nginx/config +4 -0
  76. data/ext/oxt/detail/tracable_exception_disabled.hpp +21 -1
  77. data/ext/oxt/detail/tracable_exception_enabled.hpp +4 -1
  78. data/ext/oxt/implementation.cpp +7 -1
  79. data/ext/oxt/macros.hpp +9 -7
  80. data/helper-scripts/backtrace-sanitizer.rb +23 -0
  81. data/helper-scripts/classic-rails-loader.rb +23 -0
  82. data/helper-scripts/classic-rails-preloader.rb +23 -0
  83. data/helper-scripts/download_binaries/extconf.rb +10 -5
  84. data/helper-scripts/meteor-loader.rb +127 -0
  85. data/helper-scripts/node-loader.js +1 -1
  86. data/helper-scripts/rack-preloader.rb +23 -0
  87. data/helper-scripts/system-memory-stats.py +22 -0
  88. data/helper-scripts/touch-dir.sh +48 -0
  89. data/lib/phusion_passenger.rb +1 -1
  90. data/lib/phusion_passenger/apache2/config_options.rb +104 -0
  91. data/lib/phusion_passenger/constants.rb +8 -0
  92. data/lib/phusion_passenger/native_support.rb +9 -1
  93. data/lib/phusion_passenger/nginx/config_options.rb +328 -0
  94. data/lib/phusion_passenger/packaging.rb +2 -2
  95. data/lib/phusion_passenger/platform_info/apache.rb +8 -0
  96. data/lib/phusion_passenger/platform_info/compiler.rb +2 -2
  97. data/lib/phusion_passenger/rails3_extensions/init.rb +19 -4
  98. data/lib/phusion_passenger/ruby_core_enhancements.rb +4 -1
  99. data/lib/phusion_passenger/standalone/app_finder.rb +3 -2
  100. data/lib/phusion_passenger/standalone/command.rb +1 -0
  101. data/lib/phusion_passenger/standalone/runtime_installer.rb +1 -6
  102. data/lib/phusion_passenger/standalone/runtime_locator.rb +9 -2
  103. data/lib/phusion_passenger/standalone/start_command.rb +45 -9
  104. data/lib/phusion_passenger/utils.rb +4 -1
  105. data/resources/templates/{nginx → installer_common}/run_installer_as_root.txt.erb +3 -1
  106. data/resources/templates/nginx/nginx_module_sources_not_available.txt.erb +6 -0
  107. data/resources/templates/standalone/config.erb +8 -8
  108. data/test/cxx/ApplicationPool2/PoolTest.cpp +120 -3
  109. data/test/cxx/RequestHandlerTest.cpp +66 -3
  110. data/test/integration_tests/native_packaging_spec.rb +41 -0
  111. data/test/integration_tests/nginx_tests.rb +1 -0
  112. data/test/integration_tests/standalone_tests.rb +4 -0
  113. data/test/ruby/shared/rails/analytics_logging_extensions_sharedspec.rb +22 -0
  114. data/test/stub/rails3.0/config/initializers/passenger.rb +2 -1
  115. data/test/stub/rails3.1/config/initializers/passenger.rb +2 -1
  116. data/test/stub/rails3.2/config/initializers/passenger.rb +2 -1
  117. data/test/stub/rails4.0/config/initializers/passenger.rb +5 -1
  118. data/test/stub/wsgi/passenger_wsgi.py +5 -0
  119. metadata +32 -7
  120. metadata.gz.asc +7 -7
  121. data/resources/templates/apache2/run_installer_as_root.txt.erb +0 -8
@@ -63,10 +63,12 @@ end
63
63
  desc "Build, sign & upload gem & tarball"
64
64
  task 'package:release' => ['package:set_official', 'package:gem', 'package:tarball', 'package:sign'] do
65
65
  require 'phusion_passenger'
66
+ require 'phusion_passenger/platform_info'
66
67
  require 'yaml'
67
68
  require 'uri'
68
69
  require 'net/http'
69
70
  require 'net/https'
71
+ require 'digest/sha1'
70
72
  basename = "#{PhusionPassenger::PACKAGE_NAME}-#{PhusionPassenger::VERSION_STRING}"
71
73
  version = PhusionPassenger::VERSION_STRING
72
74
  is_enterprise = basename =~ /enterprise/
@@ -88,6 +90,11 @@ task 'package:release' => ['package:set_official', 'package:gem', 'package:tarba
88
90
  "admin_password: ..."
89
91
  end
90
92
 
93
+ if !PhusionPassenger::PlatformInfo.find_command("hub")
94
+ STDERR.puts "-------------------"
95
+ abort "*** ERROR: Please 'brew install hub' first"
96
+ end
97
+
91
98
  tag = "#{tag_prefix}-#{version}"
92
99
  sh "git tag -s #{tag} -u 0A212A8C -m 'Release #{version}'"
93
100
 
@@ -96,8 +103,9 @@ task 'package:release' => ['package:set_official', 'package:gem', 'package:tarba
96
103
  sh "git push origin #{tag_prefix}-#{version}"
97
104
 
98
105
  if is_open_source
99
- sh "s3cmd -P put pkg/passenger-#{version}.{gem,tar.gz,gem.asc,tar.gz.asc} s3://phusion-passenger/releases/"
100
- sh "gem push pkg/passenger-#{version}.gem"
106
+ sh "s3cmd -P put #{PKG_DIR}/passenger-#{version}.{gem,tar.gz,gem.asc,tar.gz.asc} s3://phusion-passenger/releases/"
107
+ sh "gem push #{PKG_DIR}/passenger-#{version}.gem"
108
+
101
109
  puts "Updating version number on website..."
102
110
  if is_beta
103
111
  uri = URI.parse("https://www.phusionpassenger.com/latest_beta_version")
@@ -116,6 +124,30 @@ task 'package:release' => ['package:set_official', 'package:gem', 'package:tarba
116
124
  "Status: #{response.code}\n\n" +
117
125
  response.body
118
126
  end
127
+
128
+ puts "Submitting Homebrew pull request..."
129
+ sha1 = File.open("#{PKG_DIR}/passenger-#{version}.tar.gz", "rb") do |f|
130
+ Digest::SHA1.hexdigest(f.read)
131
+ end
132
+ sh "rm -rf /tmp/homebrew"
133
+ sh "git clone https://github.com/mxcl/homebrew.git /tmp/homebrew"
134
+ formula = File.read("/tmp/homebrew/Library/Formula/passenger.rb")
135
+ formula.gsub!(/passenger-.+?\.tar\.gz/, "passenger-#{version}.tar.gz") ||
136
+ abort("Unable to substitute Homebrew formula tarball filename")
137
+ formula.gsub!(/sha1 .*/, "sha1 '#{sha1}'") ||
138
+ abort("Unable to substitute Homebrew formula SHA-1")
139
+ File.open("/tmp/homebrew/Library/Formula/passenger.rb", "w") do |f|
140
+ f.write(formula)
141
+ end
142
+ sh "cd /tmp/homebrew && hub pull-request 'Update passenger to version #{version}' -h release-#{version}"
143
+
144
+ puts "Initiating building of Debian packages"
145
+ command = "cd /srv/passenger_apt_automation && " +
146
+ "chpst -L /tmp/passenger_apt_automation.lock " +
147
+ "./new_release https://github.com/phusion/passenger.git passenger.repo passenger.apt release-#{version}"
148
+ sh "ssh psg_apt_automation@juvia-helper.phusion.nl at now <<<'#{command}'"
149
+
150
+ puts "Building OS X binaries..."
119
151
  sh "cd ../passenger_autobuilder && " +
120
152
  "git pull && " +
121
153
  "./autobuild-osx https://github.com/phusion/passenger.git passenger psg_autobuilder_chroot@juvia-helper.phusion.nl --tag=#{tag}"
@@ -124,8 +156,18 @@ task 'package:release' => ['package:set_official', 'package:gem', 'package:tarba
124
156
  else
125
157
  dir = "/u/apps/passenger_website/shared"
126
158
  subdir = string_option('NAME', version)
127
- sh "scp pkg/#{basename}.{gem,tar.gz,gem.asc,tar.gz.asc} app@shell.phusion.nl:#{dir}/"
159
+ sh "scp #{PKG_DIR}/#{basename}.{gem,tar.gz,gem.asc,tar.gz.asc} app@shell.phusion.nl:#{dir}/"
128
160
  sh "ssh app@shell.phusion.nl 'mkdir -p \"#{dir}/assets/#{subdir}\" && mv #{dir}/#{basename}.{gem,tar.gz,gem.asc,tar.gz.asc} \"#{dir}/assets/#{subdir}/\"'"
161
+ sh "curl -F file=@#{PKG_DIR}/#{basename}.gem --user admin:#{website_config['admin_password']} " +
162
+ "https://www.phusionpassenger.com/enterprise_gems/upload"
163
+
164
+ puts "Initiating building of Debian packages"
165
+ git_url = `git config remote.origin.url`.strip
166
+ command = "cd /srv/passenger_apt_automation && " +
167
+ "chpst -L /tmp/passenger_apt_automation.lock " +
168
+ "./new_release #{git_url} passenger-enterprise.repo passenger-enterprise.apt enterprise-#{version}"
169
+ sh "ssh psg_apt_automation@juvia-helper.phusion.nl at now <<<'#{command}'"
170
+
129
171
  sh "cd ../passenger_autobuilder && " +
130
172
  "git pull && " +
131
173
  "./autobuild-osx TODO passenger-enterprise psg_autobuilder_chroot@juvia-helper.phusion.nl --tag=#{tag}"
@@ -4,24 +4,33 @@ Priority: optional
4
4
  Maintainer: John Leach <john@brightbox.co.uk>
5
5
  Uploaders: Phusion <info@phusion.nl>, Hongli Lai <hongli@phusion.nl>
6
6
  Build-Depends: debhelper (>= 7.0.50~), rake,
7
- ruby1.8, ruby1.8-dev, rubygems, ruby1.9.1, ruby1.9.1-dev,
7
+ ruby1.8, ruby1.8-dev, rubygems1.8,
8
+ ruby1.9.1, ruby1.9.1-dev,
8
9
  apache2-mpm-worker | apache2-mpm, apache2-threaded-dev,
9
- libapr1-dev, libcurl4-openssl-dev, libev-dev (>= 1:4.0.0)
10
+ #if is_distribution?('<= lucid')
11
+ rubygems1.9,
12
+ #endif
13
+ #if is_distribution?('>= precise')
14
+ libev-dev (>= 1:4.0.0),
15
+ #endif
16
+ libapr1-dev, libcurl4-openssl-dev
10
17
  Standards-Version: 3.9.3
11
18
  Homepage: https://www.phusionpassenger.com/
12
- Vcs-Git: git://github.com/johnl/deb-passenger.git
13
- Vcs-Browser: https://github.com/johnl/deb-passenger
19
+ Vcs-Git: git://github.com/phusion/passenger.git
20
+ Vcs-Browser: https://github.com/phusion/passenger
14
21
  XS-Ruby-Versions: all
15
22
 
16
23
  Package: ruby-passenger
17
24
  Architecture: any
18
- Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, rubygems (>= 1.2), ruby-rack
19
- Recommends: ruby-passenger-doc (= ${binary:Version})
25
+ Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter,
26
+ rubygems (>= 1.2), ruby-rack, ruby-daemon-controller
27
+ Recommends: ruby-passenger-doc (= ${binary:Version}), ruby-passenger-dev (= ${binary:Version}),
28
+ crash-watch
20
29
  Suggests: python
21
30
  Breaks: libapache2-mod-passenger (<< 1:3.9.1), passenger-common,
22
31
  passenger-common1.8, passenger-common1.9.1
23
- Replaces: libapache2-mod-passenger (<< 1:3.9.1),
24
- passenger-common, passenger-common1.8, passenger-common1.9.1
32
+ Replaces: libapache2-mod-passenger (<< 1:3.9.1), passenger-common,
33
+ passenger-common1.8, passenger-common1.9.1
25
34
  Description: Rails and Rack support for Apache2 and Nginx
26
35
  Phusion Passenger — a.k.a. mod_rails or mod_rack — makes
27
36
  deployment of Ruby web applications, such as those built on the
@@ -1,4 +1,5 @@
1
1
  usr/lib/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/agents/
2
+ nginx-<%= PhusionPassenger::PREFERRED_NGINX_VERSION %>/objs/nginx usr/lib/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/
2
3
  usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/helper-scripts/
3
4
  usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/templates/
4
5
  usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/standalone_default_root/
@@ -1,7 +1,9 @@
1
1
  #!/usr/bin/make -f
2
2
  # export DH_VERBOSE=1
3
3
 
4
- export USE_VENDORED_LIBEV=false
4
+ #if is_distribution?('>= precise')
5
+ export USE_VENDORED_LIBEV=false
6
+ #endif
5
7
 
6
8
  #if ['1', 'true', 'on', 'yes'].include?(ENV['USE_CCACHE'])
7
9
  export USE_CCACHE=1
@@ -18,19 +20,23 @@ override_dh_auto_build:
18
20
  mv pkg/fakeroot pkg/fakeroot1.8
19
21
  /usr/bin/ruby1.9.1 /usr/bin/rake fakeroot
20
22
  mv pkg/fakeroot pkg/fakeroot1.9.1
23
+ cd nginx-<%= PhusionPassenger::PREFERRED_NGINX_VERSION %> && \
24
+ ./configure --prefix=/tmp \
25
+ <%= PhusionPassenger::STANDALONE_NGINX_CONFIGURE_OPTIONS %> \
26
+ --add-module=`pwd`/../ext/nginx && \
27
+ make
21
28
 
22
29
  override_dh_auto_install:
23
30
  mkdir debian/tmp/
24
31
  # Merge Ruby 1.8 and 1.9 files into a single directory.
25
32
  cp -a pkg/fakeroot1.8/* debian/tmp/
26
33
  cp -a pkg/fakeroot1.9.1/* debian/tmp/
27
- # Do not package Passenger Standalone.
28
- rm -rf debian/tmp/usr/bin/passenger
29
34
  touch debian/tmp/usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/release.txt
30
35
 
31
36
  override_dh_auto_clean:
32
37
  /usr/bin/rake clean CLEAN_DOCS=false
33
38
  rm -rf pkg/fakeroot1.8
34
39
  rm -rf pkg/fakeroot1.9.1
40
+ cd nginx-<%= PhusionPassenger::PREFERRED_NGINX_VERSION %> && if test -f Makefile; then make clean; fi
35
41
  # Hack to prevent HTML files from being renegerated
36
42
  touch doc/*.html
@@ -24,6 +24,16 @@ function run()
24
24
  function apt_get_update() {
25
25
  if [[ "$apt_get_updated" = "" ]]; then
26
26
  apt_get_updated=1
27
+ if [[ "$TEST_DEBIAN_PACKAGING" = 1 ]]; then
28
+ if ! [[ -e /usr/bin/add-apt-repository ]]; then
29
+ run sudo apt-get update
30
+ run sudo apt-get install -y --no-install-recommends python-software-properties
31
+ if ! [[ -e /usr/bin/add-apt-repository ]]; then
32
+ run sudo apt-get install -y --no-install-recommends software-properties-common
33
+ fi
34
+ fi
35
+ run sudo add-apt-repository -y ppa:phusion.nl/misc
36
+ fi
27
37
  run sudo apt-get update
28
38
  fi
29
39
  }
@@ -49,6 +59,10 @@ run lsb_release -a
49
59
  sudo tee /etc/dpkg/dpkg.cfg.d/02apt-speedup >/dev/null <<<"force-unsafe-io"
50
60
  cp test/config.json.travis test/config.json
51
61
 
62
+ # Relax permissions on home directory so that the application root
63
+ # permission checks pass.
64
+ chmod g+x,o+x $HOME
65
+
52
66
  if [[ "$TEST_RUBY_VERSION" != "" ]]; then
53
67
  echo "$ rvm use $TEST_RUBY_VERSION"
54
68
  if [[ -f ~/.rvm/scripts/rvm ]]; then
@@ -30,41 +30,43 @@
30
30
 
31
31
  2.5. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux => installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1y5ie8b
32
32
 
33
- 2.6. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-b17h8g
33
+ 2.6. Installing or upgrading on Mac OS X with Homebrew => installing-or-upgrading-on-mac-os-x-with-homebrew-1pia1cx
34
34
 
35
- 2.7. Cryptographic verification of installation files => cryptographic-verification-of-installation-files-ed3r9v
35
+ 2.7. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-b17h8g
36
36
 
37
- 2.7.1. Synopsis => synopsis-uwnz2o
37
+ 2.8. Cryptographic verification of installation files => cryptographic-verification-of-installation-files-ed3r9v
38
38
 
39
- 2.7.2. Importing the Phusion Software Signing key => importing-the-phusion-software-signing-key-1x0rhv
39
+ 2.8.1. Synopsis => synopsis-uwnz2o
40
40
 
41
- 2.7.3. Verifying the Phusion Software Signing key => verifying-the-phusion-software-signing-key-10430lg
41
+ 2.8.2. Importing the Phusion Software Signing key => importing-the-phusion-software-signing-key-1x0rhv
42
42
 
43
- 2.7.4. Verifying the gem and tarball => verifying-the-gem-and-tarball-1nf0uov
43
+ 2.8.3. Verifying the Phusion Software Signing key => verifying-the-phusion-software-signing-key-10430lg
44
44
 
45
- 2.7.5. Verifying Git signatures => verifying-git-signatures-oaafwd
45
+ 2.8.4. Verifying the gem and tarball => verifying-the-gem-and-tarball-1nf0uov
46
46
 
47
- 2.7.6. Verifying DEB and RPM packages => verifying-deb-and-rpm-packages-vgtv04
47
+ 2.8.5. Verifying Git signatures => verifying-git-signatures-oaafwd
48
48
 
49
- 2.7.7. Revocation => revocation-4o01n2
49
+ 2.8.6. Verifying DEB and RPM packages => verifying-deb-and-rpm-packages-vgtv04
50
50
 
51
- 2.8. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-1arnxii
51
+ 2.8.7. Revocation => revocation-4o01n2
52
52
 
53
- 2.9. Customizing the compilation process => customizing-the-compilation-process-1sds3od
53
+ 2.9. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-1arnxii
54
54
 
55
- 2.9.1. Setting the compiler => setting-the-compiler-1symq7h
55
+ 2.10. Customizing the compilation process => customizing-the-compilation-process-1sds3od
56
56
 
57
- 2.9.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-wzu0ey
57
+ 2.10.1. Setting the compiler => setting-the-compiler-1symq7h
58
58
 
59
- 2.9.3. Forcing location of command line tools and dependencies => forcing-location-of-certain-command-line-tools-1hym30u
59
+ 2.10.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-wzu0ey
60
60
 
61
- 2.10. Working with the Apache configuration file => locating-the-apache-configuration-file-1fterqv
61
+ 2.10.3. Forcing location of command line tools and dependencies => forcing-location-of-certain-command-line-tools-1hym30u
62
62
 
63
- 2.11. Disabling without uninstalling => unloading-disabling-phusion-passenger-from-apache-without-uninstalling-it-s1axnx
63
+ 2.11. Working with the Apache configuration file => locating-the-apache-configuration-file-1fterqv
64
64
 
65
- 2.12. Uninstalling => uninstalling-phusion-passenger-1qb4ssq
65
+ 2.12. Disabling without uninstalling => unloading-disabling-phusion-passenger-from-apache-without-uninstalling-it-s1axnx
66
66
 
67
- 2.13. Moving to a different directory => moving-to-a-different-directory-1n0gkwh
67
+ 2.13. Uninstalling => uninstalling-phusion-passenger-1qb4ssq
68
+
69
+ 2.14. Moving to a different directory => moving-to-a-different-directory-1n0gkwh
68
70
 
69
71
  3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3.x) application => deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-x-application-9r92hi
70
72
 
@@ -132,55 +134,61 @@
132
134
 
133
135
  6.10. PassengerRestartDir <directory> => passengerrestartdir-directory--1fmhmv0
134
136
 
135
- 6.11. PassengerBufferResponse <on|off> => passengerbufferresponse-on-off--1y7ilka
137
+ 6.11. PassengerRollingRestarts <on|off> => passengerrollingrestarts
138
+
139
+ 6.12. PassengerResistDeploymentErrors <on|off> => passengerresistdeploymenterrors
140
+
141
+ 6.13. Security options => security-options-1pb75ho
142
+
143
+ 6.13.1. PassengerUserSwitching <on|off> => passengeruserswitching
136
144
 
137
- 6.12. PassengerRollingRestarts <on|off> => passengerrollingrestarts
145
+ 6.13.2. PassengerUser <username> => passengeruser
138
146
 
139
- 6.13. PassengerResistDeploymentErrors <on|off> => passengerresistdeploymenterrors
147
+ 6.13.3. PassengerGroup <group name> => passengergroup
140
148
 
141
- 6.14. Security options => security-options-1pb75ho
149
+ 6.13.4. PassengerDefaultUser <username> => passengerdefaultuser
142
150
 
143
- 6.14.1. PassengerUserSwitching <on|off> => passengeruserswitching
151
+ 6.13.5. PassengerDefaultGroup <group name> => passengerdefaultgroup
144
152
 
145
- 6.14.2. PassengerUser <username> => passengeruser
153
+ 6.13.6. PassengerFriendlyErrorPages <on|off> => passengerfriendlyerrorpages
146
154
 
147
- 6.14.3. PassengerGroup <group name> => passengergroup
155
+ 6.14. Resource control and optimization options => resource-control-and-optimization-options-zu2f7u
148
156
 
149
- 6.14.4. PassengerDefaultUser <username> => passengerdefaultuser
157
+ 6.14.1. PassengerMaxPoolSize <integer> => passengermaxpoolsize-integer--am64q8
150
158
 
151
- 6.14.5. PassengerDefaultGroup <group name> => passengerdefaultgroup
159
+ 6.14.2. PassengerMinInstances <integer> => passengermininstances-integer--wegq6b
152
160
 
153
- 6.14.6. PassengerFriendlyErrorPages <on|off> => passengerfriendlyerrorpages
161
+ 6.14.3. PassengerMaxInstances <integer> => passengermaxinstances
154
162
 
155
- 6.15. Resource control and optimization options => resource-control-and-optimization-options-zu2f7u
163
+ 6.14.4. PassengerMaxInstancesPerApp <integer> => passengermaxinstancesperapp
156
164
 
157
- 6.15.1. PassengerMaxPoolSize <integer> => passengermaxpoolsize-integer--am64q8
165
+ 6.14.5. PassengerPoolIdleTime <integer> => passengerpoolidletime-integer--a3gunq
158
166
 
159
- 6.15.2. PassengerMinInstances <integer> => passengermininstances-integer--wegq6b
167
+ 6.14.6. PassengerMaxPreloaderIdleTime <integer> => railsappspawneridletime-integer--1awgog1
160
168
 
161
- 6.15.3. PassengerMaxInstances <integer> => passengermaxinstances
169
+ 6.14.7. PassengerStartTimeout <seconds> => passengerstarttimeout-seconds--ihnfku
162
170
 
163
- 6.15.4. PassengerMaxInstancesPerApp <integer> => passengermaxinstancesperapp
171
+ 6.14.8. PassengerConcurrencyModel <process|thread> => passengerconcurrencymodel-process-thread--1eipofj
164
172
 
165
- 6.15.5. PassengerPoolIdleTime <integer> => passengerpoolidletime-integer--a3gunq
173
+ 6.14.9. PassengerThreadCount <number> => passengerthreadcount-number--10jl64a
166
174
 
167
- 6.15.6. PassengerMaxPreloaderIdleTime <integer> => railsappspawneridletime-integer--1awgog1
175
+ 6.14.10. PassengerMaxRequests <integer> => passengermaxrequests-integer--17qkw9n
168
176
 
169
- 6.15.7. PassengerConcurrencyModel <process|thread> => passengerconcurrencymodel-process-thread--1eipofj
177
+ 6.14.11. PassengerMaxRequestTime <seconds> => passengermaxrequesttime-seconds--127v1i2
170
178
 
171
- 6.15.8. PassengerThreadCount <number> => passengerthreadcount-number--10jl64a
179
+ 6.14.12. PassengerMemoryLimit <integer> => passengermemorylimit-integer--18irza1
172
180
 
173
- 6.15.9. PassengerMaxRequests <integer> => passengermaxrequests-integer--17qkw9n
181
+ 6.14.13. PassengerStatThrottleRate <integer> => passengerstatthrottlerate-integer--1dcfda3
174
182
 
175
- 6.15.10. PassengerMaxRequestTime <seconds> => passengermaxrequesttime-seconds--127v1i2
183
+ 6.14.14. PassengerPreStart <url> => passengerprestart-url--1utb57k
176
184
 
177
- 6.15.11. PassengerMemoryLimit <integer> => passengermemorylimit-integer--18irza1
185
+ 6.14.15. PassengerHighPerformance <on|off> => passengerhighperformance-on-off--nvfa86
178
186
 
179
- 6.15.12. PassengerStatThrottleRate <integer> => passengerstatthrottlerate-integer--1dcfda3
187
+ 6.15. Connection handling options => connection-handling-options-1k3zd1a
180
188
 
181
- 6.15.13. PassengerPreStart <url> => passengerprestart-url--1utb57k
189
+ 6.15.1. PassengerBufferResponse <on|off> => passengerbufferresponse-on-off--1y7ilka
182
190
 
183
- 6.15.14. PassengerHighPerformance <on|off> => passengerhighperformance-on-off--nvfa86
191
+ 6.15.2. passenger_max_request_queue_size <number> => passenger-max-request-queue-size-number--1f1uocd
184
192
 
185
193
  6.16. Compatibility options => compatibility-options-8jve5a
186
194
 
@@ -308,7 +316,7 @@
308
316
 
309
317
  9.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments => how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-a63b6r
310
318
 
311
- 9.8. Out-of-Band Garbage Work and Out-of-Band Garbage Collection => out-of-band-garbage-work-and-out-of-band-garbage-collection-kav2p8
319
+ 9.8. Out-of-Band Work and Out-of-Band Garbage Collection => out-of-band-work-and-out-of-band-garbage-collection-kav2p8
312
320
 
313
321
  9.9. Flying Passenger => flying-passenger-q916f7
314
322
 
@@ -320,7 +328,9 @@
320
328
 
321
329
  9.9.4. Managing the Flying Passenger daemon => managing-the-flying-passenger-daemon-1bng2bu
322
330
 
323
- 9.9.5. Caveats and limitations => caveats-and-limitations-lz3rbb
331
+ 9.9.5. Using Flying Passenger with MRI 1.8 or JRuby => using-flying-passenger-with-mri-1-8-or-jruby-f5tbvs
332
+
333
+ 9.9.6. Caveats and limitations => caveats-and-limitations-lz3rbb
324
334
 
325
335
  9.10. X-Sendfile support => x-sendfile-support-1cgyykw
326
336
 
@@ -328,11 +338,17 @@
328
338
 
329
339
  10. Under the hood => under-the-hood-21ue5t
330
340
 
331
- 10.1. Static assets serving => static-assets-serving-wo2d9v
341
+ 10.1. Page caching support => page-caching-support-kwq9b9
342
+
343
+ 10.2. Phusion Passenger and its relationship with Ruby => phusion-passenger-and-its-relationship-with-ruby-1eq08ff
344
+
345
+ 10.2.1. How Ruby is used => how-ruby-is-used-14r83nr
346
+
347
+ 10.2.2. When the system has multiple Ruby interpreters => when-the-system-has-multiple-ruby-interpreters-10tm1fq
332
348
 
333
- 10.2. Page caching support => page-caching-support-kwq9b9
349
+ 10.3. Static assets serving => static-assets-serving-wo2d9v
334
350
 
335
- 10.3. How Phusion Passenger detects whether a virtual host is a web application => how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-179mp8m
351
+ 10.4. How Phusion Passenger detects whether a virtual host is a web application => how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-179mp8m
336
352
 
337
353
  11. Appendix A: About this document => appendix-a-about-this-document-103toqs
338
354
 
@@ -506,7 +506,9 @@ The relationship between `PassengerDefaultRuby` and `PassengerRuby` is as follow
506
506
  * `PassengerRuby` may occur everywhere: in the global server configuration, in `<VirtualHost>`, in `<Directory>`, in `<Location>`, and in '.htaccess' if `AllowOverride Options` is on.
507
507
  * You don't *have* to specify `PassengerRuby`. In this case `PassengerDefaultRuby` is used as the Ruby interpreter. But if you do specify `PassengerRuby` then it will override `PassengerDefaultRuby` in that context. This allows you to use `PassengerRuby` to specify a different Ruby interpreter on a per-application basis.
508
508
 
509
- Phusion Passenger not only uses Ruby to run web apps, but also for running certain helper tools that are written in Ruby, e.g. the internal helper script used by <<PassengerPreStart,PassengerPreStart>>. These tools are always run using `PassengerDefaultRuby`, never by `PassengerRuby`. `PassengerRuby` is only used for running web apps.
509
+ Phusion Passenger not only uses Ruby to run web apps, but also for running certain helper tools that are written in Ruby, e.g. the internal helper script used by <<PassengerPreStart,PassengerPreStart>>. These tools are always run using `PassengerDefaultRuby`, never by `PassengerRuby`. `PassengerRuby` is only used for running web apps. You can learn more about the internal helper scripts in <<relationship_with_ruby,Phusion Passenger and its relationship with Ruby>>.
510
+
511
+ It is okay if `PassengerDefaultRuby` refers to a different Ruby interpreter than the one you originally installed Phusion Passenger with. This too is explained in <<relationship_with_ruby,Phusion Passenger and its relationship with Ruby>>.
510
512
 
511
513
  The reason why `PassengerDefaultRuby` exists at all is because limitations in the Apache API prevents us from implementing the same behavior using only the `PassengerRuby` directive.
512
514
 
@@ -593,12 +595,12 @@ This subsection attempts to describe spawn methods, but it's okay if you don't (
593
595
  understand it, as it's mostly a technical detail. You can basically follow this rule of thumb:
594
596
 
595
597
  ************************************************
596
- If your application works on Mongrel, but not on Phusion Passenger, then set
597
- `PassengerSpawnMethod` to 'conservative'. Otherwise, leave it at 'smart-lv2' (the default).
598
+ If your application works on Mongrel or Thin, but not on Phusion Passenger, then set
599
+ `PassengerSpawnMethod` to 'direct'. Otherwise, leave it at 'smart' (the default).
598
600
  ************************************************
599
601
 
600
- However, we do recommend you to try to understand it. The 'smart' and 'smart-lv2' spawn
601
- methods bring many benefits.
602
+ However, we do recommend you to try to understand it. The 'smart' spawn
603
+ method bring many benefits.
602
604
  =========================================================
603
605
 
604
606
  include::users_guide_snippets/passenger_spawn_method.txt[]
@@ -608,7 +610,7 @@ This option may occur in the following places:
608
610
  * In the global server configuration.
609
611
  * In a virtual host configuration block.
610
612
 
611
- In each place, it may be specified at most once. The default value is 'smart-lv2'.
613
+ In each place, it may be specified at most once. The default value is 'smart'.
612
614
 
613
615
  [[PassengerEnabled]]
614
616
  === PassengerEnabled <on|off> ===
@@ -761,84 +763,6 @@ allow the attacker to cause a Denial-of-Service.
761
763
  You can prevent this from happening by pointing PassengerRestartDir to a
762
764
  directory that's readable by Apache, but only writable by administrators.
763
765
 
764
- [[PassengerBufferResponse]]
765
- === PassengerBufferResponse <on|off> ===
766
- When turned on, application-generated responses are buffered by Apache. Buffering will
767
- happen in memory.
768
-
769
- Before we proceed with explaining this configuration option, we want to state the following to avoid confusion. If you use Phusion Passenger for Apache, there are in fact two response buffering systems active:
770
-
771
- 1. The Apache response buffering system. `PassengerBufferResponse` turns this on or off.
772
- 2. The Phusion Passenger response buffering system, a.k.a. 'real-time disk-backed response buffering'. This buffering system is always on, regardless of the value of `PassengerBufferResponse`.
773
-
774
- Response buffering is useful because it protects against slow HTTP clients that do not read responses immediately or quickly enough. Buffering prevents such slow clients from blocking web applications that have limited concurrency. Because Phusion Passenger's response buffering is always turned on, you are always protected. Therefore, `PassengerBufferResponse` is off by default, and you never should have to turn it on.
775
-
776
- If for whatever reason you want to turn Apache-level response buffering on, you can do so with this option.
777
-
778
- Apache's response buffering works differently from Phusion Passenger's. Apache's buffering system buffers the entire response before attempting to send it to the client, while Phusion Passenger's attempts to send the data to the client immediately. Therefore, if you turn on `PassengerBufferResponse`, you may interfere with applications that want to stream responses to the client.
779
- Apache's version also buffers to memory only, making it problematic for large responses. Phusion Passenger's version buffers to disk when the response exceeds a certain threshold.
780
-
781
- How does response buffering - whether it's done by Apache or by Phusion Passenger - exactly protect against slow clients?
782
- Consider an HTTP client that's on a dial-up modem link, and your
783
- application process generates a 2 MB response. If the response is buffered
784
- then your application process will be blocked until the entire 2 MB has been
785
- sent out to the HTTP client. This disallows your application process to do any useful
786
- work in the mean time. By buffering responses, Phusion Passenger or Apache will read
787
- the application response as quickly as possible and will take care of forwarding the data
788
- to slow clients.
789
-
790
- So keep in mind that enabling `passenger_buffering_response` will make streaming responses
791
- impossible. Consider for example this piece of Rails code:
792
-
793
- --------------------------------
794
- render :text => lambda { |response, output|
795
- 10.times do |i|
796
- output.write("entry #{i}\n")
797
- output.flush
798
- sleep 1
799
- end
800
- }
801
- --------------------------------
802
-
803
- ...or this piece of Rack code:
804
-
805
- --------------------------------
806
- class Response
807
- def each
808
- 10.times do |i|
809
- yield("entry #{i}\n")
810
- sleep 1
811
- end
812
- end
813
- end
814
-
815
- app = lambda do |env|
816
- [200, { "Content-Type" => "text/plain" }, Response.new]
817
- end
818
- --------------------------------
819
-
820
- When `PassengerBufferResponse` is turned on, Apache will wait until
821
- the application is done sending the entire response before forwarding it
822
- to the client. The client will not receive anything for 10 seconds,
823
- after which it receives the entire response at once.
824
- When `PassengerBufferResponse` is turned off, it works as expected: the client
825
- receives an "entry X" message every second for 10 seconds.
826
-
827
- This option may occur in the following places:
828
-
829
- * In the global server configuration.
830
- * In a virtual host configuration block.
831
- * In a `<Directory>` or `<Location>` block.
832
- * In '.htaccess'.
833
-
834
- In each place, it may be specified at most once. The default value is 'off'.
835
-
836
- [NOTE]
837
- =====================================================
838
- The <<PassengerBufferResponse,PassengerBufferResponse>> directive should be turned off
839
- if responses can be huge. Because entire responses are buffered in memory when turned on.
840
- =====================================================
841
-
842
766
  [[PassengerRollingRestarts]]
843
767
  === PassengerRollingRestarts <on|off> ===
844
768
  :version: 3.0.0
@@ -992,6 +916,7 @@ In each place, it may be specified at most once. The default value is 'on'.
992
916
 
993
917
  === Resource control and optimization options ===
994
918
 
919
+ [[PassengerMaxPoolSize]]
995
920
  ==== PassengerMaxPoolSize <integer> ====
996
921
  The maximum number of <<application_process,application processes>> that may
997
922
  simultaneously exist. A larger number results in higher memory usage,
@@ -1055,6 +980,7 @@ The PassengerMinInstances option may occur in the following places:
1055
980
 
1056
981
  In each place, it may be specified at most once. The default value is '1'.
1057
982
 
983
+ [[PassengerMaxInstances]]
1058
984
  ==== PassengerMaxInstances <integer> ====
1059
985
  :version: 3.0.0
1060
986
  include::users_guide_snippets/enterprise_only.txt[]
@@ -1184,6 +1110,21 @@ This option may occur in the following places:
1184
1110
 
1185
1111
  In each place, it may be specified at most once. The default value is '300' (5 minutes).
1186
1112
 
1113
+ ==== PassengerStartTimeout <seconds> ====
1114
+ :version: 4.0.15
1115
+ include::users_guide_snippets/since_version.txt[]
1116
+
1117
+ Specifies a timeout for the startup of application processes. If an application process fails to start within the timeout period then it will be forcefully killed with SIGKILL, and the error will be logged.
1118
+
1119
+ This option may occur in the following places:
1120
+
1121
+ * In the global server configuration.
1122
+ * In a virtual host configuration block.
1123
+ * In a `<Directory>` or `<Location>` block.
1124
+ * In '.htaccess', if `AllowOverride Limits` is on.
1125
+
1126
+ In each place, it may be specified at most once. The default value is '90'.
1127
+
1187
1128
  [[PassengerConcurrencyModel]]
1188
1129
  ==== PassengerConcurrencyModel <process|thread> ====
1189
1130
  :version: 4.0.0
@@ -1299,12 +1240,6 @@ fix the problem in your application rather than relying on these directives as a
1299
1240
  measure to avoid freezing applications.
1300
1241
  =====================================================
1301
1242
 
1302
- [NOTE]
1303
- =====================================================
1304
- This option is currently only available for Ruby apps. It is not yet available
1305
- for Python and Node.js.
1306
- =====================================================
1307
-
1308
1243
  [[PassengerMemoryLimit]]
1309
1244
  ==== PassengerMemoryLimit <integer> ====
1310
1245
  :version: 3.0.0
@@ -1650,6 +1585,105 @@ http://www.foo.com/chatroom/ajax_update_poll only.
1650
1585
  /////////////////////////////////////////
1651
1586
 
1652
1587
 
1588
+ === Connection handling options ===
1589
+
1590
+ [[PassengerBufferResponse]]
1591
+ ==== PassengerBufferResponse <on|off> ====
1592
+ When turned on, application-generated responses are buffered by Apache. Buffering will
1593
+ happen in memory.
1594
+
1595
+ Before we proceed with explaining this configuration option, we want to state the following to avoid confusion. If you use Phusion Passenger for Apache, there are in fact two response buffering systems active:
1596
+
1597
+ 1. The Apache response buffering system. `PassengerBufferResponse` turns this on or off.
1598
+ 2. The Phusion Passenger response buffering system, a.k.a. 'real-time disk-backed response buffering'. This buffering system is always on, regardless of the value of `PassengerBufferResponse`.
1599
+
1600
+ Response buffering is useful because it protects against slow HTTP clients that do not read responses immediately or quickly enough. Buffering prevents such slow clients from blocking web applications that have limited concurrency. Because Phusion Passenger's response buffering is always turned on, you are always protected. Therefore, `PassengerBufferResponse` is off by default, and you never should have to turn it on.
1601
+
1602
+ If for whatever reason you want to turn Apache-level response buffering on, you can do so with this option.
1603
+
1604
+ Apache's response buffering works differently from Phusion Passenger's. Apache's buffering system buffers the entire response before attempting to send it to the client, while Phusion Passenger's attempts to send the data to the client immediately. Therefore, if you turn on `PassengerBufferResponse`, you may interfere with applications that want to stream responses to the client.
1605
+ Apache's version also buffers to memory only, making it problematic for large responses. Phusion Passenger's version buffers to disk when the response exceeds a certain threshold.
1606
+
1607
+ How does response buffering - whether it's done by Apache or by Phusion Passenger - exactly protect against slow clients?
1608
+ Consider an HTTP client that's on a dial-up modem link, and your
1609
+ application process generates a 2 MB response. If the response is buffered
1610
+ then your application process will be blocked until the entire 2 MB has been
1611
+ sent out to the HTTP client. This disallows your application process to do any useful
1612
+ work in the mean time. By buffering responses, Phusion Passenger or Apache will read
1613
+ the application response as quickly as possible and will take care of forwarding the data
1614
+ to slow clients.
1615
+
1616
+ So keep in mind that enabling `passenger_buffering_response` will make streaming responses
1617
+ impossible. Consider for example this piece of Rails code:
1618
+
1619
+ --------------------------------
1620
+ render :text => lambda { |response, output|
1621
+ 10.times do |i|
1622
+ output.write("entry #{i}\n")
1623
+ output.flush
1624
+ sleep 1
1625
+ end
1626
+ }
1627
+ --------------------------------
1628
+
1629
+ ...or this piece of Rack code:
1630
+
1631
+ --------------------------------
1632
+ class Response
1633
+ def each
1634
+ 10.times do |i|
1635
+ yield("entry #{i}\n")
1636
+ sleep 1
1637
+ end
1638
+ end
1639
+ end
1640
+
1641
+ app = lambda do |env|
1642
+ [200, { "Content-Type" => "text/plain" }, Response.new]
1643
+ end
1644
+ --------------------------------
1645
+
1646
+ When `PassengerBufferResponse` is turned on, Apache will wait until
1647
+ the application is done sending the entire response before forwarding it
1648
+ to the client. The client will not receive anything for 10 seconds,
1649
+ after which it receives the entire response at once.
1650
+ When `PassengerBufferResponse` is turned off, it works as expected: the client
1651
+ receives an "entry X" message every second for 10 seconds.
1652
+
1653
+ This option may occur in the following places:
1654
+
1655
+ * In the global server configuration.
1656
+ * In a virtual host configuration block.
1657
+ * In a `<Directory>` or `<Location>` block.
1658
+ * In '.htaccess'.
1659
+
1660
+ In each place, it may be specified at most once. The default value is 'off'.
1661
+
1662
+ [NOTE]
1663
+ =====================================================
1664
+ The <<PassengerBufferResponse,PassengerBufferResponse>> directive should be turned off
1665
+ if responses can be huge. Because entire responses are buffered in memory when turned on.
1666
+ =====================================================
1667
+
1668
+ [[PassengerMaxRequestQueueSize]]
1669
+ ==== passenger_max_request_queue_size <number> ====
1670
+ :version: 4.0.15
1671
+ include::users_guide_snippets/since_version.txt[]
1672
+
1673
+ When all application processes are already handling their maximum number of concurrent requests, Phusion Passenger will queue all incoming requests. This option specifies the maximum size for that queue. If the queue is already at this specified limit, then Phusion Passenger will immediately send a "503 Service Unavailable" error to any incoming requests.
1674
+
1675
+ A value of 0 means that the queue is unbounded.
1676
+
1677
+ This option may occur in the following places:
1678
+
1679
+ * In the global server configuration.
1680
+ * In a virtual host configuration block.
1681
+ * In a `<Directory>` or `<Location>` block.
1682
+ * In '.htaccess'.
1683
+
1684
+ In each place, it may be specified at most once. The default value is '100'.
1685
+
1686
+
1653
1687
  === Compatibility options ===
1654
1688
 
1655
1689
  [[PassengerResolveSymlinksInDocumentRoot]]
@@ -2260,6 +2294,9 @@ Phusion Passenger hides a lot of complexity for the end user (i.e. the web serve
2260
2294
  system administrator), but sometimes it is desirable to know what is going on.
2261
2295
  This section describes a few things that Phusion Passenger does under the hood.
2262
2296
 
2297
+ include::users_guide_snippets/under_the_hood/page_caching_support.txt[]
2298
+ include::users_guide_snippets/under_the_hood/relationship_with_ruby.txt[]
2299
+
2263
2300
  === Static assets serving ===
2264
2301
  Phusion Passenger accelerates serving of static files. This means that, if an URI
2265
2302
  maps to a file that exists, then Phusion Passenger will let Apache serve that file
@@ -2280,9 +2317,6 @@ RewriteRule ^(.*)$ balancer://mongrel%{REQUEST_URI} [P,QSA,L]
2280
2317
  These kind of mod_rewrite rules are no longer required, and you can safely remove
2281
2318
  them.
2282
2319
 
2283
- === Page caching support ===
2284
- include::users_guide_snippets/under_the_hood/page_caching_support.txt[]
2285
-
2286
2320
  [[application_detection]]
2287
2321
  === How Phusion Passenger detects whether a virtual host is a web application ===
2288
2322
  After you've read the deployment instructions you might wonder how Phusion Passenger