passenger 4.0.0.rc4 → 4.0.0.rc6

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 (83) hide show
  1. data.tar.gz.asc +12 -0
  2. data/.travis.yml +4 -4
  3. data/NEWS +46 -0
  4. data/bin/passenger-config +31 -1
  5. data/bin/passenger-install-apache2-module +1 -1
  6. data/bin/passenger-install-nginx-module +1 -0
  7. data/build/common_library.rb +4 -0
  8. data/build/cplusplus_support.rb +27 -6
  9. data/build/cxx_tests.rb +1 -1
  10. data/build/misc.rb +28 -6
  11. data/build/packaging.rb +72 -65
  12. data/build/test_basics.rb +1 -1
  13. data/dev/googlecode_upload.py +265 -0
  14. data/dev/run_travis.sh +9 -0
  15. data/doc/Users guide Apache.html +376 -193
  16. data/doc/Users guide Apache.idmap.txt +80 -62
  17. data/doc/Users guide Apache.txt +61 -35
  18. data/doc/Users guide Nginx.html +278 -83
  19. data/doc/Users guide Nginx.idmap.txt +26 -10
  20. data/doc/Users guide Nginx.txt +59 -31
  21. data/doc/Users guide Standalone.html +1 -1
  22. data/doc/users_guide_snippets/installation.txt +121 -11
  23. data/doc/users_guide_snippets/rvm_helper_tool.txt +56 -0
  24. data/ext/apache2/Bucket.cpp +1 -1
  25. data/ext/apache2/Configuration.cpp +7 -1
  26. data/ext/apache2/Configuration.hpp +4 -0
  27. data/ext/apache2/Hooks.cpp +2 -2
  28. data/ext/common/AgentsStarter.cpp +2 -2
  29. data/ext/common/AgentsStarter.h +1 -1
  30. data/ext/common/AgentsStarter.hpp +2 -2
  31. data/ext/common/ApplicationPool2/DirectSpawner.h +4 -8
  32. data/ext/common/ApplicationPool2/Group.h +17 -11
  33. data/ext/common/ApplicationPool2/Implementation.cpp +39 -11
  34. data/ext/common/ApplicationPool2/Pool.h +23 -4
  35. data/ext/common/ApplicationPool2/Process.h +30 -11
  36. data/ext/common/ApplicationPool2/SmartSpawner.h +3 -1
  37. data/ext/common/Constants.h +1 -1
  38. data/ext/common/EventedBufferedInput.h +4 -0
  39. data/ext/common/Utils.cpp +21 -3
  40. data/ext/common/Utils.h +8 -1
  41. data/ext/common/Utils/HttpHeaderBufferer.h +1 -1
  42. data/ext/common/Utils/IOUtils.cpp +5 -4
  43. data/ext/common/Utils/IOUtils.h +32 -14
  44. data/ext/common/Utils/MessagePassing.h +2 -2
  45. data/ext/common/Utils/ProcessMetricsCollector.h +47 -15
  46. data/ext/common/Utils/ScopeGuard.h +20 -3
  47. data/ext/common/Utils/StrIntUtils.h +14 -5
  48. data/ext/common/agents/Base.cpp +161 -50
  49. data/ext/common/agents/HelperAgent/AgentOptions.h +2 -2
  50. data/ext/common/agents/HelperAgent/Main.cpp +1 -0
  51. data/ext/common/agents/HelperAgent/RequestHandler.h +166 -52
  52. data/ext/common/agents/LoggingAgent/Main.cpp +1 -1
  53. data/ext/common/agents/Watchdog/Main.cpp +2 -2
  54. data/ext/nginx/Configuration.c +31 -4
  55. data/ext/nginx/Configuration.h +1 -0
  56. data/ext/nginx/ContentHandler.c +148 -34
  57. data/ext/nginx/ngx_http_passenger_module.c +4 -1
  58. data/ext/oxt/detail/spin_lock_pthreads.hpp +4 -4
  59. data/ext/oxt/macros.hpp +30 -8
  60. data/lib/phusion_passenger.rb +2 -2
  61. data/lib/phusion_passenger/classic_rails/thread_handler_extension.rb +1 -1
  62. data/lib/phusion_passenger/native_support.rb +19 -1
  63. data/lib/phusion_passenger/platform_info/compiler.rb +6 -0
  64. data/lib/phusion_passenger/platform_info/ruby.rb +54 -5
  65. data/lib/phusion_passenger/preloader_shared_helpers.rb +8 -1
  66. data/lib/phusion_passenger/rack/out_of_band_gc.rb +3 -1
  67. data/lib/phusion_passenger/rack/thread_handler_extension.rb +32 -5
  68. data/lib/phusion_passenger/request_handler/thread_handler.rb +28 -8
  69. data/lib/phusion_passenger/ruby_core_enhancements.rb +9 -1
  70. data/lib/phusion_passenger/standalone/runtime_installer.rb +1 -0
  71. data/lib/phusion_passenger/utils/unseekable_socket.rb +50 -5
  72. data/passenger.gemspec +1 -1
  73. data/resources/templates/apache2/config_snippets.txt.erb +1 -1
  74. data/test/cxx/ApplicationPool2/PoolTest.cpp +4 -9
  75. data/test/cxx/RequestHandlerTest.cpp +5 -5
  76. data/test/ruby/classic_rails/loader_spec.rb +1 -1
  77. data/test/ruby/classic_rails/preloader_spec.rb +1 -1
  78. data/test/ruby/request_handler_spec.rb +207 -1
  79. data/test/ruby/shared/loader_sharedspec.rb +1 -0
  80. data/test/ruby/spec_helper.rb +11 -1
  81. data/test/stub/apache2/httpd.conf.erb +1 -1
  82. metadata +5 -3
  83. metadata.gz.asc +12 -0
