passenger 5.0.7 → 5.0.8

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 (50) 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/bin/passenger-install-apache2-module +37 -5
  6. data/build/basics.rb +4 -1
  7. data/build/integration_tests.rb +6 -3
  8. data/build/packaging.rb +64 -4
  9. data/dev/ci/run_jenkins.sh +1 -7
  10. data/dev/ci/run_travis.sh +2 -34
  11. data/doc/Users guide Apache.html +184 -96
  12. data/doc/Users guide Apache.idmap.txt +9 -3
  13. data/doc/Users guide Apache.txt +11 -31
  14. data/doc/Users guide Nginx.html +192 -53
  15. data/doc/Users guide Nginx.idmap.txt +9 -3
  16. data/doc/Users guide Nginx.txt +7 -2
  17. data/doc/Users guide Standalone.html +113 -55
  18. data/doc/Users guide Standalone.idmap.txt +5 -1
  19. data/doc/users_guide_snippets/installation.txt +130 -66
  20. data/doc/users_guide_snippets/tips.txt +38 -0
  21. data/ext/apache2/Hooks.cpp +28 -2
  22. data/ext/common/AgentsStarter.h +6 -0
  23. data/ext/common/ApplicationPool2/AppTypes.h +1 -1
  24. data/ext/common/ApplicationPool2/Group.h +25 -3
  25. data/ext/common/ApplicationPool2/Options.h +1 -1
  26. data/ext/common/ApplicationPool2/Pool/GarbageCollection.h +6 -3
  27. data/ext/common/Constants.h +3 -1
  28. data/ext/common/ServerKit/http_parser.cpp +7 -1
  29. data/ext/common/agents/HelperAgent/Main.cpp +53 -0
  30. data/ext/common/agents/HelperAgent/RequestHandler.h +4 -0
  31. data/ext/common/agents/HelperAgent/RequestHandler/ForwardResponse.cpp +6 -0
  32. data/ext/nginx/ngx_http_passenger_module.c +2 -2
  33. data/lib/phusion_passenger.rb +15 -2
  34. data/lib/phusion_passenger/admin_tools/instance_registry.rb +40 -27
  35. data/lib/phusion_passenger/config/install_agent_command.rb +4 -0
  36. data/lib/phusion_passenger/config/install_standalone_runtime_command.rb +6 -0
  37. data/lib/phusion_passenger/config/installation_utils.rb +8 -2
  38. data/lib/phusion_passenger/config/nginx_engine_compiler.rb +16 -7
  39. data/lib/phusion_passenger/config/validate_install_command.rb +87 -11
  40. data/lib/phusion_passenger/constants.rb +2 -0
  41. data/lib/phusion_passenger/platform_info/apache.rb +114 -33
  42. data/lib/phusion_passenger/platform_info/apache_detector.rb +28 -4
  43. data/lib/phusion_passenger/platform_info/compiler.rb +22 -27
  44. data/lib/phusion_passenger/standalone/start_command.rb +16 -3
  45. data/lib/phusion_passenger/standalone/start_command/builtin_engine.rb +1 -0
  46. data/resources/templates/apache2/rpm_installation_recommended.txt.erb +19 -0
  47. data/resources/templates/standalone/config.erb +3 -2
  48. metadata +3 -3
  49. metadata.gz.asc +7 -7
  50. data/dev/ci/run_rpm_tests.sh +0 -80
@@ -30,7 +30,11 @@
30
30
 
31
31
  2.3.2. Installing packages => installing-packages-1jxn722
32
32
 
33
- 2.4. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux => installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1y5ie8b
33
+ 2.4. Installing or upgrading on Red Hat or CentOS => installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1y5ie8b
34
+
35
+ 2.4.1. Adding our YUM repository => adding-our-yum-repository-1fb671i
36
+
37
+ 2.4.2. Installing packages => installing-packages-12a3uty
34
38
 
35
39
  2.5. Installing or upgrading on Heroku => installing-or-upgrading-on-heroku-o0o2mk
36
40
 
@@ -282,7 +286,7 @@
282
286
 
283
287
  8.6. Static assets such as images and stylesheets aren’t being displayed => static-assets-such-as-images-and-stylesheets-aren-t-being-displayed-uaptpi
284
288
 
285
- 8.7. The Apache error log says that the spawn manager script does not exist, or that it does not have permission to execute it => the-apache-error-log-says-that-the-spawn-manager-script-does-not-exist-or-that-it-does-not-have-permission-to-execute-it-1fmoozk
289
+ 8.7. Apache cannot access my app’s files because of SELinux errors => apache-cannot-access-my-app-s-files-because-of-selinux-errors-6febhd
286
290
 
287
291
  8.8. The application thinks its not on SSL even though it is => the-application-thinks-its-not-on-ssl-even-though-it-is-u9fcp1
288
292
 
@@ -324,7 +328,9 @@
324
328
 
325
329
  10.1.3. Caveats & troubleshooting => caveats-troubleshooting-161hgge
326
330
 
