passenger 5.0.5 → 5.0.6

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 (36) hide show
  1. checksums.yaml +8 -8
  2. checksums.yaml.gz.asc +7 -7
  3. data.tar.gz.asc +7 -7
  4. data/CHANGELOG +17 -0
  5. data/build/test_basics.rb +2 -2
  6. data/doc/Users guide Apache.html +47 -42
  7. data/doc/Users guide Apache.idmap.txt +23 -21
  8. data/doc/Users guide Nginx.html +47 -42
  9. data/doc/Users guide Nginx.idmap.txt +23 -21
  10. data/doc/Users guide Standalone.html +39 -34
  11. data/doc/Users guide Standalone.idmap.txt +19 -17
  12. data/doc/users_guide_snippets/installation.txt +5 -0
  13. data/ext/apache2/Configuration.hpp +0 -12
  14. data/ext/apache2/Hooks.cpp +31 -35
  15. data/ext/common/AgentsStarter.h +24 -19
  16. data/ext/common/BackgroundEventLoop.cpp +1 -0
  17. data/ext/common/Constants.h +1 -1
  18. data/ext/common/MemoryKit/mbuf.cpp +4 -0
  19. data/ext/common/ResourceLocator.h +1 -1
  20. data/ext/common/ServerKit/Context.h +20 -0
  21. data/ext/common/ServerKit/HeaderTable.h +12 -4
  22. data/ext/common/ServerKit/HttpHeaderParser.h +2 -2
  23. data/ext/common/agents/HelperAgent/RequestHandler.h +2 -0
  24. data/ext/common/agents/HelperAgent/RequestHandler/BufferBody.cpp +4 -2
  25. data/ext/common/agents/HelperAgent/RequestHandler/Client.h +3 -1
  26. data/ext/common/agents/HelperAgent/RequestHandler/ForwardResponse.cpp +7 -0
  27. data/ext/common/agents/HelperAgent/RequestHandler/Hooks.cpp +5 -0
  28. data/ext/common/agents/HelperAgent/RequestHandler/SendRequest.cpp +34 -1
  29. data/ext/common/agents/HelperAgent/ResponseCache.h +14 -2
  30. data/ext/common/agents/Watchdog/HelperAgentWatcher.cpp +2 -2
  31. data/lib/phusion_passenger.rb +1 -1
  32. data/lib/phusion_passenger/config/admin_command_command.rb +52 -12
  33. data/lib/phusion_passenger/config/utils.rb +1 -1
  34. data/lib/phusion_passenger/standalone/start_command.rb +8 -3
  35. metadata +2 -2
  36. metadata.gz.asc +7 -7
@@ -34,47 +34,49 @@
34
34
 
35
35
  2.4. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux => installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1uus5a1
36
36
 
37
- 2.5. Generic installation, upgrade and downgrade method: via RubyGems => generic-installation-upgrade-and-downgrade-method-via-rubygems-76uol7
37
+ 2.5. Installing or upgrading on Heroku => installing-or-upgrading-on-heroku-jh07kr
38
38
 
39
- 2.6. Generic installation, upgrade and downgrade method: via tarball => generic-installation-upgrade-and-downgrade-method-via-tarball-2gkx43
39
+ 2.6. Generic installation, upgrade and downgrade method: via RubyGems => generic-installation-upgrade-and-downgrade-method-via-rubygems-76uol7
40
40
 
41
- 2.7. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-1a58c2b
41
+ 2.7. Generic installation, upgrade and downgrade method: via tarball => generic-installation-upgrade-and-downgrade-method-via-tarball-2gkx43
42
42
 
43
- 2.8. Cryptographic verification of installation files => cryptographic-verification-of-installation-files-2goray
43
+ 2.8. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-1a58c2b
44
44
 
45
- 2.8.1. Synopsis => synopsis-4fv6zw
45
+ 2.9. Cryptographic verification of installation files => cryptographic-verification-of-installation-files-2goray
46
46
 
47
- 2.8.2. Importing the Phusion Software Signing key => importing-the-phusion-software-signing-key-1qfpaj4
47
+ 2.9.1. Synopsis => synopsis-4fv6zw
48
48
 
49
- 2.8.3. Verifying the Phusion Software Signing key => verifying-the-phusion-software-signing-key-i7f1vj
49
+ 2.9.2. Importing the Phusion Software Signing key => importing-the-phusion-software-signing-key-1qfpaj4
50
50
 
51
- 2.8.4. Verifying the gem and tarball => verifying-the-gem-and-tarball-dr9466
51
+ 2.9.3. Verifying the Phusion Software Signing key => verifying-the-phusion-software-signing-key-i7f1vj
52
52
 
53
- 2.8.5. Verifying Git signatures => verifying-git-signatures-dyo4fk
53
+ 2.9.4. Verifying the gem and tarball => verifying-the-gem-and-tarball-dr9466
54
54
 
55
- 2.8.6. Verifying DEB and RPM packages => verifying-deb-and-rpm-packages-1ed36d5
55
+ 2.9.5. Verifying Git signatures => verifying-git-signatures-dyo4fk
56
56
 
57
- 2.8.7. Revocation => revocation-xwvhea
57
+ 2.9.6. Verifying DEB and RPM packages => verifying-deb-and-rpm-packages-1ed36d5
58
58
 
59
- 2.9. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-834ymv
59
+ 2.9.7. Revocation => revocation-xwvhea
60
60
 
61
- 2.10. Customizing the compilation process => customizing-the-compilation-process-u4cdcf
61
+ 2.10. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-834ymv
62
62
 