@@ -32,25 +32,41 @@
32
32
 
33
33
  2.6. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-1a58c2b
34
34
 
35
- 2.7. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-834ymv
35
+ 2.7. Cryptographic verification of installation files => cryptographic-verification-of-installation-files-2goray
36
36
 
37
- 2.8. Customizing the compilation process => customizing-the-compilation-process-u4cdcf
37
+ 2.7.1. Synopsis => synopsis-4fv6zw
38
38
 
39
- 2.8.1. Setting the compiler => setting-the-compiler-1l6dpe1
39
+ 2.7.2. Importing the Phusion Software Signing key => importing-the-phusion-software-signing-key-1qfpaj4
40
40
 
41
- 2.8.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-1jehjon
41
+ 2.7.3. Verifying the Phusion Software Signing key => verifying-the-phusion-software-signing-key-i7f1vj
42
42
 
43
- 2.8.3. Forcing location of certain command line tools => forcing-location-of-certain-command-line-tools-1j93cki
43
+ 2.7.4. Verifying the gem and tarball => verifying-the-gem-and-tarball-dr9466
44
44
 
45
- 2.9. Installing as a normal Nginx module without using the installer => installing-as-a-normal-nginx-module-without-using-the-installer-1kkpes5
45
+ 2.7.5. Verifying Git signatures => verifying-git-signatures-dyo4fk
46
46
 
47
- 2.10. Creating an Nginx init script => creating-an-nginx-init-script-1kd8zg5
47
+ 2.7.6. Verifying DEB and RPM packages => verifying-deb-and-rpm-packages-1ed36d5
48
48
 
49
- 2.11. Disabling without uninstalling => disabling-without-uninstalling-1t5tqan
49
+ 2.7.7. Revocation => revocation-xwvhea
50
50
 
51
- 2.12. Uninstalling => uninstalling-phusion-passenger-wuycvb
51
+ 2.8. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-834ymv
52
52
 