327
- 10.1.4. Finding out what user an application is running as => finding-out-what-user-an-application-is-running-as-7uwrol
331
+ 10.1.4. Red Hat and CentOS caveats => red-hat-and-centos-caveats-1335bpz
332
+
333
+ 10.1.5. Finding out what user an application is running as => finding-out-what-user-an-application-is-running-as-7uwrol
328
334
 
329
335
  10.2. Copy-on-write memory support (reducing memory consumption of Ruby applications) => reducing-memory-consumption-of-ruby-on-rails-applications-by-33--1ubxnq0
330
336
 
@@ -1002,6 +1002,8 @@ Whether to enable <<user_switching,user switching support>>.
1002
1002
  This option may only occur once, in the global server configuration.
1003
1003
  The default value is 'on'.
1004
1004
 
1005
+ WARNING: If you're on Red Hat or CentOS, be sure to read <<user_switching_rpm_caveats,the Red Hat and CentOS user switching caveats>>.
1006
+
1005
1007
  [[PassengerUser]]
1006
1008
  ==== PassengerUser <username> ====
1007
1009
  If <<user_switching,user switching support>> is enabled, then Phusion Passenger will
@@ -2146,10 +2148,10 @@ This option is also useful if Apache is not allowed to write to the system's tem
2146
2148
 
2147
2149
  The instance directory is automatically removed when Apache shuts down.
2148
2150
 
2149
- This option may be specified once, in the global server configuration. The default value is the value of the `$TMPDIR` environment variable. Or, if `$TMPDIR` is not set, `/tmp`.
2151
+ This option may be specified once, in the global server configuration. The default value is as follows:
2150
2152
 
2151
- :option: `--instance-registry-dir`
2152
- include::users_guide_snippets/alternative_for_flying_passenger.txt[]
2153
+ * If you are on Red Hat and CentOS, and installed Passenger through the RPMs provided by Phusion, then the default value is `/var/run/passenger-instreg`.
2154
+ * Otherwise, the default value is the value of the `$TMPDIR` environment variable. Or, if `$TMPDIR` is not set, `/tmp`.
2153
2155
 
2154
2156
  .Note regarding command line tools
2155
2157
  Some Phusion Passenger command line administration tools, such as `passenger-status`, must know what Phusion Passenger's instance registry directory is in order to function properly. You can pass the directory through the `PASSENGER_INSTANCE_REGISTRY_DIR` or the `TMPDIR` environment variable.
@@ -2281,41 +2283,19 @@ See also link:http://groups.google.com/group/phusion-passenger/browse_thread/thr
2281
2283
  Please make sure that the Rails application's folder, as well as all of its parent folders,
2282
2284
  have the correct permissions and/or ownerships.
2283
2285
 
2284
- === The Apache error log says that the spawn manager script does not exist, or that it does not have permission to execute it
2286
+ [[apache_selinux_permissions]]
2287
+ === Apache cannot access my app's files because of SELinux errors
2285
2288
 
2286
- If you are sure that the 'PassengerRoot' configuration option is set correctly,
2287
- then this problem is most likely caused by the fact that you're running Apache
2288
- with SELinux. On Fedora, CentOS and RedHat Enterprise Linux, Apache is locked
2289
- down by SELinux policies.
2289
+ On Red Hat Enterprise Linux and CentOS, Apache is locked down by a security mechanism called SELinux. This security mechanism works on top of normal Unix permissions. In order for Apache to be able to access your app's files, you must set the proper SELinux labels on your files.
2290
2290
 
2291
- To solve this problem, you must set some permissions on the Phusion Passenger files
2292
- and folders, so that Apache can access them.
2291
+ First, ensure that your app does not live in a home directory. It is not possible to allow Apache to read files from your home directory.
2293
2292
 
2294
- - If you've installed Phusion Passenger via a gem, then run this command to determine
2295
- Phusion Passenger's root folder:
2296
- +
2297
- ------------------------------------------------------------------
2298
- passenger-config --root
2299
- ------------------------------------------------------------------
2300
- +
2301
- Next, run the following command:
2302
- +
2303
- ------------------------------------------------------------------
2304
- chcon -R -h -t httpd_sys_content_t /path-to-passenger-root
2305
- ------------------------------------------------------------------
2306
- +
2307
- where '/path-to-passenger-root' should be replaced with whatever
2308
- `passenger-config --root` printed.
2293
+ Second, give your app's files the `httpd_sys_content_t` labels by running the following command:
2309
2294
 
2310
- - If you've installed Phusion Passenger via the source tarball, then run the following
2311
- command:
2312
- +
2313
2295
  ------------------------------------------------------------------
2314
- chcon -R -h -t httpd_sys_content_t /path/to/passenger/folder
2296
+ sudo chcon -R -h -t httpd_sys_content_t /path-to-your-app
2315
2297
  ------------------------------------------------------------------
2316
2298
 
2317
- Once the permissions are fixed, restart Apache.
2318
-
2319
2299
  === The application thinks its not on SSL even though it is
2320
2300
 
2321
2301
  Rails and many other frameworks infers whether it's running on SSL through the CGI
@@ -1114,7 +1114,9 @@ using the command line.</p></div>
1114
1114
  <div class="foo toclevel4"><a href="#install_add_apt_repo">2.3.1. Adding our APT repository</a></div>