63
- 2.10.1. Setting the compiler => setting-the-compiler-1l6dpe1
63
+ 2.11. Customizing the compilation process => customizing-the-compilation-process-u4cdcf
64
64
 
65
- 2.10.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-1jehjon
65
+ 2.11.1. Setting the compiler => setting-the-compiler-1l6dpe1
66
66
 
67
- 2.10.3. Forcing location of command line tools and dependencies => forcing-location-of-certain-command-line-tools-1j93cki
67
+ 2.11.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-1jehjon
68
68
 
69
- 2.11. Installing as a normal Nginx module without using the installer => installing-as-a-normal-nginx-module-without-using-the-installer-1kkpes5
69
+ 2.11.3. Forcing location of command line tools and dependencies => forcing-location-of-certain-command-line-tools-1j93cki
70
70
 
71
- 2.12. Creating an Nginx init script => creating-an-nginx-init-script-1kd8zg5
71
+ 2.12. Installing as a normal Nginx module without using the installer => installing-as-a-normal-nginx-module-without-using-the-installer-1kkpes5
72
72
 
73
- 2.13. Disabling without uninstalling => disabling-without-uninstalling-1t5tqan
73
+ 2.13. Creating an Nginx init script => creating-an-nginx-init-script-1kd8zg5
74
74
 
75
- 2.14. Uninstalling => uninstalling-phusion-passenger-wuycvb
75
+ 2.14. Disabling without uninstalling => disabling-without-uninstalling-1t5tqan
76
76
 
77
- 2.15. Moving to a different directory => moving-to-a-different-directory-gif3wo
77
+ 2.15. Uninstalling => uninstalling-phusion-passenger-wuycvb
78
+
79
+ 2.16. Moving to a different directory => moving-to-a-different-directory-gif3wo
78
80
 
79
81
  3. Deploying a Rack-based Ruby application => deploying-a-rack-based-ruby-application-including-rails-3--12benx3
80
82
 