53
- 2.13. Moving to a different directory => moving-to-a-different-directory-gif3wo
53
+ 2.9. Customizing the compilation process => customizing-the-compilation-process-u4cdcf
54
+
55
+ 2.9.1. Setting the compiler => setting-the-compiler-1l6dpe1
56
+
57
+ 2.9.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-1jehjon
58
+
59
+ 2.9.3. Forcing location of certain command line tools => forcing-location-of-certain-command-line-tools-1j93cki
60
+
61
+ 2.10. Installing as a normal Nginx module without using the installer => installing-as-a-normal-nginx-module-without-using-the-installer-1kkpes5
62
+
63
+ 2.11. Creating an Nginx init script => creating-an-nginx-init-script-1kd8zg5
64
+
65
+ 2.12. Disabling without uninstalling => disabling-without-uninstalling-1t5tqan
66
+
67
+ 2.13. Uninstalling => uninstalling-phusion-passenger-wuycvb
68
+
69
+ 2.14. Moving to a different directory => moving-to-a-different-directory-gif3wo
54
70
 
55
71
  3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3) application => deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-application-b69gqa
56
72
 
@@ -380,7 +380,7 @@ $ some_awesome_editor passenger_wsgi.py
380
380
  $ cat passenger_wsgi.py
381
381
  def application(environ, start_response):
382
382
  start_response('200 OK', [('Content-Type', 'text/plain')])
383
- return ["hello world!\n"]
383
+ return [b"hello world!\n"]
384
384
  -------------------------------------------
385
385
 
386
386
  Finally, we deploy it by adding the following configuration options to
@@ -460,36 +460,76 @@ this option as well. Please read
460
460
 
461
461
  This required option may only occur once, in the 'http' configuration block.
462
462
 
463
+ [[PassengerRuby]]
463
464
  === passenger_ruby <filename> ===
464
- This option allows one to specify the Ruby interpreter to use.
465
+ The `passenger_ruby` option allows one to specify the Ruby interpreter to use. Similarly, the `passenger_python` option is for specifying the Python interpreter.
465
466
 
466
- Since version 4.0.0, this option may occur in the following places:
467
+ In versions prior to 4.0.0, only a single Ruby version was supported for the entire Nginx instance, so `passenger_ruby` may only occur in the global server configuration. Also, the `passenger_python` option was not supported.
468
+
469
+ Since version 4.0.0, the `passenger_python` option was added. Also, Phusion Passenger supports multiple Ruby or Python interpreters in the same Nginx instance. And so, since version 4.0.0, this option may occur in the following places:
467
470
 
468
471
  * In the 'http' configuration block.
469
472
  * In a 'server' configuration block.
470
473
  * In a 'location' configuration block.
471
474
  * In an 'if' configuration scope.
472
475
 
473
- If you want to use a different Ruby interpreter for two different applications then you should define different `passenger_ruby` directives in different 'http' blocks.
476
+ The `passenger_ruby` in the `http` block - that is, the one that `passenger-install-nginx-module` outputs - is used for invoking certain Phusion Passenger tools that are written in Ruby, e.g. the internal helper script used by <<PassengerPreStart,passenger_pre_start>>. It is also used as the default Ruby interpreter for Ruby web apps. You don't *have* to specify a `passenger_ruby` in the `http` block though, because the default is to use the first `ruby` command found in `$PATH`.
474
477
 
475
- In versions prior to 4.0.0, only a single Ruby version is supported for the entire Nginx instance, so `passenger_ruby` may only occur in the 'http' configuration block.
478
+ The `passenger_python` option works in a similar manner, but applies to Python instead.
476
479
 
477
- The default value is 'ruby', meaning that the Ruby interpreter will be looked up according to the `PATH` environment variable.
480
+ You can also override `passenger_ruby` or `passenger_python` in specific contexts if you want to use a different Ruby/Python interpreter for that web app. For example:
478
481
 