1115
1115
  <div class="foo toclevel4"><a href="#_installing_packages">2.3.2. Installing packages</a></div>
1116
1116
  <div class="foo toclevel4"><a href="#inserting_passenger_root_for_apt">2.3.3. Inserting passenger_root into nginx.conf</a></div>
1117
- <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>
1117
+ <div class="foo toclevel3"><a href="#installing_or_upgrading_on_red_hat">2.4. Installing or upgrading on Red Hat or CentOS</a></div>
1118
+ <div class="foo toclevel4"><a href="#install_add_yum_repo">2.4.1. Adding our YUM repository</a></div>
1119
+ <div class="foo toclevel4"><a href="#_installing_packages_2">2.4.2. Installing packages</a></div>
1118
1120
  <div class="foo toclevel3"><a href="#_installing_or_upgrading_on_heroku">2.5. Installing or upgrading on Heroku</a></div>
1119
1121
  <div class="foo toclevel3"><a href="#rubygems_generic_install">2.6. Generic installation, upgrade and downgrade method: via RubyGems</a></div>
1120
1122
  <div class="foo toclevel3"><a href="#tarball_generic_install">2.7. Generic installation, upgrade and downgrade method: via tarball</a></div>
@@ -1219,7 +1221,7 @@ using the command line.</p></div>
1219
1221
  <div class="foo toclevel4"><a href="#PassengerResponseBufferHighWatermark">7.6.13. passenger_response_buffer_high_watermark &lt;bytes&gt;</a></div>
1220
1222
  <div class="foo toclevel4"><a href="#_passenger_buffer_size">7.6.14. passenger_buffer_size</a></div>
1221
1223
  <div class="foo toclevel4"><a href="#_passenger_buffers">7.6.15. passenger_buffers</a></div>
1222
- <div class="foo toclevel4"><a href="#_passenger_busy_buffer_size">7.6.16. passenger_busy_buffer_size</a></div>
1224
+ <div class="foo toclevel4"><a href="#_passenger_busy_buffers_size">7.6.16. passenger_busy_buffers_size</a></div>
1223
1225
  <div class="foo toclevel3"><a href="#_logging_and_debugging_options">7.7. Logging and debugging options</a></div>
1224
1226
  <div class="foo toclevel4"><a href="#PassengerLogLevel">7.7.1. passenger_log_level &lt;integer&gt;</a></div>
1225
1227
  <div class="foo toclevel4"><a href="#PassengerLogFile">7.7.2. passenger_log_file &lt;filename&gt;</a></div>
@@ -1253,7 +1255,8 @@ using the command line.</p></div>
1253
1255
  <div class="foo toclevel4"><a href="#_requirements">10.1.1. Requirements</a></div>
1254
1256
  <div class="foo toclevel4"><a href="#_effects">10.1.2. Effects</a></div>
1255
1257
  <div class="foo toclevel4"><a href="#_caveats_amp_troubleshooting">10.1.3. Caveats &amp; troubleshooting</a></div>
1256
- <div class="foo toclevel4"><a href="#finding_out_app_user">10.1.4. Finding out what user an application is running as</a></div>
1258
+ <div class="foo toclevel4"><a href="#user_switching_rpm_caveats">10.1.4. Red Hat and CentOS caveats</a></div>
1259
+ <div class="foo toclevel4"><a href="#finding_out_app_user">10.1.5. Finding out what user an application is running as</a></div>
1257
1260
  <div class="foo toclevel3"><a href="#reducing_memory_usage">10.2. Copy-on-write memory support (reducing memory consumption of Ruby applications)</a></div>
1258
1261
  <div class="foo toclevel3"><a href="#tuning_sse_websockets">10.3. Tuning for Server Sent Events and WebSockets</a></div>
1259
1262
  <div class="foo toclevel3"><a href="#bundler_support">10.4. Bundler support</a></div>
@@ -1589,12 +1592,14 @@ by Lorenzo Bettini
1589
1592
  http://www.lorenzobettini.it
1590
1593
  http://www.gnu.org/software/src-highlite -->
1591
1594
  <pre><tt><span style="font-style: italic"><span style="color: #9A1900">##### !!!! Only add ONE of these lines, not all of them !!!! #####</span></span>
1595
+ <span style="font-style: italic"><span style="color: #9A1900"># Ubuntu 15.04</span></span>
1596
+ deb https<span style="color: #990000">:</span>//oss-binaries<span style="color: #990000">.</span>phusionpassenger<span style="color: #990000">.</span>com/apt/passenger vivid main
1592
1597
  <span style="font-style: italic"><span style="color: #9A1900"># Ubuntu 14.04</span></span>
1593
1598
  deb https<span style="color: #990000">:</span>//oss-binaries<span style="color: #990000">.</span>phusionpassenger<span style="color: #990000">.</span>com/apt/passenger trusty main
1594
1599
  <span style="font-style: italic"><span style="color: #9A1900"># Ubuntu 12.04</span></span>
1595
1600
  deb https<span style="color: #990000">:</span>//oss-binaries<span style="color: #990000">.</span>phusionpassenger<span style="color: #990000">.</span>com/apt/passenger precise main