@@ -1106,23 +1106,24 @@ pre {
1106
1106
  <div class="foo toclevel4"><a href="#install_add_apt_repo">2.3.1. Adding our APT repository</a></div>
1107
1107
  <div class="foo toclevel4"><a href="#_installing_packages">2.3.2. Installing packages</a></div>
1108
1108
  <div class="foo toclevel3"><a href="#_installing_or_upgrading_on_red_hat_fedora_centos_or_scientificlinux">2.4. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux</a></div>
1109
- <div class="foo toclevel3"><a href="#rubygems_generic_install">2.5. Generic installation, upgrade and downgrade method: via RubyGems</a></div>
1110
- <div class="foo toclevel3"><a href="#tarball_generic_install">2.6. Generic installation, upgrade and downgrade method: via tarball</a></div>
1111
- <div class="foo toclevel3"><a href="#_upgrading_from_open_source_to_enterprise">2.7. Upgrading from open source to Enterprise</a></div>
1112
- <div class="foo toclevel3"><a href="#_cryptographic_verification_of_installation_files">2.8. Cryptographic verification of installation files</a></div>
1113
- <div class="foo toclevel4"><a href="#_synopsis_2">2.8.1. Synopsis</a></div>
1114
- <div class="foo toclevel4"><a href="#_importing_the_phusion_software_signing_key">2.8.2. Importing the Phusion Software Signing key</a></div>
1115
- <div class="foo toclevel4"><a href="#_verifying_the_phusion_software_signing_key">2.8.3. Verifying the Phusion Software Signing key</a></div>
1116
- <div class="foo toclevel4"><a href="#_verifying_the_gem_and_tarball">2.8.4. Verifying the gem and tarball</a></div>
1117
- <div class="foo toclevel4"><a href="#_verifying_git_signatures">2.8.5. Verifying Git signatures</a></div>
1118
- <div class="foo toclevel4"><a href="#_verifying_deb_and_rpm_packages">2.8.6. Verifying DEB and RPM packages</a></div>
1119
- <div class="foo toclevel4"><a href="#_revocation">2.8.7. Revocation</a></div>
1120
- <div class="foo toclevel3"><a href="#_customizing_the_compilation_process">2.9. Customizing the compilation process</a></div>
1121
- <div class="foo toclevel4"><a href="#_setting_the_compiler">2.9.1. Setting the compiler</a></div>
1122
- <div class="foo toclevel4"><a href="#_adding_additional_compiler_or_linker_flags">2.9.2. Adding additional compiler or linker flags</a></div>
1123
- <div class="foo toclevel4"><a href="#forcing_location_of_command_line_tools_and_dependencies">2.9.3. Forcing location of command line tools and dependencies</a></div>
1124
- <div class="foo toclevel3"><a href="#uninstalling">2.10. Uninstalling</a></div>
1125
- <div class="foo toclevel3"><a href="#moving_phusion_passenger">2.11. Moving to a different directory</a></div>
1109
+ <div class="foo toclevel3"><a href="#_installing_or_upgrading_on_heroku">2.5. Installing or upgrading on Heroku</a></div>
1110
+ <div class="foo toclevel3"><a href="#rubygems_generic_install">2.6. Generic installation, upgrade and downgrade method: via RubyGems</a></div>
1111
+ <div class="foo toclevel3"><a href="#tarball_generic_install">2.7. Generic installation, upgrade and downgrade method: via tarball</a></div>
1112
+ <div class="foo toclevel3"><a href="#_upgrading_from_open_source_to_enterprise">2.8. Upgrading from open source to Enterprise</a></div>
1113
+ <div class="foo toclevel3"><a href="#_cryptographic_verification_of_installation_files">2.9. Cryptographic verification of installation files</a></div>
1114
+ <div class="foo toclevel4"><a href="#_synopsis_2">2.9.1. Synopsis</a></div>
1115
+ <div class="foo toclevel4"><a href="#_importing_the_phusion_software_signing_key">2.9.2. Importing the Phusion Software Signing key</a></div>
1116
+ <div class="foo toclevel4"><a href="#_verifying_the_phusion_software_signing_key">2.9.3. Verifying the Phusion Software Signing key</a></div>
1117
+ <div class="foo toclevel4"><a href="#_verifying_the_gem_and_tarball">2.9.4. Verifying the gem and tarball</a></div>
1118
+ <div class="foo toclevel4"><a href="#_verifying_git_signatures">2.9.5. Verifying Git signatures</a></div>
1119
+ <div class="foo toclevel4"><a href="#_verifying_deb_and_rpm_packages">2.9.6. Verifying DEB and RPM packages</a></div>
1120
+ <div class="foo toclevel4"><a href="#_revocation">2.9.7. Revocation</a></div>
1121
+ <div class="foo toclevel3"><a href="#_customizing_the_compilation_process">2.10. Customizing the compilation process</a></div>
1122
+ <div class="foo toclevel4"><a href="#_setting_the_compiler">2.10.1. Setting the compiler</a></div>
1123
+ <div class="foo toclevel4"><a href="#_adding_additional_compiler_or_linker_flags">2.10.2. Adding additional compiler or linker flags</a></div>
1124
+ <div class="foo toclevel4"><a href="#forcing_location_of_command_line_tools_and_dependencies">2.10.3. Forcing location of command line tools and dependencies</a></div>
1125
+ <div class="foo toclevel3"><a href="#uninstalling">2.11. Uninstalling</a></div>
1126
+ <div class="foo toclevel3"><a href="#moving_phusion_passenger">2.12. Moving to a different directory</a></div>
1126
1127
  <div class="foo toclevel2"><a href="#_usage">3. Usage</a></div>
1127
1128
  <div class="foo toclevel2"><a href="#_configuration">4. Configuration</a></div>
1128
1129
  <div class="foo toclevel3"><a href="#_command_line_options">4.1. Command line options</a></div>
@@ -1603,7 +1604,11 @@ Install the packages:
1603
1604
  <div class="paragraph"><p>There are instructions for building your own packages and Yum repositories in the <a href="https://github.com/phusion/passenger/tree/master/rpm#readme">rpm directory ReadMe</a> within the <a href="https://github.com/phusion/passenger">GitHub repository</a>.</p></div>
1604
1605
  </div>
1605
1606
  <div class="sect2">
1606
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="rubygems_generic_install"></span><h3 data-comment-topic="generic-installation-upgrade-and-downgrade-method-via-rubygems-1229ugi" data-anchor="rubygems_generic_install">2.5. Generic installation, upgrade and downgrade method: via RubyGems</h3>
1607
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_or_upgrading_on_heroku"></span><h3 data-comment-topic="installing-or-upgrading-on-heroku-rspclc" data-anchor="_installing_or_upgrading_on_heroku">2.5. Installing or upgrading on Heroku</h3>
1608
+ <div class="paragraph"><p>Please refer to our <a href="https://github.com/phusion/passenger-ruby-heroku-demo#readme">Heroku Ruby demo</a> for installation and upgrade instructions for Heroku.</p></div>
1609
+ </div>
1610
+ <div class="sect2">
1611
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="rubygems_generic_install"></span><h3 data-comment-topic="generic-installation-upgrade-and-downgrade-method-via-rubygems-1229ugi" data-anchor="rubygems_generic_install">2.6. Generic installation, upgrade and downgrade method: via RubyGems</h3>
1607
1612
  <div class="paragraph"><p>RubyGems is only used as a method to obtain the Phusion Passenger files, so in case you have multiple Ruby versions it does not matter which Ruby’s RubyGems you use for installation. Once installed, Phusion Passenger can work with all other Ruby versions on your system. This is explained in <a href="#relationship_with_ruby">Phusion Passenger and its relationship with Ruby</a>.</p></div>
1608
1613
  <span class="anchor_helper" id="is_ruby_home_or_system_wide_installed"></span><h4 class="float" data-anchor="is_ruby_home_or_system_wide_installed">Step 1: figuring out whether your Ruby is installed in the home directory or system-wide</h4>
1609
1614
  <div class="paragraph"><p>Ruby may either be installed in the home directory, or system-wide. If it’s installed system-wide then we will want to install gems system-wide as well, so you need to switch to a root prompt first. If Ruby is installed in the home directory then we will want to install gems to the home directory as well, as a normal user.</p></div>
@@ -1717,7 +1722,7 @@ First, download the <strong>license key</strong> from the <a href="https://www.p
1717
1722
  </dl></div>
1718
1723
  </div>
1719
1724
  <div class="sect2">
1720
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="tarball_generic_install"></span><h3 data-comment-topic="generic-installation-upgrade-and-downgrade-method-via-tarball-1rwvasy" data-anchor="tarball_generic_install">2.6. Generic installation, upgrade and downgrade method: via tarball</h3>
1725
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="tarball_generic_install"></span><h3 data-comment-topic="generic-installation-upgrade-and-downgrade-method-via-tarball-1rwvasy" data-anchor="tarball_generic_install">2.7. Generic installation, upgrade and downgrade method: via tarball</h3>
1721
1726
  <span class="anchor_helper" id="_step_1_installing_ruby"></span><h4 class="float" data-anchor="_step_1_installing_ruby">Step 1: installing Ruby</h4>
1722
1727
  <div class="paragraph"><p>Phusion Passenger supports multiple languages and its core is written in C++, but its installer and administration tools are written in Ruby, so you must install Ruby.</p></div>
1723
1728
  <div class="paragraph"><p>Even though Ruby is required, Ruby will normally not be loaded during normal operation unless you deploy a Ruby web application on Phusion Passenger. Phusion Passenger’s dependency on Ruby is very minimal. See <a href="#relationship_with_ruby">Phusion Passenger and its relationship with Ruby</a> for details.</p></div>
@@ -1788,7 +1793,7 @@ cd /opt/passenger/passenger-x.x.x</pre>
1788
1793
  <div class="paragraph"><p>Finally, restart all your shell sessions in order to activate this change. The installation is now complete.</p></div>
1789
1794
  </div>
1790
1795
  <div class="sect2">
1791
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_upgrading_from_open_source_to_enterprise"></span><h3 data-comment-topic="upgrading-from-open-source-to-enterprise-1kezors" data-anchor="_upgrading_from_open_source_to_enterprise">2.7. Upgrading from open source to Enterprise</h3>
1796
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_upgrading_from_open_source_to_enterprise"></span><h3 data-comment-topic="upgrading-from-open-source-to-enterprise-1kezors" data-anchor="_upgrading_from_open_source_to_enterprise">2.8. Upgrading from open source to Enterprise</h3>
1792
1797
  <div class="paragraph"><p>Phusion Passenger comes in two variants: an open source version, as well as an <a href="https://www.phusionpassenger.com/enterprise">Enterprise version</a> which introduces a myriad of useful features that can improve stability and performance and efficiency.</p></div>
1793
1798
  <div class="paragraph"><p>Customers who have bought Phusion Passenger Enterprise can upgrade their open source installation to Enterprise as follows:</p></div>
1794
1799
  <div class="olist arabic"><ol class="arabic">
@@ -1806,13 +1811,13 @@ Install the Enterprise version by following one of the installation guides in th
1806
1811
  <div class="paragraph"><p>The uninstallation is necessary because the Enterprise Ruby gem has a different gem name (<em>passenger-enterprise-server</em> instead of <em>passenger</em>), but the same administration command names (e.g. <span class="monospaced">passenger-status</span>). Uninstalling the open source version avoids any conflicts.</p></div>
1807
1812
  </div>
1808
1813
  <div class="sect2">
1809
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_cryptographic_verification_of_installation_files"></span><h3 data-comment-topic="cryptographic-verification-of-installation-files-85nwoi" data-anchor="_cryptographic_verification_of_installation_files">2.8. Cryptographic verification of installation files</h3>
1814
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_cryptographic_verification_of_installation_files"></span><h3 data-comment-topic="cryptographic-verification-of-installation-files-85nwoi" data-anchor="_cryptographic_verification_of_installation_files">2.9. Cryptographic verification of installation files</h3>
1810
1815
  <div class="sect3">
1811
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_synopsis_2"></span><h4 data-comment-topic="synopsis-1ij8j9r" data-anchor="_synopsis_2">2.8.1. Synopsis</h4>
1816
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_synopsis_2"></span><h4 data-comment-topic="synopsis-1ij8j9r" data-anchor="_synopsis_2">2.9.1. Synopsis</h4>
1812
1817
  <div class="paragraph"><p>We digitally sign various files with our GPG key so that you can check whether they’re legit, i.e. whether they really came from Phusion and haven’t been tampered with by a third party. We apply signing since the open source version 4.0.0 RC 4, or the Enterprise version 4.0.0 RC 1.</p></div>
1813
1818
  </div>
1814
1819
  <div class="sect3">
1815
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_importing_the_phusion_software_signing_key"></span><h4 data-comment-topic="importing-the-phusion-software-signing-key-1u5hkcr" data-anchor="_importing_the_phusion_software_signing_key">2.8.2. Importing the Phusion Software Signing key</h4>
1820
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_importing_the_phusion_software_signing_key"></span><h4 data-comment-topic="importing-the-phusion-software-signing-key-1u5hkcr" data-anchor="_importing_the_phusion_software_signing_key">2.9.2. Importing the Phusion Software Signing key</h4>
1816
1821
  <div class="paragraph"><p>Phusion’s GPG key for signing software is as follows:</p></div>
1817
1822
  <div class="literalblock">
1818
1823
  <div class="content monospaced">
@@ -1834,7 +1839,7 @@ gpg --keyserver keyserver.ubuntu.com --search-keys 0x2AC745A50A212A8C</pre>
1834
1839
  <div class="paragraph"><p>The email address <a href="mailto:software-signing@phusion.nl">software-signing@phusion.nl</a> redirects to <a href="mailto:info@phusion.nl">info@phusion.nl</a> so it’s safe to send email there.</p></div>
1835
1840
  </div>
1836
1841
  <div class="sect3">
1837
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_the_phusion_software_signing_key"></span><h4 data-comment-topic="verifying-the-phusion-software-signing-key-qor1n1" data-anchor="_verifying_the_phusion_software_signing_key">2.8.3. Verifying the Phusion Software Signing key</h4>
1842
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_the_phusion_software_signing_key"></span><h4 data-comment-topic="verifying-the-phusion-software-signing-key-qor1n1" data-anchor="_verifying_the_phusion_software_signing_key">2.9.3. Verifying the Phusion Software Signing key</h4>
1838
1843
  <div class="paragraph"><p>The Phusion Software Signing key is also <strong>signed by the Phusion founders</strong>. Their keys are as follows:</p></div>
1839
1844
  <div class="literalblock">
1840
1845
  <div class="content monospaced">
@@ -1864,7 +1869,7 @@ gpg --keyserver keyserver.ubuntu.com --search-keys 0xAE405F7869481265</pre>
1864
1869
  </div>
1865
1870
  </div>
1866
1871
  <div class="sect3">
1867
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_the_gem_and_tarball"></span><h4 data-comment-topic="verifying-the-gem-and-tarball-i7tj7a" data-anchor="_verifying_the_gem_and_tarball">2.8.4. Verifying the gem and tarball</h4>
1872
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_the_gem_and_tarball"></span><h4 data-comment-topic="verifying-the-gem-and-tarball-i7tj7a" data-anchor="_verifying_the_gem_and_tarball">2.9.4. Verifying the gem and tarball</h4>
1868
1873
  <div class="paragraph"><p>You can find the open source version’s gem and tarball GPG signatures at <a href="https://www.phusionpassenger.com/file_releases">https://www.phusionpassenger.com/file_releases</a>. The Enterprise version’s GPG signatures can be found in the <a href="https://www.phusionpassenger.com/orders">Customer Area</a>. All signatures have the <em>.asc</em> extension. Once you have imported our key, you can verify the validity of a file against its signature as follows:</p></div>
1869
1874
  <div class="listingblock">
1870
1875
  <div class="content monospaced">
@@ -1875,7 +1880,7 @@ gpg: Good signature from "Phusion Software Signing &lt;software-signing@phusion.
1875
1880
  </div>
1876
1881
  </div>
1877
1882
  <div class="sect3">
1878
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_git_signatures"></span><h4 data-comment-topic="verifying-git-signatures-dltpan" data-anchor="_verifying_git_signatures">2.8.5. Verifying Git signatures</h4>
1883
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_git_signatures"></span><h4 data-comment-topic="verifying-git-signatures-dltpan" data-anchor="_verifying_git_signatures">2.9.5. Verifying Git signatures</h4>
1879
1884
  <div class="paragraph"><p>Tags in the <a href="https://github.com/phusion/passenger">Git repository for the open source version</a> are also tagged. You can verify a Git tag as follows:</p></div>
1880
1885
  <div class="listingblock">
1881
1886
  <div class="content monospaced">
@@ -1892,11 +1897,11 @@ gpg: Good signature from "Phusion Software Signing &lt;software-signing@phusion.
1892
1897
  </div>
1893
1898
  </div>
1894
1899
  <div class="sect3">
1895
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_deb_and_rpm_packages"></span><h4 data-comment-topic="verifying-deb-and-rpm-packages-uga0ho" data-anchor="_verifying_deb_and_rpm_packages">2.8.6. Verifying DEB and RPM packages</h4>
1900
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_deb_and_rpm_packages"></span><h4 data-comment-topic="verifying-deb-and-rpm-packages-uga0ho" data-anchor="_verifying_deb_and_rpm_packages">2.9.6. Verifying DEB and RPM packages</h4>
1896
1901
  <div class="paragraph"><p>The DEB and RPM packages are signed with the signatures of the respective packagers. They are automatically checked upon installation.</p></div>
1897
1902
  </div>
1898
1903
  <div class="sect3">
1899
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_revocation"></span><h4 data-comment-topic="revocation-ukzeg9" data-anchor="_revocation">2.8.7. Revocation</h4>
1904
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_revocation"></span><h4 data-comment-topic="revocation-ukzeg9" data-anchor="_revocation">2.9.7. Revocation</h4>
1900
1905
  <div class="paragraph"><p>In the event our key is compromised, we will revoke the key and upload the revocation information to sks-servers.net and keyserver.ubuntu.com. However your system will not know about the revocation until you update the keys from the keyservers. You should update your keys regularly (e.g. once a week) by invoking:</p></div>
1901
1906
  <div class="listingblock">
1902
1907
  <div class="content monospaced">
@@ -1914,10 +1919,10 @@ gpg --refresh-keys --keyserver keyserver.ubuntu.com</pre>
1914
1919
  </div>
1915
1920
  </div>
1916
1921
  <div class="sect2">
1917
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_customizing_the_compilation_process"></span><h3 data-comment-topic="customizing-the-compilation-process-j4xj2t" data-anchor="_customizing_the_compilation_process">2.9. Customizing the compilation process</h3>
1922
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_customizing_the_compilation_process"></span><h3 data-comment-topic="customizing-the-compilation-process-j4xj2t" data-anchor="_customizing_the_compilation_process">2.10. Customizing the compilation process</h3>
1918
1923
  <div class="paragraph"><p>The Phusion Passenger compilation process can be customized with environment variables. You can learn more about environment variables in <a href="#about_environment_variables">About environment variables</a>.</p></div>
1919
1924
  <div class="sect3">
1920
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_setting_the_compiler"></span><h4 data-comment-topic="setting-the-compiler-1fxfulc" data-anchor="_setting_the_compiler">2.9.1. Setting the compiler</h4>
1925
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_setting_the_compiler"></span><h4 data-comment-topic="setting-the-compiler-1fxfulc" data-anchor="_setting_the_compiler">2.10.1. Setting the compiler</h4>
1921
1926
  <div class="paragraph"><p>You can force the Phusion Passenger build system to use a specific C or C++ compiler by setting the <span class="monospaced">CC</span> and <span class="monospaced">CXX</span> environment variables. These may be set to any arbitrary shell commands.</p></div>
1922
1927
  <div class="paragraph"><p>For example, contributors who want to hack on Phusion Passenger may want to use Clang for faster compilation and <a href="http://ccache.samba.org/">ccache</a> for faster recompilation, and may want to enable more error-catching compilation flags:</p></div>
1923
1928
  <div class="listingblock">
@@ -1940,7 +1945,7 @@ http://www.gnu.org/software/src-highlite -->
1940
1945
  </div>
1941
1946
  </div>
1942
1947
  <div class="sect3">
1943
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_adding_additional_compiler_or_linker_flags"></span><h4 data-comment-topic="adding-additional-compiler-or-linker-flags-nxfour" data-anchor="_adding_additional_compiler_or_linker_flags">2.9.2. Adding additional compiler or linker flags</h4>
1948
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_adding_additional_compiler_or_linker_flags"></span><h4 data-comment-topic="adding-additional-compiler-or-linker-flags-nxfour" data-anchor="_adding_additional_compiler_or_linker_flags">2.10.2. Adding additional compiler or linker flags</h4>
1944
1949
  <div class="paragraph"><p>On some systems, C/C++ libraries and headers that Phusion Passenger requires may be located in a non-standard directory. You can force the Phusion Passenger build system to look in those locations by injecting compiler and linker flags using the following environment variables:</p></div>
1945
1950
  <div class="dlist"><dl>
1946
1951
  <dt class="hdlist1">
@@ -2042,7 +2047,7 @@ http://www.gnu.org/software/src-highlite -->
2042
2047
  </div>
2043
2048
  </div>
2044
2049
  <div class="sect3">
2045
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="forcing_location_of_command_line_tools_and_dependencies"></span><h4 data-comment-topic="forcing-location-of-command-line-tools-and-dependencies-xajpg1" data-anchor="forcing_location_of_command_line_tools_and_dependencies">2.9.3. Forcing location of command line tools and dependencies</h4>
2050
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="forcing_location_of_command_line_tools_and_dependencies"></span><h4 data-comment-topic="forcing-location-of-command-line-tools-and-dependencies-xajpg1" data-anchor="forcing_location_of_command_line_tools_and_dependencies">2.10.3. Forcing location of command line tools and dependencies</h4>
2046
2051
  <div class="paragraph"><p>The Phusion Passenger build system attempts to autodetect many things by locating relevant helper tools. For example, to find out which compiler flags it should use for compiling Apache modules, it locates the <span class="monospaced">apxs2</span> command and queries it. To find out which compiler flags it should use for libcurl, it queries the <span class="monospaced">curl-config</span> command. These commands may not be in <span class="monospaced">$PATH</span>, or even when they are you may want to use a different one.</p></div>
2047
2052
  <div class="paragraph"><p>You can force the build to find certain command line tools at certain locations by using the following environment variables:</p></div>
2048
2053
  <div class="dlist"><dl>
@@ -2124,7 +2129,7 @@ http://www.gnu.org/software/src-highlite -->
2124
2129
  </div>
2125
2130
  </div>
2126
2131
  <div class="sect2">
2127
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="uninstalling"></span><h3 data-comment-topic="uninstalling-3hpprb" data-anchor="uninstalling">2.10. Uninstalling</h3>
2132
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="uninstalling"></span><h3 data-comment-topic="uninstalling-3hpprb" data-anchor="uninstalling">2.11. Uninstalling</h3>
2128
2133
  <div class="ulist"><ul>
2129
2134
  <li>
2130
2135
  <p>
@@ -2152,7 +2157,7 @@ If you installed Phusion Passenger through APT or YUM, then use them to uninstal
2152
2157
  </ul></div>
2153
2158
  </div>
2154
2159
  <div class="sect2">
2155
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="moving_phusion_passenger"></span><h3 data-comment-topic="moving-to-a-different-directory-b3lpy1" data-anchor="moving_phusion_passenger">2.11. Moving to a different directory</h3>
2160
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="moving_phusion_passenger"></span><h3 data-comment-topic="moving-to-a-different-directory-b3lpy1" data-anchor="moving_phusion_passenger">2.12. Moving to a different directory</h3>
2156
2161
  <div class="paragraph"><p>If you installed Phusion Passenger through a tarball then you can move the Phusion Passenger directory to another location. This is not possible if you used any of the other installation methods.</p></div>
2157
2162
  <div class="paragraph"><p>First, move the directory to whereever you like:</p></div>
2158
2163
  <div class="listingblock">
@@ -32,39 +32,41 @@
32
32
 
33
33
  2.4. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux => installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-16cek45
34
34
 
35
- 2.5. Generic installation, upgrade and downgrade method: via RubyGems => generic-installation-upgrade-and-downgrade-method-via-rubygems-1229ugi
35
+ 2.5. Installing or upgrading on Heroku => installing-or-upgrading-on-heroku-rspclc
36
36
 
37
- 2.6. Generic installation, upgrade and downgrade method: via tarball => generic-installation-upgrade-and-downgrade-method-via-tarball-1rwvasy
37
+ 2.6. Generic installation, upgrade and downgrade method: via RubyGems => generic-installation-upgrade-and-downgrade-method-via-rubygems-1229ugi
38
38
 
39
- 2.7. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-1kezors
39
+ 2.7. Generic installation, upgrade and downgrade method: via tarball => generic-installation-upgrade-and-downgrade-method-via-tarball-1rwvasy
40
40
 
41
- 2.8. Cryptographic verification of installation files => cryptographic-verification-of-installation-files-85nwoi
41
+ 2.8. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-1kezors
42
42
 
43
- 2.8.1. Synopsis => synopsis-1ij8j9r
43
+ 2.9. Cryptographic verification of installation files => cryptographic-verification-of-installation-files-85nwoi
44
44
 
45
- 2.8.2. Importing the Phusion Software Signing key => importing-the-phusion-software-signing-key-1u5hkcr
45
+ 2.9.1. Synopsis => synopsis-1ij8j9r
46
46
 
47
- 2.8.3. Verifying the Phusion Software Signing key => verifying-the-phusion-software-signing-key-qor1n1
47
+ 2.9.2. Importing the Phusion Software Signing key => importing-the-phusion-software-signing-key-1u5hkcr
48
48
 
49
- 2.8.4. Verifying the gem and tarball => verifying-the-gem-and-tarball-i7tj7a
49
+ 2.9.3. Verifying the Phusion Software Signing key => verifying-the-phusion-software-signing-key-qor1n1
50
50
 
51
- 2.8.5. Verifying Git signatures => verifying-git-signatures-dltpan
51
+ 2.9.4. Verifying the gem and tarball => verifying-the-gem-and-tarball-i7tj7a
52
52
 
53
- 2.8.6. Verifying DEB and RPM packages => verifying-deb-and-rpm-packages-uga0ho
53
+ 2.9.5. Verifying Git signatures => verifying-git-signatures-dltpan
54
54
 
55
- 2.8.7. Revocation => revocation-ukzeg9
55
+ 2.9.6. Verifying DEB and RPM packages => verifying-deb-and-rpm-packages-uga0ho
56
56
 
57
- 2.9. Customizing the compilation process => customizing-the-compilation-process-j4xj2t
57
+ 2.9.7. Revocation => revocation-ukzeg9
58
58
 
59
- 2.9.1. Setting the compiler => setting-the-compiler-1fxfulc
59
+ 2.10. Customizing the compilation process => customizing-the-compilation-process-j4xj2t
60
60
 
61
- 2.9.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-nxfour
61
+ 2.10.1. Setting the compiler => setting-the-compiler-1fxfulc
62
62
 
63
- 2.9.3. Forcing location of command line tools and dependencies => forcing-location-of-command-line-tools-and-dependencies-xajpg1
63
+ 2.10.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-nxfour
64
64
 
65
- 2.10. Uninstalling => uninstalling-3hpprb
65
+ 2.10.3. Forcing location of command line tools and dependencies => forcing-location-of-command-line-tools-and-dependencies-xajpg1
66
66
 
67
- 2.11. Moving to a different directory => moving-to-a-different-directory-b3lpy1
67
+ 2.11. Uninstalling => uninstalling-3hpprb
68
+
69
+ 2.12. Moving to a different directory => moving-to-a-different-directory-b3lpy1
68
70
 
69
71
  3. Usage => usage-1eyt33o
70
72
 
@@ -322,6 +322,11 @@ yum install passenger-standalone
322
322
  There are instructions for building your own packages and Yum repositories in the link:https://github.com/phusion/passenger/tree/master/rpm#readme[rpm directory ReadMe] within the link:https://github.com/phusion/passenger[GitHub repository].
323
323
 
324
324
 
325
+ === Installing or upgrading on Heroku
326
+
327
+ Please refer to our link:https://github.com/phusion/passenger-ruby-heroku-demo#readme[Heroku Ruby demo] for installation and upgrade instructions for Heroku.
328
+
329
+
325
330
  [[rubygems_generic_install]]
326
331
  === Generic installation, upgrade and downgrade method: via RubyGems
327
332
 
@@ -92,9 +92,6 @@ struct DirConfig {
92
92
 
93
93
  vector<string> unionStationFilters;
94
94
 
95
- char *envvarsCache;
96
- unsigned int envvarsCacheSize;
97
-
98
95
  /**
99
96
  * Whether analytics logging should be enabled.
100
97
  */
@@ -108,15 +105,6 @@ struct DirConfig {
108
105
  /*************************************/
109
106
  /*************************************/
110
107
 
111
- DirConfig() {
112
- envvarsCache = NULL;
113
- envvarsCacheSize = 0;
114
- }
115
-
116
- ~DirConfig() {
117
- free(envvarsCache);
118
- }
119
-
120
108
  bool isEnabled() const {
121
109
  return enabled != DISABLED;
122
110
  }
@@ -944,47 +944,43 @@ private:
944
944
 
945
945
  // Add environment variables.
946
946
 
947
- if (config->envvarsCache == NULL) {
948
- const apr_array_header_t *env_arr;
949
- env_arr = apr_table_elts(r->subprocess_env);
950
-
951
- if (env_arr->nelts > 0) {
952
- apr_table_entry_t *env;
953
- string envvarsData;
954
- size_t len;
955
-
956
- env = (apr_table_entry_t*) env_arr->elts;
957
-
958
- for (i = 0; i < env_arr->nelts; ++i) {
959
- envvarsData.append(env[i].key);
960
- envvarsData.append("\0", 1);
961
- if (env[i].val != NULL) {
962
- envvarsData.append(env[i].val);
963
- }
964
- envvarsData.append("\0", 1);
947
+ const apr_array_header_t *env_arr;
948
+ env_arr = apr_table_elts(r->subprocess_env);
949
+
950
+ if (env_arr->nelts > 0) {
951
+ apr_table_entry_t *env;
952
+ string envvarsData;
953
+ char *envvarsBase64Data;
954
+ size_t envvarsBase64Len;
955
+
956
+ env = (apr_table_entry_t*) env_arr->elts;
957
+
958
+ for (i = 0; i < env_arr->nelts; ++i) {
959
+ envvarsData.append(env[i].key);
960
+ envvarsData.append("\0", 1);
961
+ if (env[i].val != NULL) {
962
+ envvarsData.append(env[i].val);
965
963
  }
964
+ envvarsData.append("\0", 1);
965
+ }
966
966
 
967
- config->envvarsCache = (char *) malloc(modp_b64_encode_len(
968
- envvarsData.size()));
969
- if (config->envvarsCache == NULL) {
970
- throw RuntimeException("Unable to allocate memory for base64 "
971
- "encoding of environment variables");
972
- }
973
- len = modp_b64_encode(config->envvarsCache,
974
- envvarsData.data(), envvarsData.size());
975
- if (len == (size_t) -1) {
976
- free(config->envvarsCache);
977
- config->envvarsCache = NULL;
978
- throw RuntimeException("Unable to base64 encode environment variables");
979
- }
980
- config->envvarsCacheSize = len;
967
+ envvarsBase64Data = (char *) malloc(modp_b64_encode_len(
968
+ envvarsData.size()));
969
+ if (envvarsBase64Data == NULL) {
970
+ throw RuntimeException("Unable to allocate memory for base64 "
971
+ "encoding of environment variables");
972
+ }
973
+ envvarsBase64Len = modp_b64_encode(envvarsBase64Data,
974
+ envvarsData.data(), envvarsData.size());
975
+ if (envvarsBase64Len == (size_t) -1) {
976
+ free(envvarsBase64Data);
977
+ throw RuntimeException("Unable to base64 encode environment variables");
981
978
  }
982
- }
983
979
 
984
- if (config->envvarsCache != NULL) {
985
980
  result.append("!~PASSENGER_ENV_VARS: ", sizeof("!~PASSENGER_ENV_VARS: ") - 1);
986
- result.append(config->envvarsCache, config->envvarsCacheSize);
981
+ result.append(envvarsBase64Data, envvarsBase64Len);
987
982
  result.append("\r\n", 2);
983
+ free(envvarsBase64Data);
988
984
  }
989
985
 
990
986
  // Add flags.
@@ -208,6 +208,21 @@ private:
208
208
  }
209
209
  }
210
210
 
211
+ void throwEnrichedWatchdogFailReason(string simpleReason) {
212
+ string passengerRootConfig;
213
+ string docURL;
214
+ if (type == AS_APACHE) {
215
+ passengerRootConfig = "PassengerRoot";
216
+ docURL = APACHE2_DOC_URL "#PassengerRoot";
217
+ } else {
218
+ passengerRootConfig = "passenger_root";
219
+ docURL = NGINX_DOC_URL "#PassengerRoot";
220
+ }
221
+ throw RuntimeException("Unable to start Phusion Passenger: " + simpleReason + ". This probably means that your " PROGRAM_NAME
222
+ " installation is broken or incomplete, or that your '" + passengerRootConfig + "' setting contains the wrong value."
223
+ " Please reinstall " PROGRAM_NAME " or adjust the setting (see: " + docURL + ").");
224
+ }
225
+
211
226
  static void killProcessGroupAndWait(pid_t *pid, unsigned long long timeout = 0) {
212
227
  if (*pid != -1 && (timeout == 0 || timedWaitPid(*pid, NULL, timeout) <= 0)) {
213
228
  this_thread::disable_syscall_interruption dsi;
@@ -312,7 +327,14 @@ public:
312
327
  this_thread::disable_interruption di;
313
328
  this_thread::disable_syscall_interruption dsi;
314
329
  ResourceLocator locator(passengerRoot);
315
- string agentFilename = locator.findSupportBinary(AGENT_EXE);
330
+
331
+ string agentFilename;
332
+ try {
333
+ agentFilename = locator.findSupportBinary(AGENT_EXE);
334
+ } catch (const Passenger::RuntimeException &e) {
335
+ string locatorError = e.what();
336
+ throwEnrichedWatchdogFailReason(locatorError);
337
+ }
316
338
  SocketPair fds;
317
339
  int e;
318
340
  pid_t pid;
@@ -468,24 +490,7 @@ public:
468
490
  killProcessGroupAndWait(&pid, 5000);
469
491
  guard.clear();
470
492
  if (e == ENOENT) {
471
- string passengerRootConfig;
472
- string docURL;
473
- if (type == AS_APACHE) {
474
- passengerRootConfig = "PassengerRoot";
475
- docURL = APACHE2_DOC_URL "#PassengerRoot";
476
- } else {
477
- passengerRootConfig = "passenger_root";
478
- docURL = NGINX_DOC_URL "#PassengerRoot";
479
- }
480
- throw RuntimeException("Unable to start the " PROGRAM_NAME " watchdog "
481
- "because its executable (" + agentFilename + ") does "
482
- "not exist. This probably means that your " PROGRAM_NAME " "
483
- "installation is broken or incomplete, or that your '" +
484
- passengerRootConfig + "' directive is set to the wrong value. "
485
- "Please reinstall " PROGRAM_NAME " or fix your '" +
486
- passengerRootConfig + "' directive, whichever is applicable. "
487
- "To learn how to fix '" + passengerRootConfig + "', please read " +
488
- docURL);
493
+ throwEnrichedWatchdogFailReason("Executable " + agentFilename + " found.");
489
494
  } else {
490
495
  throw SystemException("Unable to start the " PROGRAM_NAME " watchdog (" +
491
496
  agentFilename + ")", e);