479
- === passenger_python <filename> ===
480
- :version: 4.0.0
481
- include::users_guide_snippets/since_version.txt[]
482
+ ------------------------------
483
+ http {
484
+ passenger_root ...;
485
+
486
+ # Use Ruby 1.8.7 by default.
487
+ passenger_ruby /usr/bin/ruby1.8;
488
+ # Use Python 2.6 by default.
489
+ passenger_python /usr/bin/python2.6;
482
490
 
483
- This option allows one to specify the Python interpreter to use. It may occur in the following places:
491
+ server {
492
+ # This Rails web app will use Ruby 1.8.7
493
+ listen 80;
494
+ server_name www.foo.com;
495
+ root /webapps/foo/public;
496
+ }
484
497
 
485
- * In the 'http' configuration block.
486
- * In a 'server' configuration block.
487
- * In a 'location' configuration block.
488
- * In an 'if' configuration scope.
498
+ server {
499
+ # This Rails web app will use Ruby 1.9.3, as installed by RVM
500
+ passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3/ruby;
489
501
 
490
- If you want to use a different Python interpreter for two different applications then you should define different `passenger_python` directives in different 'http' blocks.
502
+ listen 80;
503
+ server_name www.bar.com;
504
+ root /webapps/bar/public;
505
+
506
+ # If you have a web app deployed in a sub-URI, customize
507
+ # passenger_ruby/passenger_python inside a `location` block.
508
+ # The web app under www.bar.com/blog will use JRuby 1.7.1
509
+ passenger_base_uri /blog;
510
+ location /blog {
511
+ passenger_ruby /usr/local/rvm/wrappers/jruby-1.7.1/ruby;
512
+ }
513
+ }
514
+
515
+ server {
516
+ # This Flask web app will use Python 3.0
517
+ passenger_python /usr/bin/python3.0;
518
+
519
+ listen 80;
520
+ server_name www.baz.com;
521
+ root /webapps/baz/public;
522
+ }
523
+ }
524
+ ------------------------------
491
525
 
492
- The default value is 'python', meaning that the Python interpreter will be looked up according to the `PATH` environment variable.
526
+ include::users_guide_snippets/rvm_helper_tool.txt[]
527
+
528
+ === passenger_python <filename> ===
529
+ :version: 4.0.0
530
+ include::users_guide_snippets/since_version.txt[]
531
+
532
+ This option allows one to specify the Python interpreter to use. See <<PassengerRuby,passenger_ruby>> for more information. The default value is 'python', meaning that the Python interpreter will be looked up according to the `PATH` environment variable.
493
533
 
494
534
  [[PassengerAppRoot]]
495
535
  === passenger_app_root <path/to/root> ===
@@ -939,27 +979,15 @@ In each place, it may be specified at most once. The default value is 'on'.
939
979
  ==== passenger_max_pool_size <integer> ====
940
980
  The maximum number of <<application_process,application processes>> that may
941
981
  simultanously exist. A larger number results in higher memory usage,
942
- but improved ability to handle concurrent HTTP clients.
982
+ but improves the ability to handle concurrent HTTP requests.
943
983
 
944
- The optimal value depends on your system's hardware and the server's average
945
- load. You should experiment with different values. But generally speaking,
946
- the value should be at least equal to the number of CPUs (or CPU cores) that
947
- you have. If your system has 2 GB of RAM, then we recommend a value of '15'.
948
- If your system is a Virtual Private Server (VPS) and has about 256 MB RAM, and
949
- is also running other services such as MySQL, then we recommend a value of '2'.
984
+ The optimal value depends on your system's hardware and your workload. You can learn more at the Phusion article link:http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/[Tuning Phusion Passenger's conurrency settings].
950
985
 
951
- If you find that your server is unable to handle the load on your Rails/Rack websites
952
- (i.e. running out of memory) then you should lower this value. (Though if your
953
- sites are really that popular, then you should strongly consider upgrading your
954
- hardware or getting more servers.)
986
+ If you find that your server is running out of memory then you should lower this value.
955
987
 
956
988
  This option may only occur once, in the 'http' configuration block.
957
989
  The default value is '6'.
958
990
 