1596
- <span style="font-style: italic"><span style="color: #9A1900"># Ubuntu 10.04</span></span>
1597
- deb https<span style="color: #990000">:</span>//oss-binaries<span style="color: #990000">.</span>phusionpassenger<span style="color: #990000">.</span>com/apt/passenger lucid main
1601
+ <span style="font-style: italic"><span style="color: #9A1900"># Debian 8</span></span>
1602
+ deb https<span style="color: #990000">:</span>//oss-binaries<span style="color: #990000">.</span>phusionpassenger<span style="color: #990000">.</span>com/apt/passenger jessie main
1598
1603
  <span style="font-style: italic"><span style="color: #9A1900"># Debian 7</span></span>
1599
1604
  deb https<span style="color: #990000">:</span>//oss-binaries<span style="color: #990000">.</span>phusionpassenger<span style="color: #990000">.</span>com/apt/passenger wheezy main
1600
1605
  <span style="font-style: italic"><span style="color: #9A1900"># Debian 6</span></span>
@@ -1613,12 +1618,14 @@ by Lorenzo Bettini
1613
1618
  http://www.lorenzobettini.it
1614
1619
  http://www.gnu.org/software/src-highlite -->
1615
1620
  <pre><tt><span style="font-style: italic"><span style="color: #9A1900">##### !!!! Only add ONE of these lines, not all of them !!!! #####</span></span>
1621
+ <span style="font-style: italic"><span style="color: #9A1900"># Ubuntu 15.04</span></span>
1622
+ deb https<span style="color: #990000">:</span>//download<span style="color: #990000">:</span>YOUR_DOWNLOAD_TOKEN@www<span style="color: #990000">.</span>phusionpassenger<span style="color: #990000">.</span>com/enterprise_apt vivid main
1616
1623
  <span style="font-style: italic"><span style="color: #9A1900"># Ubuntu 14.04</span></span>
1617
1624
  deb https<span style="color: #990000">:</span>//download<span style="color: #990000">:</span>YOUR_DOWNLOAD_TOKEN@www<span style="color: #990000">.</span>phusionpassenger<span style="color: #990000">.</span>com/enterprise_apt trusty main
1618
1625
  <span style="font-style: italic"><span style="color: #9A1900"># Ubuntu 12.04</span></span>
1619
1626
  deb https<span style="color: #990000">:</span>//download<span style="color: #990000">:</span>YOUR_DOWNLOAD_TOKEN@www<span style="color: #990000">.</span>phusionpassenger<span style="color: #990000">.</span>com/enterprise_apt precise main
1620
- <span style="font-style: italic"><span style="color: #9A1900"># Ubuntu 10.04</span></span>
1621
- deb https<span style="color: #990000">:</span>//download<span style="color: #990000">:</span>YOUR_DOWNLOAD_TOKEN@www<span style="color: #990000">.</span>phusionpassenger<span style="color: #990000">.</span>com/enterprise_apt lucid main
1627
+ <span style="font-style: italic"><span style="color: #9A1900"># Debian 8</span></span>
1628
+ deb https<span style="color: #990000">:</span>//download<span style="color: #990000">:</span>YOUR_DOWNLOAD_TOKEN@www<span style="color: #990000">.</span>phusionpassenger<span style="color: #990000">.</span>com/enterprise_apt jessie main
1622
1629
  <span style="font-style: italic"><span style="color: #9A1900"># Debian 7</span></span>
1623
1630
  deb https<span style="color: #990000">:</span>//download<span style="color: #990000">:</span>YOUR_DOWNLOAD_TOKEN@www<span style="color: #990000">.</span>phusionpassenger<span style="color: #990000">.</span>com/enterprise_apt wheezy main
1624
1631
  <span style="font-style: italic"><span style="color: #9A1900"># Debian 6</span></span>