959
- TIP: We strongly recommend you to <<reducing_memory_usage,use Ruby Enterprise
960
- Edition>>. This allows you to reduce the memory usage of your Ruby on Rails applications
961
- by about 33%, and it's not hard to install.
962
-
963
991
  [[PassengerMinInstances]]
964
992
  ==== passenger_min_instances <integer> ====
965
993
  This specifies the minimum number of application processes that should exist for a
@@ -1198,7 +1198,7 @@ use the <span class="monospaced">-p</span> option, e.g.:</p></div>
1198
1198
  <div id="footnotes"><hr></div>
1199
1199
  <div id="footer">
1200
1200
  <div id="footer-text">
1201
- Last updated 2013-03-03 11:14:55 CET
1201
+ Last updated 2013-03-06 12:16:21 CET
1202
1202
  </div>
1203
1203
  </div>
1204
1204
  <script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */
@@ -406,9 +406,26 @@ YUM repositories with RPMs are maintained by link:https://github.com/erikogan/pa
406
406
  If you use YUM to install Phusion Passenger then you do not need to run `passenger-install-apache2-module` or `passenger-install-nginx-module`. 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.
407
407
 
408
408
  [float]
409
- ==== Step 1: Install the release package
409
+ ==== Step 1: Import the Stealthy Monkeys Consulting's GPG key
410
410
 
411
- The easiest way to install Phusion Passenger and keep it up to date is to install the passenger-release package from the link:http://passenger.stealthymonkeys.com/[main repository].
411
+ ---------------------------------------------
412
+ rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc
413
+ ---------------------------------------------
414
+
415
+ [float]
416
+ ==== Step 2: Install the release package
417
+
418
+ Install the passenger-release package from the link:http://passenger.stealthymonkeys.com/[main repository].
419
+
420
+ Fedora Core 17:
421
+ ---------------------------------------------
422
+ yum install http://passenger.stealthymonkeys.com/fedora/17/passenger-release.noarch.rpm
423
+ ---------------------------------------------
424
+
425
+ Fedora Core 16:
426
+ ---------------------------------------------
427
+ yum install http://passenger.stealthymonkeys.com/fedora/16/passenger-release.noarch.rpm
428
+ ---------------------------------------------
412
429
 
413
430
  Fedora Core 15:
414
431
  ---------------------------------------------
@@ -420,18 +437,18 @@ Fedora Core 14:
420
437
  yum install http://passenger.stealthymonkeys.com/fedora/14/passenger-release.noarch.rpm
421
438
  ---------------------------------------------
422
439
 