@@ -1786,83 +1793,167 @@ http {
1786
1793
  </div>
1787
1794
  </div>
1788
1795
  <div class="sect2">
1789
- <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_red_hat_fedora_centos_or_scientificlinux"></span><h3 data-comment-topic="installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1uus5a1" data-anchor="_installing_or_upgrading_on_red_hat_fedora_centos_or_scientificlinux">2.4. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux</h3>
1790
- <div class="admonitionblock">
1791
- <table><tr>
1792
- <td class="icon">
1793
- <img src="./images/icons/warning.png" alt="Warning">
1794
- </td>
1795
- <td class="content">The RPMs are currently unmaintained. As such, the repository only contains Phusion Passenger 3.x (the latest version is 4.x), which did not support Node.js, Meteor, multiple Rubies, etc. For more recent versions of Phusion Passenger, you are suggested to install from gem or tarball instead.</td>
1796
- </tr></table>
1797
- </div>
1798
- <div class="paragraph"><p>YUM repositories with RPMs are maintained by <a href="https://github.com/erikogan/passenger">Erik Ogan</a> and <a href="http://stealthymonkeys.com/">Stealthy Monkeys Consulting</a>. Only packages for the open source version of Phusion Passenger are provided. <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customers should use the <a href="#rubygems_generic_install">generic RubyGems installation method</a> or <a href="#tarball_generic_install">the generic tarball installation method</a> instead.</p></div>
1799
- <div class="paragraph"><p>If you use YUM to install Phusion Passenger then you do not need to run <span class="monospaced">passenger-install-apache2-module</span> or <span class="monospaced">passenger-install-nginx-module</span>. The YUM packages contain all the binaries that you need. You also don’t need to modify any Apache or Nginx configuration to get them to load Phusion Passenger, the packages provide configuration snippets for you as well.</p></div>
1800
- <span class="anchor_helper" id="_step_1_import_the_stealthy_monkeys_consulting_8217_s_gpg_key"></span><h4 class="float" data-anchor="_step_1_import_the_stealthy_monkeys_consulting_8217_s_gpg_key">Step 1: Import the Stealthy Monkeys Consulting’s GPG key</h4>
1796
+ <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_red_hat"></span><h3 data-comment-topic="installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1uus5a1" data-anchor="installing_or_upgrading_on_red_hat">2.4. Installing or upgrading on Red Hat or CentOS</h3>
1797
+ <div class="paragraph"><p>We provide an official Phusion Passenger YUM repository with packages for Red Hat Enterprise Linux and CentOS. These packages are automatically built by our build server after we push out a source release, and thus are always up to date with the official source releases.</p></div>
1798
+ <div class="paragraph"><p>If you use these packages to install Phusion Passenger then you do not need to run <span class="monospaced">passenger-install-apache2-module</span> or <span class="monospaced">passenger-install-nginx-module</span>. These packages contain all the binaries that you need. These packages also come with SELinux policy modules so that Passenger works nicely with SELinux.</p></div>
1799
+ <div class="paragraph"><p>Packages are available for the x86 and x86_64 architectures. Our policy is to support all Red Hat and CentOS releases that still receive full updates by their vendors. The earliest Red Hat and CentOS version we support is version 5.</p></div>
1800
+ <div class="sect3">
1801
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="install_add_yum_repo"></span><h4 data-comment-topic="adding-our-yum-repository-2i9z9o" data-anchor="install_add_yum_repo">2.4.1. Adding our YUM repository</h4>
1802
+ <div class="olist arabic"><ol class="arabic">
1803
+ <li>
1804
+ <p>
1805
+ Install <a href="https://fedoraproject.org/wiki/EPEL">EPEL</a> and a few other prerequisites.
1806
+ </p>
1801
1807
  <div class="listingblock">
1802
1808
  <div class="content monospaced">
1803
- <pre>rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc</pre>
1809
+ <pre>sudo yum install epel-release pygpgme curl</pre>
1804
1810
  </div>
1805
1811
  </div>
1806
- <span class="anchor_helper" id="_step_2_install_the_release_package"></span><h4 class="float" data-anchor="_step_2_install_the_release_package">Step 2: Install the release package</h4>
1807
- <div class="paragraph"><p>Install the passenger-release package from the <a href="http://passenger.stealthymonkeys.com/">main repository</a>.</p></div>
1808
- <div class="paragraph"><p>Fedora Core 17:</p></div>
1812
+ </li>
1813
+ <li>
1814
+ <p>
1815
+ Download the Passenger YUM repository definition.
1816
+ </p>
1817
+ <div class="dlist"><dl>
1818
+ <dt class="hdlist1">
1819
+ <strong>Open source</strong>
1820
+ </dt>
1821
+ <dd>
1809
1822
  <div class="listingblock">
1810
1823
  <div class="content monospaced">
1811
- <pre>yum install http://passenger.stealthymonkeys.com/fedora/17/passenger-release.noarch.rpm</pre>
1824
+ <pre>sudo curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo</pre>
1812
1825
  </div>
1813
1826
  </div>
1814
- <div class="paragraph"><p>Fedora Core 16:</p></div>
1827
+ </dd>
1828
+ <dt class="hdlist1">
1829
+ <strong>Enterprise</strong>
1830
+ </dt>
1831
+ <dd>
1815
1832
  <div class="listingblock">
1816
1833
  <div class="content monospaced">
1817
- <pre>yum install http://passenger.stealthymonkeys.com/fedora/16/passenger-release.noarch.rpm</pre>
1834
+ <pre>unset HISTFILE
1835
+ sudo curl --fail -sSLo -u download:YOUR_DOWNLOAD_TOKEN /etc/yum.repos.d/passenger.repo https://www.phusionpassenger.com/enterprise_yum/el-passenger-enterprise.repo</pre>
1818
1836
  </div>
1819
1837
  </div>
1820
- <div class="paragraph"><p>Fedora Core 15:</p></div>
1838
+ <div class="paragraph"><p>The <span class="monospaced">unset HISTFILE</span> command ensures that your download token isn’t saved to the Bash history file.</p></div>
1839
+ <div class="paragraph"><p>You can find the correct value for <em>YOUR_DOWNLOAD_TOKEN</em> in the <a href="https://www.phusionpassenger.com/orders">Customer Area</a>.</p></div>
1840
+ </dd>
1841
+ </dl></div>
1842
+ </li>
1843
+ <li>
1844
+ <p>
1845
+ Secure <span class="monospaced">passenger.repo</span>:
1846
+ </p>
1821
1847
  <div class="listingblock">
1822
1848
  <div class="content monospaced">
1823
- <pre>yum install http://passenger.stealthymonkeys.com/fedora/15/passenger-release.noarch.rpm</pre>
1849
+ <pre>sudo chown root: /etc/yum.repos.d/passenger.repo
1850
+ sudo chmod 600 /etc/yum.repos.d/passenger.repo</pre>
1824
1851
  </div>
1825
1852
  </div>
1826
- <div class="paragraph"><p>Fedora Core 14:</p></div>
1827
- <div class="listingblock">
1828
- <div class="content monospaced">
1829
- <pre>yum install http://passenger.stealthymonkeys.com/fedora/14/passenger-release.noarch.rpm</pre>
1830
- </div>
1853
+ </li>
1854
+ </ol></div>
1831
1855
  </div>
1832
- <div class="paragraph"><p>RHEL 6 / CentOS 6 / ScientificLinux 6: (Note: these packages depend on <a href="http://fedoraproject.org/wiki/EPEL">EPEL</a>.)</p></div>
1833
- <div class="listingblock">
1834
- <div class="content monospaced">
1835
- <pre>yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm</pre>
1836
- </div>
1856
+ <div class="sect3">
1857
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_packages_2"></span><h4 data-comment-topic="installing-packages-1actlet" data-anchor="_installing_packages_2">2.4.2. Installing packages</h4>
1858
+ <div class="admonitionblock">
1859
+ <table><tr>
1860
+ <td class="icon">
1861
+ <img src="./images/icons/note.png" alt="Note">
1862
+ </td>
1863
+ <td class="content">
1864
+ <div class="title">Notes about SELinux on Red Hat 6 and CentOS 6</div>
1865
+ <div class="paragraph"><p>If you are on Red Hat 6 or CentOS 6, and you are also using SELinux in enforcing mode, then Passenger requires kernel &gt;= 2.6.39.</p></div>
1866
+ <div class="paragraph"><p>If you want to install Passenger on Red Hat 6 or CentOS 6, without upgrading your kernel, then you must <strong>disable</strong> SELinux completely. Edit <span class="monospaced">/etc/selinux/config</span>, set <span class="monospaced">SELINUX=disabled</span> and reboot. Note that merely setting SELinux to permissive mode is not enough.</p></div>
1867
+ <div class="paragraph"><p>This issue does not apply to Red Hat &gt;= 7 and CentOS &gt;= 7, because these OS versions supply recent enough kernel versions.</p></div>
1868
+ </td>
1869
+ </tr></table>
1837
1870
  </div>
1838
- <div class="paragraph"><p>RHEL 5 / CentOS 5 / ScientificLinux 5: (Note: these packages depend on <a href="http://fedoraproject.org/wiki/EPEL">EPEL</a>.)</p></div>
1871
+ <div class="paragraph"><p>You can install the Passenger packages as follows.</p></div>
1872
+ <div class="dlist"><dl>
1873
+ <dt class="hdlist1">
1874
+ <strong>Open source</strong>
1875
+ </dt>
1876
+ <dd>
1877
+ <div class="olist arabic"><ol class="arabic">
1878
+ <li>
1879
+ <p>
1880
+ <a href="#install_add_yum_repo">Add our YUM repository.</a>
1881
+ </p>
1882
+ </li>
1883
+ <li>
1884
+ <p>
1885
+ Install the packages:
1886
+ </p>
1839
1887
  <div class="listingblock">
1840
1888
  <div class="content monospaced">
1841
- <pre>rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm</pre>
1889
+ <pre>sudo yum install nginx passenger</pre>
1842
1890
  </div>
1843
1891
  </div>
1844
- <span class="anchor_helper" id="_step_3_install_the_right_phusion_passenger_package"></span><h4 class="float" data-anchor="_step_3_install_the_right_phusion_passenger_package">Step 3: Install the right Phusion Passenger package</h4>
1845
- <div class="paragraph"><p>From there you can use <a href="http://prefetch.net/articles/yum.html">YUM</a> to install packages. For example, try one of these:</p></div>
1846
- <div class="paragraph"><p>Phusion Passenger for Apache:</p></div>
1892
+ </li>
1893
+ <li>
1894
+ <p>
1895
+ Edit <span class="monospaced">/etc/nginx/conf.d/passenger.conf</span> and uncomment <span class="monospaced">passenger_root</span>, <span class="monospaced">passenger_ruby</span> and <span class="monospaced">passenger_instance_registry_dir</span>.
1896
+ </p>
1897
+ <div class="paragraph"><p>Especially <a href="#PassengerRoot">passenger_root</a> is important: Phusion Passenger won’t work without it!</p></div>
1898
+ </li>
1899
+ <li>
1900
+ <p>
1901
+ Restart Nginx:
1902
+ </p>
1847
1903
  <div class="listingblock">
1848
1904
  <div class="content monospaced">
1849
- <pre>yum install mod_passenger</pre>
1905
+ <pre>sudo service nginx restart</pre>
1850
1906
  </div>
1851
1907
  </div>
1852
- <div class="paragraph"><p>Phusion Passenger for Nginx:</p></div>
1908
+ </li>
1909
+ </ol></div>
1910
+ </dd>
1911
+ <dt class="hdlist1">
1912
+ <strong>Enterprise</strong>
1913
+ </dt>
1914
+ <dd>
1915
+ <div class="olist arabic"><ol class="arabic">
1916
+ <li>
1917
+ <p>
1918
+ Download your license key from the <a href="https://www.phusionpassenger.com/orders">Customer Area</a> and save it as <span class="monospaced">/etc/passenger-enterprise-license</span>.
1919
+ </p>
1920
+ </li>
1921
+ <li>
1922
+ <p>
1923
+ <a href="#install_add_yum_repo">Add our YUM repository.</a>
1924
+ </p>
1925
+ </li>
1926
+ <li>
1927
+ <p>
1928
+ Install the packages:
1929
+ </p>
1853
1930
  <div class="listingblock">
1854
1931
  <div class="content monospaced">
1855
- <pre>yum install nginx-passenger</pre>
1932
+ <pre>sudo yum install nginx passenger-enterprise</pre>
1856
1933
  </div>
1857
1934
  </div>
1858
- <div class="paragraph"><p>Phusion Passenger Standalone:</p></div>
1935
+ </li>
1936
+ <li>
1937
+ <p>
1938
+ Edit <span class="monospaced">/etc/nginx/conf.d/passenger.conf</span> and uncomment <span class="monospaced">passenger_root</span>, <span class="monospaced">passenger_ruby</span> and <span class="monospaced">passenger_instance_registry_dir</span>.
1939
+ </p>
1940
+ <div class="paragraph"><p>Especially <a href="#PassengerRoot">passenger_root</a> is important: Phusion Passenger won’t work without it!</p></div>
1941
+ </li>
1942
+ <li>
1943
+ <p>
1944
+ Restart Nginx:
1945
+ </p>
1859
1946
  <div class="listingblock">
1860
1947
  <div class="content monospaced">
1861
- <pre>yum install passenger-standalone</pre>
1948
+ <pre>sudo service nginx restart</pre>
1862
1949
  </div>
1863
1950
  </div>
1864
- <span class="anchor_helper" id="_building_your_own_packages"></span><h4 class="float" data-anchor="_building_your_own_packages">Building your own packages</h4>
1865
- <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>
1951
+ </li>
1952
+ </ol></div>
1953
+ </dd>
1954
+ </dl></div>
1955
+ <div class="paragraph"><p>You can now proceed with a chapter for Deploying your (specific type of) application.</p></div>
1956
+ </div>
1866
1957
  </div>
1867
1958
  <div class="sect2">
1868
1959
  <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-jh07kr" data-anchor="_installing_or_upgrading_on_heroku">2.5. Installing or upgrading on Heroku</h3>
@@ -4197,6 +4288,14 @@ The default value is <em>on</em>.</p></div>
4197
4288
  <td class="content">This option has no effect when you are using <a href="#flying_passenger">Flying Passenger</a>. You can disable user switching for Flying Passenger by starting the Flying Passenger daemon as a non-root user.</td>
4198
4289
  </tr></table>
4199
4290
  </div>
4291
+ <div class="admonitionblock">
4292
+ <table><tr>
4293
+ <td class="icon">
4294
+ <img src="./images/icons/warning.png" alt="Warning">
4295
+ </td>
4296
+ <td class="content">If you’re on Red Hat or CentOS, be sure to read <a href="#user_switching_rpm_caveats">the Red Hat and CentOS user switching caveats</a>.</td>
4297
+ </tr></table>
4298
+ </div>
4200
4299
  </div>
4201
4300
  <div class="sect3">
4202
4301
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerUser"></span><h4 data-comment-topic="passenger-user-username--b06ur7" data-anchor="PassengerUser">7.4.2. passenger_user &lt;username&gt;</h4>
@@ -5634,7 +5733,7 @@ In an <em>if</em> configuration scope.
5634
5733
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_buffers"></span><h4 data-comment-topic="passenger-busy-buffers" data-anchor="_passenger_buffers">7.6.15. passenger_buffers</h4>
5635
5734
  </div>
5636
5735
  <div class="sect3">
5637
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_busy_buffer_size"></span><h4 data-comment-topic="passenger-busy-buffer-size-124sj61" data-anchor="_passenger_busy_buffer_size">7.6.16. passenger_busy_buffer_size</h4>
5736
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_busy_buffers_size"></span><h4 data-comment-topic="passenger-busy-buffer-size-124sj61" data-anchor="_passenger_busy_buffers_size">7.6.16. passenger_busy_buffers_size</h4>
5638
5737
  <div class="paragraph"><p>These options have the same effect as ngx_http_proxy_module’s similarly named options.
5639
5738
  They can be used to modify the maximum allowed HTTP header size.</p></div>
5640
5739
  </div>
@@ -5784,7 +5883,19 @@ In an <em>if</em> configuration scope.
5784
5883
  <div class="paragraph"><p>It is therefore important that, while Phusion Passenger is working, the instance directory is never removed or tampered with. However, the default path for the instance registry directory is the system’s temporary directory, and some systems may run background jobs that periodically clean this directory. If this happens, and the files inside the instance directory are removed, then it will cause Phusion Passenger to malfunction: Phusion Passenger won’t be able to communicate with its own processes, and you will see all kinds of connection errors in the log files. This malfunction can only be recovered from by restarting Nginx. You can prevent such cleaning background jobs from interfering by setting this option to a different directory.</p></div>
5785
5884
  <div class="paragraph"><p>This option is also useful if the partition that the temporary directory lives on doesn’t have enough disk space.</p></div>
5786
5885
  <div class="paragraph"><p>The instance directory is automatically removed when Nginx shuts down.</p></div>
5787
- <div class="paragraph"><p>This option may be specified once, in the <span class="monospaced">http</span> configuration block. The default value is the value of the <span class="monospaced">$TMPDIR</span> environment variable. Or, if <span class="monospaced">$TMPDIR</span> is not set, <span class="monospaced">/tmp</span>.</p></div>
5886
+ <div class="paragraph"><p>This option may be specified once, in the <span class="monospaced">http</span> configuration block. The default value is as follows:</p></div>
5887
+ <div class="ulist"><ul>
5888
+ <li>
5889
+ <p>
5890
+ If you are on Red Hat and CentOS, and installed Passenger through the RPMs provided by Phusion, then the default value is <span class="monospaced">/var/run/passenger-instreg</span>.
5891
+ </p>
5892
+ </li>
5893
+ <li>
5894
+ <p>
5895
+ Otherwise, the default value is the value of the <span class="monospaced">$TMPDIR</span> environment variable. Or, if <span class="monospaced">$TMPDIR</span> is not set, <span class="monospaced">/tmp</span>.
5896
+ </p>
5897
+ </li>
5898
+ </ul></div>
5788
5899
  <div class="admonitionblock">
5789
5900
  <table><tr>
5790
5901
  <td class="icon">
@@ -6506,7 +6617,35 @@ The application fails to start and its error message mentions the path <em>/none
6506
6617
  <div class="paragraph"><p>Whatever user your application runs as, it must have read access to the <a href="#application_root">application root</a>, and read/write access to the application’s <em>logs</em> directory.</p></div>
6507
6618
  </div>
6508
6619
  <div class="sect3">
6509
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="finding_out_app_user"></span><h4 data-comment-topic="finding-out-what-user-an-application-is-running-as-1ni7zk6" data-anchor="finding_out_app_user">10.1.4. Finding out what user an application is running as</h4>
6620
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="user_switching_rpm_caveats"></span><h4 data-comment-topic="red-hat-and-centos-caveats-ilqxyl" data-anchor="user_switching_rpm_caveats">10.1.4. Red Hat and CentOS caveats</h4>
6621
+ <div class="admonitionblock">
6622
+ <table><tr>
6623
+ <td class="icon">
6624
+ <img src="./images/icons/note.png" alt="Note">
6625
+ </td>
6626
+ <td class="content">This information only applies if you installed Passenger through the RPM packages provided by Phusion. If you did not installed Passenger through the RPM packages provided by Phusion, then you can ignore this section.</td>
6627
+ </tr></table>
6628
+ </div>
6629
+ <div class="paragraph"><p>If you installed Passenger through Phusion’s RPM packages, and you want to disable user switching, then you must also change <a href="#PassengerInstanceRegistryDir">the location of the instance registry directory</a>.</p></div>
6630
+ <div class="paragraph"><p>This is because our RPMs configure the default instance registry directory to <span class="monospaced">/var/run/passenger-instreg</span>, which is only writable by root. If you disable user switching, then the Passenger processes will run as
6631
+ <a href="#PassengerDefaultUser">passenger_default_user</a>,
6632
+ which (as long as it’s not root) won’t be able to write to that directory.</p></div>
6633
+ <div class="paragraph"><p>Note that any alternative instance registry directory must have the proper SELinux context, allowing the web server to read and write to it. We recommend that you create a directory <span class="monospaced">/var/lib/passenger-instreg</span> and give it the label <span class="monospaced">var_run_t</span>:</p></div>
6634
+ <div class="listingblock">
6635
+ <div class="content monospaced">
6636
+ <pre>sudo mkdir /var/lib/passenger-instreg
6637
+ sudo chcon -t var_run_t /var/lib/passenger-instreg</pre>
6638
+ </div>
6639
+ </div>
6640
+ <div class="paragraph"><p>Then, in your Nginx config file:</p></div>
6641
+ <div class="listingblock">
6642
+ <div class="content monospaced">
6643
+ <pre>passenger_instance_registry_dir /var/lib/passenger-instreg;</pre>
6644
+ </div>
6645
+ </div>
6646
+ </div>
6647
+ <div class="sect3">
6648
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="finding_out_app_user"></span><h4 data-comment-topic="finding-out-what-user-an-application-is-running-as-1ni7zk6" data-anchor="finding_out_app_user">10.1.5. Finding out what user an application is running as</h4>
6510
6649
  <div class="paragraph"><p>To find our what user an application is started as, first access its URL in your browser so that Phusion Passenger starts the application. For example:</p></div>
6511
6650
  <div class="listingblock">
6512
6651
  <div class="content monospaced">