423
- RHEL 5 / CentOS 5 / ScientificLinux 5: (Note: these packages depend on link:http://fedoraproject.org/wiki/EPEL[EPEL].)
440
+ RHEL 6 / CentOS 6 / ScientificLinux 6: (Note: these packages depend on link:http://fedoraproject.org/wiki/EPEL[EPEL].)
424
441
  ---------------------------------------------
425
- rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm
442
+ yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm
426
443
  ---------------------------------------------
427
444
 
428
- RHEL 6 / CentOS 6 / ScientificLinux 6:
445
+ RHEL 5 / CentOS 5 / ScientificLinux 5: (Note: these packages depend on link:http://fedoraproject.org/wiki/EPEL[EPEL].)
429
446
  ---------------------------------------------
430
- yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm
447
+ rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm
431
448
  ---------------------------------------------
432
449
 
433
450
  [float]
434
- ==== Step 2: Use YUM
451
+ ==== Step 3: Install the right Phusion Passenger package
435
452
 
436
453
  From there you can use link:http://prefetch.net/articles/yum.html[YUM] to install packages. For example, try one of these:
437
454
 
@@ -471,6 +488,98 @@ Customers who have bought Phusion Passenger Enterprise can upgrade their open so
471
488
  The uninstallation is necessary because the Enterprise Ruby gem has a different gem name ('passenger-enterprise-server' instead of 'passenger'), but the same administration command names (e.g. `passenger-status`). Uninstalling the open source version avoids any conflicts.
472
489
 
473
490
 
491
+ === Cryptographic verification of installation files
492
+
493
+ ==== Synopsis
494
+
495
+ 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.
496
+
497
+ ==== Importing the Phusion Software Signing key
498
+
499
+ Phusion's GPG key for signing software is as follows:
500
+
501
+ Phusion Software Signing (software-signing@phusion.nl)
502
+ Short key ID: 0x0A212A8C
503
+ Long key ID: 0x2AC745A50A212A8C
504
+ Fingerprint: D5F0 8514 2693 9232 F437 AB72 2AC7 45A5 0A21 2A8C
505
+
506
+ This key is stored at link:http://www.phusion.nl/about/gpg[the Phusion website] and at the key servers link:http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x2AC745A50A212A8C[sks-keyservers.net] and link:http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2AC745A50A212A8C[keyserver.ubuntu.com]. You can import it to your keyring with one of these command:
507
+
508
+ -------------------------------------------------------------------------
509
+ gpg --keyserver pool.sks-keyservers.net --search-keys 0x2AC745A50A212A8C
510
+ # -OR-
511
+ gpg --keyserver keyserver.ubuntu.com --search-keys 0x2AC745A50A212A8C
512
+ -------------------------------------------------------------------------
513
+
514
+ The Phusion Software Signing key is only used for signing software. It's never used for signing emails or for encrypting files, so please be suspicious if you encounter usage of this key outside the context of signing software, and alert us at support@phusion.nl. Include "notspam" in the message to bypass our spam filter.
515
+
516
+ The email address software-signing@phusion.nl redirects to info@phusion.nl so it's safe to send email there.
517
+
518
+ ==== Verifying the Phusion Software Signing key
519
+
520
+ The Phusion Software Signing key is also *signed by the Phusion founders*. Their keys are as follows:
521
+
522
+ Hongli Lai (hongli@phusion.nl)
523
+ Short key ID: 4B6F4332
524
+ Long key ID: 06A131094B6F4332
525
+ Fingerprint: 64E8 0420 FC6A 499F 9E1F 81FA 06A1 3109 4B6F 4332
526
+
527
+ Ninh Bui (ninh@phusion.nl)
528
+ Short key ID: 6FAF3782
529
+ Long key ID: BA8DA3F46FAF3782
530
+ Fingerprint: 353A 398C 49AF 5CD5 74A0 656C BA8D A3F4 6FAF 3782
531
+
532
+ Both keys are stored at both sks-servers.net and keyserver.ubuntu.com. Import them with:
533
+
534
+ ------------------------------------------
535
+ gpg --keyserver pool.sks-servers.net --search-keys 0x06A131094B6F4332
536
+ gpg --keyserver pool.sks-servers.net --search-keys 0xBA8DA3F46FAF3782
537
+ # -OR-
538
+ gpg --keyserver keyserver.ubuntu.com --search-keys 0x06A131094B6F4332
539
+ gpg --keyserver keyserver.ubuntu.com --search-keys 0xBA8DA3F46FAF3782
540
+ ------------------------------------------
541
+
542
+ ==== Verifying the gem and tarball
543
+
544
+ You can find the open source version's gem and tarball GPG signatures at https://www.phusionpassenger.com/signatures/. The Enterprise version's GPG signatures can be found in the link:https://www.phusionpassenger.com/orders[Customer Area]. All signatures have the '.asc' extension. Once you have imported our key, you can verify the validity of a file against its signature as follows:
545
+
546
+ -----------------------------------------
547
+ $ gpg --verify passenger-x.x.x.tar.gz.asc passenger-x.x.x.tar.gz
548
+ gpg: Signature made Mon Mar 11 09:45:46 2013 CET using RSA key ID 0A212A8C
549
+ gpg: Good signature from "Phusion Software Signing <software-signing@phusion.nl>"
550
+ -----------------------------------------
551
+
552
+ ==== Verifying Git signatures
553
+
554
+ Tags in the link:https://github.com/FooBarWidget/passenger[Git repository for the open source version] are also tagged. You can verify a Git tag as follows:
555
+
556
+ -------------------------------------------------------
557
+ $ git tag --verify release-x.x.x
558
+ object d886f34b5705e4314feccaf0d77b9a38416e15e0
559
+ type commit
560
+ tag release-4.0.0.rc5
561
+ tagger Hongli Lai (Phusion) <hongli@phusion.nl> 1362993117 +0100
562
+
563
+ This is a tag message.
564
+ gpg: Signature made Mon Mar 11 10:12:02 2013 CET using RSA key ID 0A212A8C
565
+ gpg: Good signature from "Phusion Software Signing <software-signing@phusion.nl>"
566
+ -------------------------------------------------------
567
+
568
+ ==== Verifying DEB and RPM packages
569
+
570
+ The DEB and RPM packages are signed with the signatures of the respective packagers. Phusion does not provide signatures for them.
571
+
572
+ ==== Revocation
573
+
574
+ 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:
575
+
576
+ -------------------------------------------------------
577
+ gpg --refresh-keys --keyserver pool.sks-servers.net
578
+ # -OR-
579
+ gpg --refresh-keys --keyserver keyserver.ubuntu.com
580
+ -------------------------------------------------------
581
+
582
+
474
583
  === Non-interactive, automatic, headless installs or upgrades
475
584
 
476
585
  ifdef::apache[]
@@ -586,7 +695,8 @@ If you installed Nginx with one of the generic installation methods then you won
586
695
 
587
696
  If you prefer to use an init script then please refer to the following resources:
588
697
 
589
- - link:http://wiki.nginx.org/Nginx-init-ubuntu[Init script for Ubuntu]
698
+ - link:http://wiki.nginx.org/Nginx-init-ubuntu[Init script for Ubuntu 8.04-9.10]
699
+ - link:http://library.linode.com/web-servers/nginx/installation/ubuntu-12.04-precise-pangolin#sph_create-an-init-script-to-manage-nginx[Init script for Ubuntu 12.04]
590
700
  - link:http://wiki.nginx.org/RedHatNginxInitScript[Init script for Red Hat, Fedora and CentOS]
591
701
 
592
702
  When using one of those init scripts, please make sure that the paths inside the init script are correct. In particular, the paths to the Nginx binary, to the PID file and to the configuration file must match the actual locations of your Nginx installation.
@@ -620,8 +730,8 @@ NameVirtualHosts *:80
620
730
 
621
731
  LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so
622
732
 
623
- PassengerRuby /usr/bin/ruby
624
733
  PassengerRoot /somewhere/passenger/x.x.x
734
+ PassengerDefaultRuby /usr/bin/ruby
625
735
  PassengerMaxPoolSize 10
626
736
 
627
737
  <VirtualHost *:80>
@@ -640,8 +750,8 @@ NameVirtualHosts *:80
640
750
 
641
751
  # LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so
642
752
 
643
- # PassengerRuby /usr/bin/ruby
644
753
  # PassengerRoot /somewhere/passenger/x.x.x
754
+ # PassengerDefaultRuby /usr/bin/ruby
645
755
  # PassengerMaxPoolSize 10
646
756
 
647
757
  <VirtualHost *:80>
@@ -715,7 +825,7 @@ done this, you need to remove the Phusion Passenger files.
715
825
  - If you installed Phusion Passenger through APT or YUM, then use them to uninstall Phusion Passenger.
716
826
 
717
827
  ifdef::nginx[]
718
- Nginx does not have to be recompiled. Altough it contains Phusion Passenger code, it will not do anything when Phusion Passenger is disabled.
828
+ Nginx does not have to be recompiled. Altough it contains Phusion Passenger code, it will not do anything when all Phusion Passenger configuration directives are removed.
719
829
  endif::[]
720
830
 
721
831
 
@@ -0,0 +1,56 @@
1
+ .RVM helper tool
2
+
3
+ Phusion Passenger provides the `passenger-config --ruby-command` tool for figuring out the correct command for invoking a specific Ruby interpreter. This is especially useful for RVM users. Suppose that you have both Ruby 1.8.7 and Ruby 1.9.3 installed through RVM, and you want to know the correct commands for each Ruby interpreter.
4
+
5
+ For this purpose we'll want to invoke `passenger-config` using its full path, because each time you `rvm use` a different Ruby interpreter, RVM changes `$PATH`. If you did not install Phusion Passenger through the generic tarball installation method, then here's how you can figure out where `passenger-config` is:
6
+
7
+ ------------------------------
8
+ $ which passenger-config
9
+ /opt/passenger/bin/passenger-config
10
+ ------------------------------
11
+
12
+ Now, switch to all the RVM Ruby interpreters you want to use. In each interpreter, invoke `passenger-config --ruby-command`. For Ruby 1.8.7:
13
+
14
+ ------------------------------
15
+ $ rvm use 1.8.7
16
+ $ /opt/passenger/bin/passenger-config --ruby-command
17
+ passenger-config was invoked through the following Ruby interpreter:
18
+ Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
19
+ Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
20
+ To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
21
+ To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
22
+ To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start
23
+
24
+ The following Ruby interpreter was found first in $PATH:
25
+ Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
26
+ Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
27
+ To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
28
+ To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
29
+ To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start
30
+
31
+ ## Notes for RVM users
32
+ Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.
33
+ ------------------------------
34
+
35
+ Then, for Ruby 1.9.3:
36
+
37
+ ------------------------------
38
+ $ rvm use 1.9.3
39
+ $ /opt/passenger/bin/passenger-config --ruby-command
40
+ passenger-config was invoked through the following Ruby interpreter:
41
+ Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
42
+ Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
43
+ To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
44
+ To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
45
+ To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start
46
+
47
+ The following Ruby interpreter was found first in $PATH:
48
+ Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
49
+ Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
50
+ To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
51
+ To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
52
+ To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start
53
+
54
+ ## Notes for RVM users
55
+ Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.
56
+ ------------------------------
@@ -83,7 +83,7 @@ bucket_read(apr_bucket *bucket, const char **str, apr_size_t *len, apr_read_type
83
83
  * non-blocking read request, we can prevent ap_content_length_filter
84
84
  * from buffering all data.
85
85
  */
86
- //return APR_EAGAIN;
86
+ return APR_EAGAIN;
87
87
  }
88
88
 
89
89
  buf = (char *) apr_bucket_alloc(APR_BUCKET_BUFF_SIZE, bucket->list);
@@ -266,6 +266,7 @@ passenger_config_merge_dir(apr_pool_t *p, void *basev, void *addv) {
266
266
  *************************************************/
267
267
 
268
268
  DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_root, root)
269
+ DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_default_ruby, defaultRuby)
269
270
  DEFINE_SERVER_INT_CONFIG_SETTER(cmd_passenger_log_level, logLevel, unsigned int, 0)
270
271
  DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_debug_log_file, debugLogFile)
271
272
  DEFINE_SERVER_INT_CONFIG_SETTER(cmd_passenger_max_pool_size, maxPoolSize, unsigned int, 1)
@@ -466,10 +467,15 @@ const command_rec passenger_commands[] = {
466
467
  NULL,
467
468
  RSRC_CONF,
468
469
  "The Passenger root folder."),
470
+ AP_INIT_TAKE1("PassengerDefaultRuby",
471
+ (Take1Func) cmd_passenger_default_ruby,
472
+ NULL,
473
+ RSRC_CONF,
474
+ "The default Ruby interpreter to use."),
469
475
  AP_INIT_TAKE1("PassengerRuby",
470
476
  (Take1Func) cmd_passenger_ruby,
471
477
  NULL,
472
- OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
478
+ OR_OPTIONS | ACCESS_CONF,
473
479
  "The Ruby interpreter to use."),
474
480
  AP_INIT_TAKE1("PassengerPython",
475
481
  (Take1Func) cmd_passenger_python,