passenger 4.0.14 → 4.0.16
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- data.tar.gz.asc +7 -7
- data/NEWS +69 -0
- data/bin/passenger-install-apache2-module +7 -1
- data/bin/passenger-install-nginx-module +18 -1
- data/build/apache2.rb +25 -1
- data/build/basics.rb +7 -4
- data/build/debian.rb +72 -25
- data/build/nginx.rb +24 -0
- data/build/packaging.rb +45 -3
- data/debian.template/{control → control.template} +17 -8
- data/debian.template/ruby-passenger.install.template +1 -0
- data/debian.template/rules.template +9 -3
- data/dev/run_travis.sh +14 -0
- data/doc/Users guide Apache.idmap.txt +64 -48
- data/doc/Users guide Apache.txt +127 -93
- data/doc/Users guide Nginx.idmap.txt +46 -28
- data/doc/Users guide Nginx.txt +100 -12
- data/doc/images/{conservative_spawning.png → direct_spawning.png} +0 -0
- data/doc/images/{conservative_spawning.svg → direct_spawning.svg} +0 -0
- data/doc/users_guide_snippets/installation.txt +107 -66
- data/doc/users_guide_snippets/passenger_spawn_method.txt +1 -1
- data/doc/users_guide_snippets/rvm_helper_tool.txt +0 -12
- data/doc/users_guide_snippets/tips.txt +70 -3
- data/doc/users_guide_snippets/under_the_hood/page_caching_support.txt +2 -0
- data/doc/users_guide_snippets/under_the_hood/relationship_with_ruby.txt +114 -0
- data/ext/apache2/Configuration.cpp +53 -101
- data/ext/apache2/Configuration.hpp +19 -41
- data/ext/apache2/ConfigurationCommands.cpp +95 -0
- data/ext/apache2/ConfigurationCommands.cpp.erb +91 -0
- data/ext/apache2/ConfigurationFields.hpp +59 -0
- data/ext/apache2/ConfigurationFields.hpp.erb +89 -0
- data/ext/apache2/ConfigurationSetters.cpp +223 -0
- data/ext/apache2/ConfigurationSetters.cpp.erb +126 -0
- data/ext/apache2/CreateDirConfig.cpp +50 -0
- data/ext/apache2/CreateDirConfig.cpp.erb +71 -0
- data/ext/apache2/Hooks.cpp +6 -0
- data/ext/apache2/MergeDirConfig.cpp +103 -0
- data/ext/apache2/MergeDirConfig.cpp.erb +81 -0
- data/ext/common/ApplicationPool2/AppTypes.cpp +2 -0
- data/ext/common/ApplicationPool2/AppTypes.h +2 -0
- data/ext/common/ApplicationPool2/Common.h +1 -1
- data/ext/common/ApplicationPool2/Group.h +56 -7
- data/ext/common/ApplicationPool2/Implementation.cpp +133 -31
- data/ext/common/ApplicationPool2/Options.h +23 -2
- data/ext/common/ApplicationPool2/Pool.h +8 -1
- data/ext/common/ApplicationPool2/Process.h +9 -0
- data/ext/common/ApplicationPool2/Session.h +1 -0
- data/ext/common/ApplicationPool2/Spawner.h +21 -19
- data/ext/common/ApplicationPool2/SuperGroup.h +1 -1
- data/ext/common/Constants.h +21 -17
- data/ext/common/Constants.h.erb +1 -1
- data/ext/common/Exceptions.h +19 -0
- data/ext/common/ServerInstanceDir.h +8 -4
- data/ext/common/Utils.cpp +33 -1
- data/ext/common/Utils.h +14 -0
- data/ext/common/Utils/StrIntUtils.cpp +16 -0
- data/ext/common/Utils/StrIntUtils.h +5 -0
- data/ext/common/agents/HelperAgent/Main.cpp +5 -5
- data/ext/common/agents/HelperAgent/RequestHandler.h +94 -45
- data/ext/common/agents/LoggingAgent/Main.cpp +10 -26
- data/ext/common/agents/Watchdog/Main.cpp +4 -15
- data/ext/nginx/CacheLocationConfig.c +501 -0
- data/ext/nginx/CacheLocationConfig.c.erb +140 -0
- data/ext/nginx/Configuration.c +29 -453
- data/ext/nginx/Configuration.h +3 -21
- data/ext/nginx/ConfigurationCommands.c +501 -0
- data/ext/nginx/ConfigurationCommands.c.erb +136 -0
- data/ext/nginx/ConfigurationFields.h +89 -0
- data/ext/nginx/ConfigurationFields.h.erb +85 -0
- data/ext/nginx/ContentHandler.c +3 -166
- data/ext/nginx/CreateLocationConfig.c +146 -0
- data/ext/nginx/CreateLocationConfig.c.erb +70 -0
- data/ext/nginx/MergeLocationConfig.c +166 -0
- data/ext/nginx/MergeLocationConfig.c.erb +72 -0
- data/ext/nginx/config +4 -0
- data/ext/oxt/detail/tracable_exception_disabled.hpp +21 -1
- data/ext/oxt/detail/tracable_exception_enabled.hpp +4 -1
- data/ext/oxt/implementation.cpp +7 -1
- data/ext/oxt/macros.hpp +9 -7
- data/helper-scripts/backtrace-sanitizer.rb +23 -0
- data/helper-scripts/classic-rails-loader.rb +23 -0
- data/helper-scripts/classic-rails-preloader.rb +23 -0
- data/helper-scripts/download_binaries/extconf.rb +10 -5
- data/helper-scripts/meteor-loader.rb +127 -0
- data/helper-scripts/node-loader.js +1 -1
- data/helper-scripts/rack-preloader.rb +23 -0
- data/helper-scripts/system-memory-stats.py +22 -0
- data/helper-scripts/touch-dir.sh +48 -0
- data/lib/phusion_passenger.rb +1 -1
- data/lib/phusion_passenger/apache2/config_options.rb +104 -0
- data/lib/phusion_passenger/constants.rb +8 -0
- data/lib/phusion_passenger/native_support.rb +9 -1
- data/lib/phusion_passenger/nginx/config_options.rb +328 -0
- data/lib/phusion_passenger/packaging.rb +2 -2
- data/lib/phusion_passenger/platform_info/apache.rb +8 -0
- data/lib/phusion_passenger/platform_info/compiler.rb +2 -2
- data/lib/phusion_passenger/rails3_extensions/init.rb +19 -4
- data/lib/phusion_passenger/ruby_core_enhancements.rb +4 -1
- data/lib/phusion_passenger/standalone/app_finder.rb +3 -2
- data/lib/phusion_passenger/standalone/command.rb +1 -0
- data/lib/phusion_passenger/standalone/runtime_installer.rb +1 -6
- data/lib/phusion_passenger/standalone/runtime_locator.rb +9 -2
- data/lib/phusion_passenger/standalone/start_command.rb +45 -9
- data/lib/phusion_passenger/utils.rb +4 -1
- data/resources/templates/{nginx → installer_common}/run_installer_as_root.txt.erb +3 -1
- data/resources/templates/nginx/nginx_module_sources_not_available.txt.erb +6 -0
- data/resources/templates/standalone/config.erb +8 -8
- data/test/cxx/ApplicationPool2/PoolTest.cpp +120 -3
- data/test/cxx/RequestHandlerTest.cpp +66 -3
- data/test/integration_tests/native_packaging_spec.rb +41 -0
- data/test/integration_tests/nginx_tests.rb +1 -0
- data/test/integration_tests/standalone_tests.rb +4 -0
- data/test/ruby/shared/rails/analytics_logging_extensions_sharedspec.rb +22 -0
- data/test/stub/rails3.0/config/initializers/passenger.rb +2 -1
- data/test/stub/rails3.1/config/initializers/passenger.rb +2 -1
- data/test/stub/rails3.2/config/initializers/passenger.rb +2 -1
- data/test/stub/rails4.0/config/initializers/passenger.rb +5 -1
- data/test/stub/wsgi/passenger_wsgi.py +5 -0
- metadata +32 -7
- metadata.gz.asc +7 -7
- data/resources/templates/apache2/run_installer_as_root.txt.erb +0 -8
@@ -30,43 +30,45 @@
|
|
30
30
|
|
31
31
|
2.5. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux => installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1uus5a1
|
32
32
|
|
33
|
-
2.6.
|
33
|
+
2.6. Installing or upgrading on Mac OS X with Homebrew => installing-or-upgrading-on-mac-os-x-with-homebrew-13ovvy9
|
34
34
|
|
35
|
-
2.7.
|
35
|
+
2.7. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-1a58c2b
|
36
36
|
|
37
|
-
2.
|
37
|
+
2.8. Cryptographic verification of installation files => cryptographic-verification-of-installation-files-2goray
|
38
38
|
|
39
|
-
2.
|
39
|
+
2.8.1. Synopsis => synopsis-4fv6zw
|
40
40
|
|
41
|
-
2.
|
41
|
+
2.8.2. Importing the Phusion Software Signing key => importing-the-phusion-software-signing-key-1qfpaj4
|
42
42
|
|
43
|
-
2.
|
43
|
+
2.8.3. Verifying the Phusion Software Signing key => verifying-the-phusion-software-signing-key-i7f1vj
|
44
44
|
|
45
|
-
2.
|
45
|
+
2.8.4. Verifying the gem and tarball => verifying-the-gem-and-tarball-dr9466
|
46
46
|
|
47
|
-
2.
|
47
|
+
2.8.5. Verifying Git signatures => verifying-git-signatures-dyo4fk
|
48
48
|
|
49
|
-
2.
|
49
|
+
2.8.6. Verifying DEB and RPM packages => verifying-deb-and-rpm-packages-1ed36d5
|
50
50
|
|
51
|
-
2.8.
|
51
|
+
2.8.7. Revocation => revocation-xwvhea
|
52
52
|
|
53
|
-
2.9.
|
53
|
+
2.9. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-834ymv
|
54
54
|
|
55
|
-
2.
|
55
|
+
2.10. Customizing the compilation process => customizing-the-compilation-process-u4cdcf
|
56
56
|
|
57
|
-
2.
|
57
|
+
2.10.1. Setting the compiler => setting-the-compiler-1l6dpe1
|
58
58
|
|
59
|
-
2.
|
59
|
+
2.10.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-1jehjon
|
60
60
|
|
61
|
-
2.10.
|
61
|
+
2.10.3. Forcing location of command line tools and dependencies => forcing-location-of-certain-command-line-tools-1j93cki
|
62
62
|
|
63
|
-
2.11.
|
63
|
+
2.11. Installing as a normal Nginx module without using the installer => installing-as-a-normal-nginx-module-without-using-the-installer-1kkpes5
|
64
64
|
|
65
|
-
2.12.
|
65
|
+
2.12. Creating an Nginx init script => creating-an-nginx-init-script-1kd8zg5
|
66
66
|
|
67
|
-
2.13.
|
67
|
+
2.13. Disabling without uninstalling => disabling-without-uninstalling-1t5tqan
|
68
68
|
|
69
|
-
2.14.
|
69
|
+
2.14. Uninstalling => uninstalling-phusion-passenger-wuycvb
|
70
|
+
|
71
|
+
2.15. Moving to a different directory => moving-to-a-different-directory-gif3wo
|
70
72
|
|
71
73
|
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
|
72
74
|
|
@@ -154,6 +156,12 @@
|
|
154
156
|
|
155
157
|
6.11.7. passenger_busy_buffer_size => passenger-busy-buffer-size-124sj61
|
156
158
|
|
159
|
+
6.11.8. passenger_intercept_errors <on|off> => passenger-intercept-errors-1uvcb9x
|
160
|
+
|
161
|
+
6.11.9. passenger_max_request_queue_size <number> => passenger-max-request-queue-size-number--i0te1b
|
162
|
+
|
163
|
+
6.11.10. passenger_request_queue_overflow_status_code <code> => passenger-request-queue-overflow-status-code-code--1wcwuxl
|
164
|
+
|
157
165
|
6.12. Security options => security-options-1bv93g4
|
158
166
|
|
159
167
|
6.12.1. passenger_user_switching <on|off> => passenger-user-switching-on-off--1p37u3l
|
@@ -184,17 +192,19 @@
|
|
184
192
|
|
185
193
|
6.13.6. passenger_max_preloader_idle_time <integer> => rails-app-spawner-idle-time-integer--1xjqe4b
|
186
194
|
|
187
|
-
6.13.7.
|
195
|
+
6.13.7. passenger_start_timeout <seconds> => passenger-start-timeout-seconds--8xn504
|
196
|
+
|
197
|
+
6.13.8. passenger_concurrency_model <process|thread> => passenger-concurrency-model-process-thread--brcvkk
|
188
198
|
|
189
|
-
6.13.
|
199
|
+
6.13.9. passenger_thread_count <number> => passenger-thread-count-number--1kd6ffy
|
190
200
|
|
191
|
-
6.13.
|
201
|
+
6.13.10. passenger_max_requests <integer> => passenger-max-requests-integer--sgzint
|
192
202
|
|
193
|
-
6.13.
|
203
|
+
6.13.11. passenger_max_request_time <seconds> => passenger-max-request-time-seconds--1htog2g
|
194
204
|
|
195
|
-
6.13.
|
205
|
+
6.13.12. passenger_memory_limit <integer> => passenger-memory-limit-integer--1ry7dwx
|
196
206
|
|
197
|
-
6.13.
|
207
|
+
6.13.13. passenger_pre_start <url> => passenger-pre-start-url--npldeb
|
198
208
|
|
199
209
|
6.14. Logging and debugging options => logging-and-debugging-options-14e91ni
|
200
210
|
|
@@ -254,7 +264,7 @@
|
|
254
264
|
|
255
265
|
8.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments => how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-11mzwt6
|
256
266
|
|
257
|
-
8.8. Out-of-Band
|
267
|
+
8.8. Out-of-Band Work and Out-of-Band Garbage Collection => out-of-band-work-and-out-of-band-garbage-collection-v89lu2
|
258
268
|
|
259
269
|
8.9. Flying Passenger => flying-passenger-137qg5e
|
260
270
|
|
@@ -266,13 +276,21 @@
|
|
266
276
|
|
267
277
|
8.9.4. Managing the Flying Passenger daemon => managing-the-flying-passenger-daemon-vjmzdh
|
268
278
|
|
269
|
-
8.9.5.
|
279
|
+
8.9.5. Using Flying Passenger with MRI 1.8 or JRuby => using-flying-passenger-with-mri-1-8-or-jruby-pxho35
|
280
|
+
|
281
|
+
8.9.6. Caveats and limitations => caveats-and-limitations-15wakf
|
270
282
|
|
271
283
|
9. Under the hood => under-the-hood-8uney
|
272
284
|
|
273
285
|
9.1. Page caching support => page-caching-support-nafhf6
|
274
286
|
|
275
|
-
9.2.
|
287
|
+
9.2. Phusion Passenger and its relationship with Ruby => phusion-passenger-and-its-relationship-with-ruby-1hub1pa
|
288
|
+
|
289
|
+
9.2.1. How Ruby is used => how-ruby-is-used-j7g2a4
|
290
|
+
|
291
|
+
9.2.2. When the system has multiple Ruby interpreters => when-the-system-has-multiple-ruby-interpreters-fwn3t
|
292
|
+
|
293
|
+
9.3. How Phusion Passenger detects whether a virtual host is a web application => how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-13qbmhn
|
276
294
|
|
277
295
|
10. Appendix A: About this document => appendix-a-about-this-document-zfvixm
|
278
296
|
|
data/doc/Users guide Nginx.txt
CHANGED
@@ -342,6 +342,7 @@ touch /webapps/rackapp/tmp/restart.txt
|
|
342
342
|
include::users_guide_snippets/rackup_specifications.txt[]
|
343
343
|
|
344
344
|
|
345
|
+
[[deploying_a_wsgi_app]]
|
345
346
|
== Deploying a WSGI (Python) application
|
346
347
|
|
347
348
|
Phusion Passenger supports all WSGI-compliant Python web applications. Suppose that you have a WSGI application in '/webapps/wsgiapp'. Then that folder must contain at least three entries:
|
@@ -475,7 +476,9 @@ Since version 4.0.0, the `passenger_python` option was added. Also, Phusion Pass
|
|
475
476
|
* In a 'location' configuration block.
|
476
477
|
* In an 'if' configuration scope.
|
477
478
|
|
478
|
-
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
|
479
|
+
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 okay if the value refers to a different Ruby interpreter than the one you originally installed Phusion Passenger with. You can learn more about all this in <<relationship_with_ruby,Phusion Passenger and its relationship with Ruby>>.
|
480
|
+
|
481
|
+
The `passenger_ruby` directive in the `http` block 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`.
|
479
482
|
|
480
483
|
The `passenger_python` option works in a similar manner, but applies to Python instead.
|
481
484
|
|
@@ -574,7 +577,7 @@ This subsection attempts to describe spawn methods, but it's okay if you don't (
|
|
574
577
|
understand it, as it's mostly a technical detail. You can basically follow this rule of thumb:
|
575
578
|
|
576
579
|
************************************************
|
577
|
-
If your application works on Mongrel, but not on Phusion Passenger, then set
|
580
|
+
If your application works on Mongrel or Thin, but not on Phusion Passenger, then set
|
578
581
|
`passenger_spawn_method` to 'direct'. Otherwise, leave it at 'smart' (the default).
|
579
582
|
************************************************
|
580
583
|
|
@@ -710,15 +713,31 @@ for that server or that location.
|
|
710
713
|
|
711
714
|
Phusion Passenger is disabled by default, so you must explicitly enable
|
712
715
|
it for server blocks that you wish to serve through Phusion Passenger.
|
713
|
-
Please see <<
|
714
|
-
and <<
|
716
|
+
Please see <<deploying_a_rack_app,Deploying a Rack-based Ruby application>>
|
717
|
+
and <<deploying_a_wsgi_app,Deploying a WSGI (Python) application>>
|
715
718
|
for examples.
|
716
719
|
|
720
|
+
When using `location` blocks, you must re-specify `passenger_enabled` in each `location` block that you want to enable Phusion Passenger. This is because each `location` block has `passenger_enabled` turned off by default. For example:
|
721
|
+
|
722
|
+
----------------------------
|
723
|
+
server {
|
724
|
+
listen 80;
|
725
|
+
server_name www.foo.com;
|
726
|
+
root /webapps/foo/public;
|
727
|
+
passenger_enabled on;
|
728
|
+
|
729
|
+
location /attachments {
|
730
|
+
# Re-specify passenger_enabled here!
|
731
|
+
passenger_enabled on;
|
732
|
+
}
|
733
|
+
}
|
734
|
+
----------------------------
|
735
|
+
|
717
736
|
[[PassengerBaseURI]]
|
718
737
|
==== passenger_base_uri <uri> ====
|
719
738
|
Used to specify that the given URI is an distinct application that should
|
720
739
|
be served by Phusion Passenger. This option can be used for both Rails and
|
721
|
-
Rack applications. See <<
|
740
|
+
Rack applications. See <<deploying_rack_to_sub_uri,Deploying Rack to a sub URI>>
|
722
741
|
for an example.
|
723
742
|
|
724
743
|
It is allowed to specify this option multiple times. Do this to deploy multiple
|
@@ -884,6 +903,65 @@ In each place, it may be specified at most once. The default value is 'off'.
|
|
884
903
|
These options have the same effect as proxy_module's similarly named options.
|
885
904
|
They can be used to modify the maximum allowed HTTP header size.
|
886
905
|
|
906
|
+
[[passenger_intercept_errors]]
|
907
|
+
==== passenger_intercept_errors <on|off> ====
|
908
|
+
:version: 4.0.15
|
909
|
+
include::users_guide_snippets/since_version.txt[]
|
910
|
+
|
911
|
+
Decides if Nginx will intercept responses with HTTP status codes of 400 and higher.
|
912
|
+
|
913
|
+
By default, all responses are sent as-is from the application or from the Phusion Passenger core. If you turn this option on then Nginx will be able to handle such responses using the Nginx `error_page` option. Responses with status codes that do not match an `error_page` option are sent as-is.
|
914
|
+
|
915
|
+
This option may occur in the following places:
|
916
|
+
|
917
|
+
* In the 'http' configuration block.
|
918
|
+
* In a 'server' configuration block.
|
919
|
+
* In a 'location' configuration block.
|
920
|
+
* In an 'if' configuration scope.
|
921
|
+
|
922
|
+
In each place, it may be specified at most once. The default value is 'off'.
|
923
|
+
|
924
|
+
[[passenger_max_request_queue_size]]
|
925
|
+
==== passenger_max_request_queue_size <number> ====
|
926
|
+
:version: 4.0.15
|
927
|
+
include::users_guide_snippets/since_version.txt[]
|
928
|
+
|
929
|
+
When all application processes are already handling their maximum number of concurrent requests, Phusion Passenger will queue all incoming requests. This option specifies the maximum size for that queue. If the queue is already at this specified limit, then Phusion Passenger will immediately send a "503 Service Unavailable" error to any incoming requests. You may use <<passenger_request_queue_overflow_status_code,passenger_request_queue_overflow_status_code>> to customize the response status.
|
930
|
+
|
931
|
+
A value of 0 means that the queue is unbounded.
|
932
|
+
|
933
|
+
You may combine this with <<passenger_intercept_errors,passenger_intercept_errors>> and `error_page` to set a custom error page whenever the queue is full. In the following example, Nginx will serve /error503.html whenever the queue is full:
|
934
|
+
|
935
|
+
---------------------------------
|
936
|
+
passenger_intercept_errors on;
|
937
|
+
error_page 503 /error503.html;
|
938
|
+
---------------------------------
|
939
|
+
|
940
|
+
This option may occur in the following places:
|
941
|
+
|
942
|
+
* In the 'http' configuration block.
|
943
|
+
* In a 'server' configuration block.
|
944
|
+
* In a 'location' configuration block.
|
945
|
+
* In an 'if' configuration scope.
|
946
|
+
|
947
|
+
In each place, it may be specified at most once. The default value is '100'.
|
948
|
+
|
949
|
+
[[passenger_request_queue_overflow_status_code]]
|
950
|
+
==== passenger_request_queue_overflow_status_code <code> ====
|
951
|
+
:version: 4.0.15
|
952
|
+
include::users_guide_snippets/since_version.txt[]
|
953
|
+
|
954
|
+
This option allows you to customize the HTTP status code that is sent back when the request queue is full. See <<passenger_max_request_queue_size,passenger_max_request_queue_size>> for more information.
|
955
|
+
|
956
|
+
This option may occur in the following places:
|
957
|
+
|
958
|
+
* In the 'http' configuration block.
|
959
|
+
* In a 'server' configuration block.
|
960
|
+
* In a 'location' configuration block.
|
961
|
+
* In an 'if' configuration scope.
|
962
|
+
|
963
|
+
In each place, it may be specified at most once. The default value is '503'.
|
964
|
+
|
887
965
|
=== Security options ===
|
888
966
|
[[PassengerUserSwitching]]
|
889
967
|
==== passenger_user_switching <on|off> ====
|
@@ -1069,6 +1147,7 @@ The passenger_min_instances option may occur in the following places:
|
|
1069
1147
|
|
1070
1148
|
In each place, it may be specified at most once. The default value is '1'.
|
1071
1149
|
|
1150
|
+
[[PassengerMaxInstances]]
|
1072
1151
|
==== passenger_max_instances <integer> ====
|
1073
1152
|
:version: 3.0.0
|
1074
1153
|
include::users_guide_snippets/enterprise_only.txt[]
|
@@ -1173,6 +1252,21 @@ In each place, it may be specified at most once. The default value is '300' (5 m
|
|
1173
1252
|
:option: `--max-preloader-idle-time`
|
1174
1253
|
include::users_guide_snippets/alternative_for_flying_passenger.txt[]
|
1175
1254
|
|
1255
|
+
==== passenger_start_timeout <seconds> ====
|
1256
|
+
:version: 4.0.15
|
1257
|
+
include::users_guide_snippets/since_version.txt[]
|
1258
|
+
|
1259
|
+
Specifies a timeout for the startup of application processes. If an application process fails to start within the timeout period then it will be forcefully killed with SIGKILL, and the error will be logged.
|
1260
|
+
|
1261
|
+
This option may occur in the following places:
|
1262
|
+
|
1263
|
+
* In the 'http' configuration block.
|
1264
|
+
* In a 'server' configuration block.
|
1265
|
+
* In a 'location' configuration block.
|
1266
|
+
* In an 'if' configuration scope.
|
1267
|
+
|
1268
|
+
In each place, it may be specified at most once. The default value is '90'.
|
1269
|
+
|
1176
1270
|
[[PassengerConcurrencyModel]]
|
1177
1271
|
==== passenger_concurrency_model <process|thread> ====
|
1178
1272
|
:version: 4.0.0
|
@@ -1290,12 +1384,6 @@ fix the problem in your application rather than relying on these directives as a
|
|
1290
1384
|
measure to avoid freezing applications.
|
1291
1385
|
=====================================================
|
1292
1386
|
|
1293
|
-
[NOTE]
|
1294
|
-
=====================================================
|
1295
|
-
This option is currently only available for Ruby apps. It is not yet available
|
1296
|
-
for Python and Node.js.
|
1297
|
-
=====================================================
|
1298
|
-
|
1299
1387
|
[[PassengerMemoryLimit]]
|
1300
1388
|
==== passenger_memory_limit <integer> ====
|
1301
1389
|
:version: 3.0.0
|
@@ -1641,8 +1729,8 @@ Phusion Passenger hides a lot of complexity for the end user (i.e. the web serve
|
|
1641
1729
|
system administrator), but sometimes it is desirable to know what is going on.
|
1642
1730
|
This section describes a few things that Phusion Passenger does under the hood.
|
1643
1731
|
|
1644
|
-
=== Page caching support ===
|
1645
1732
|
include::users_guide_snippets/under_the_hood/page_caching_support.txt[]
|
1733
|
+
include::users_guide_snippets/under_the_hood/relationship_with_ruby.txt[]
|
1646
1734
|
|
1647
1735
|
[[application_detection]]
|
1648
1736
|
=== How Phusion Passenger detects whether a virtual host is a web application ===
|
File without changes
|
File without changes
|
@@ -15,7 +15,7 @@ The steps for upgrading or downgrading Phusion Passenger is almost the same as t
|
|
15
15
|
[[rubygems_generic_install]]
|
16
16
|
=== Generic installation, upgrade and downgrade method: via RubyGems
|
17
17
|
|
18
|
-
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.
|
18
|
+
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 <<relationship_with_ruby,Phusion Passenger and its relationship with Ruby>>.
|
19
19
|
|
20
20
|
[[is_ruby_home_or_system_wide_installed]]
|
21
21
|
[float]
|
@@ -68,36 +68,42 @@ gem install passenger --version 3.9.1.beta --pre
|
|
68
68
|
|
69
69
|
.Enterprise
|
70
70
|
|
71
|
-
|
71
|
+
First, download the *license key* from the link:phusionpassenger.com/orders[Customer Area] and save it as '/etc/passenger-enterprise-license'.
|
72
72
|
|
73
|
-
|
73
|
+
Next, add the Phusion Passenger Enterprise gem server to your RubyGems source list:
|
74
74
|
|
75
|
-
|
75
|
+
------------------------------------------
|
76
|
+
gem source --add https://YOUR_ORDER_REFERENCE:YOUR_PASSWORD@www.phusionpassenger.com/enterprise_gems
|
77
|
+
------------------------------------------
|
76
78
|
|
77
|
-
|
78
|
-
gem install passenger-enterprise-server-x.x.x.gem
|
79
|
-
-------------------------------------------------------
|
79
|
+
Substitute 'YOUR_ORDER_REFERENCE' and 'YOUR_PASSWORD' with your link:phusionpassenger.com/orders[Customer Area] login credentials.
|
80
80
|
|
81
|
-
|
82
|
-
[float]
|
83
|
-
==== Step 3: add the RubyGems bin directory to your $PATH
|
81
|
+
Finally, install the latest gem to obtain the files for the latest stable version of the open source Phusion Passenger:
|
84
82
|
|
85
|
-
|
83
|
+
----------------------
|
84
|
+
gem install passenger-enterprise-server
|
85
|
+
----------------------
|
86
|
+
|
87
|
+
Sometimes you will want to obtain the latest beta version of Phusion Passenger Enterprise. Beta versions are not normally selected by `gem install`, so to opt-in for beta versions you have to add the `--pre` argument:
|
88
|
+
|
89
|
+
-----------------------------------
|
90
|
+
gem install passenger-enterprise-server --pre
|
91
|
+
-----------------------------------
|
86
92
|
|
87
|
-
|
88
|
-
- and you installed RubyGems through APT,
|
89
|
-
- and your Ruby interpreter is installed system-wide,
|
93
|
+
If you want to obtain a specific version of Phusion Passenger Enterprise, e.g. because you are downgrading, then specify the version number with `--version`:
|
90
94
|
|
91
|
-
|
95
|
+
-----------------------------------
|
96
|
+
gem install passenger-enterprise-server --version 3.0.0
|
97
|
+
-----------------------------------
|
92
98
|
|
93
|
-
|
99
|
+
If you want to obtain a specific *beta* version of Phusion Passenger then you must also pass `--pre`:
|
94
100
|
|
95
|
-
|
96
|
-
|
97
|
-
|
101
|
+
----------------------------------------------------
|
102
|
+
gem install passenger-enterprise-server --version 3.9.1.beta --pre
|
103
|
+
----------------------------------------------------
|
98
104
|
|
99
105
|
[float]
|
100
|
-
==== Step
|
106
|
+
==== Step 3: loosen permissions
|
101
107
|
|
102
108
|
If in step 1 you determined that your Ruby interpreter is installed in your home directory, then you need to make sure that the Phusion Passenger gem directory is accessible by your web server. To do that, you must ensure that the Phusion Passenger gem directory, as well as all parent directories, have the world-executable permission.
|
103
109
|
|
@@ -120,7 +126,7 @@ chmod o+x /home/phusion
|
|
120
126
|
|
121
127
|
[[run_passenger_installer]]
|
122
128
|
[float]
|
123
|
-
==== Step
|
129
|
+
==== Step 4: run the Phusion Passenger installer
|
124
130
|
|
125
131
|
ifdef::apache[]
|
126
132
|
The Phusion Passenger gem only contains source files. In this step we will use the installer to compile the Phusion Passenger binaries, which include the various Phusion Passenger agent executables and the Phusion Passenger Apache module.
|
@@ -168,7 +174,7 @@ At some point it will ask you which prefix to install Nginx to. If you're upgrad
|
|
168
174
|
endif::[]
|
169
175
|
|
170
176
|
[float]
|
171
|
-
==== Step
|
177
|
+
==== Step 5: Restarting the Flying Passenger daemon
|
172
178
|
|
173
179
|
If you are using <<flying_passenger,Flying Passenger>> then you must restart the Flying Passenger daemon by sending it the SIGTERM signal:
|
174
180
|
|
@@ -185,7 +191,7 @@ kill PID_OF_FLYING_PASSENGER
|
|
185
191
|
|
186
192
|
[[verify_passenger_running]]
|
187
193
|
[float]
|
188
|
-
==== Step
|
194
|
+
==== Step 6: Verifying that Phusion Passenger is running
|
189
195
|
|
190
196
|
Restart your web server and run:
|
191
197
|
|
@@ -240,7 +246,7 @@ chmod o+x /opt
|
|
240
246
|
|
241
247
|
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 that.
|
242
248
|
|
243
|
-
Even though Ruby is required, Ruby will not be loaded during normal operation unless you deploy a Ruby web application on Phusion Passenger.
|
249
|
+
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 <<relationship_with_ruby,Phusion Passenger and its relationship with Ruby>> for details.
|
244
250
|
|
245
251
|
Run `ruby --version` and `rake --version` to find out whether both commands are already installed and recent enough. Phusion Passenger requires Ruby >= 1.8.6. Any Rake version will do.
|
246
252
|
|
@@ -248,15 +254,10 @@ Run `ruby --version` and `rake --version` to find out whether both commands are
|
|
248
254
|
|
249
255
|
We recommend you to use link:http://wiki.brightbox.co.uk/docs:phusion-passenger[the Brightbox Ruby packages]. They provide more up-to-date versions of Ruby than Debian's official repositories provide. Their Ubuntu Lucid repository is compatible with Debian 6. If you do not want to use the Brightbox repository, then follow the instructions for Debian 5.
|
250
256
|
|
251
|
-
|
252
|
-
|
253
|
-
-----------------------------
|
254
|
-
deb http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu lucid main
|
255
|
-
-----------------------------
|
256
|
-
|
257
|
-
Install the Brightbox APT public key:
|
257
|
+
Add the Brightbox repository and install the Bright APT public key:
|
258
258
|
|
259
259
|
-----------------------------
|
260
|
+
echo deb http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu lucid main | sudo tee /etc/apt/sources.list.d/brightbox-source.list
|
260
261
|
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
|
261
262
|
-----------------------------
|
262
263
|
|
@@ -281,19 +282,19 @@ Then <<add_rubygems_bin_dir_to_path,add the RubyGems bin directory to your $PATH
|
|
281
282
|
|
282
283
|
.Ubuntu
|
283
284
|
|
284
|
-
We recommend you to use link:http://wiki.brightbox.co.uk/docs:phusion-passenger[the Brightbox Ruby packages]. They provide more up-to-date versions of Ruby than Ubuntu's official repositories provide.
|
285
|
+
We recommend you to use link:http://wiki.brightbox.co.uk/docs:phusion-passenger[the Brightbox Ruby packages]. They provide more up-to-date versions of Ruby than Ubuntu's official repositories provide. Add the Brightbox repository as follows:
|
285
286
|
|
286
287
|
-----------------------------
|
287
288
|
sudo apt-add-repository ppa:brightbox/passenger
|
288
289
|
sudo apt-get update
|
289
290
|
-----------------------------
|
290
291
|
|
291
|
-
|
292
|
+
Then install Ruby and Rake:
|
292
293
|
|
293
294
|
-----------------------------
|
294
|
-
sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger.list'
|
295
|
-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
|
296
295
|
sudo apt-get update
|
296
|
+
sudo apt-get install ruby1.9.3
|
297
|
+
sudo gem install rake
|
297
298
|
-----------------------------
|
298
299
|
|
299
300
|
.Other operating systems
|
@@ -351,32 +352,22 @@ If you use these packages to install Phusion Passenger then you do not need to r
|
|
351
352
|
|
352
353
|
.Apache
|
353
354
|
|
354
|
-
|
355
|
+
First register the Brightbox Apache PPA. Run this on Ubuntu:
|
355
356
|
|
356
357
|
-----------------------------
|
357
358
|
sudo apt-add-repository ppa:brightbox/passenger-experimental
|
358
359
|
sudo apt-get update
|
359
360
|
-----------------------------
|
360
361
|
|
361
|
-
On
|
362
|
-
|
363
|
-
Debian 6:
|
362
|
+
On Debian, the `apt-add-repository` command isn't available so you have to install the repository and the key by hand:
|
364
363
|
|
365
364
|
-----------------------------
|
366
|
-
|
365
|
+
echo deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu lucid main | sudo tee /etc/apt/sources.list.d/brightbox-passenger.list
|
367
366
|
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
|
368
367
|
sudo apt-get update
|
369
368
|
-----------------------------
|
370
369
|
|
371
|
-
|
372
|
-
|
373
|
-
-----------------------------
|
374
|
-
sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger.list'
|
375
|
-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
|
376
|
-
sudo apt-get update
|
377
|
-
-----------------------------
|
378
|
-
|
379
|
-
You can proceed with installing Phusion Passenger by running:
|
370
|
+
Once the PPA is added, you can proceed with installing Phusion Passenger for Apache by running:
|
380
371
|
|
381
372
|
---------------------------------------------
|
382
373
|
sudo apt-get install libapache2-mod-passenger
|
@@ -386,32 +377,22 @@ The Apache package provides configuration snippets for you, so you don't need to
|
|
386
377
|
|
387
378
|
.Nginx
|
388
379
|
|
389
|
-
|
380
|
+
First register the Brightbox Apache PPA. Run this on Ubuntu:
|
390
381
|
|
391
382
|
-----------------------------
|
392
383
|
sudo apt-add-repository ppa:brightbox/passenger-experimental
|
393
384
|
sudo apt-get update
|
394
385
|
-----------------------------
|
395
386
|
|
396
|
-
On
|
397
|
-
|
398
|
-
Debian 6:
|
387
|
+
On Debian, the `apt-add-repository` command isn't available so you have to install the repository and the key by hand:
|
399
388
|
|
400
389
|
-----------------------------
|
401
|
-
|
390
|
+
echo deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu lucid main | sudo tee /etc/apt/sources.list.d/brightbox-passenger-nginx.list
|
402
391
|
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
|
403
392
|
sudo apt-get update
|
404
393
|
-----------------------------
|
405
394
|
|
406
|
-
|
407
|
-
|
408
|
-
-----------------------------
|
409
|
-
sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger-nginx.list'
|
410
|
-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
|
411
|
-
sudo apt-get update
|
412
|
-
-----------------------------
|
413
|
-
|
414
|
-
Then:
|
395
|
+
Once the PPA is added, you can proceed with installing Phusion Passenger for Nginx by running:
|
415
396
|
|
416
397
|
---------------------------------------------
|
417
398
|
sudo apt-get install nginx-full
|
@@ -420,7 +401,7 @@ sudo apt-get install nginx-full
|
|
420
401
|
You'll then need to enable the Phusion Passenger module in Nginx by creating the following configuration file:
|
421
402
|
|
422
403
|
-----------------------------------------------
|
423
|
-
|
404
|
+
echo "passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;" | sudo tee /etc/nginx/conf.d/passenger.conf
|
424
405
|
-----------------------------------------------
|
425
406
|
|
426
407
|
Then restart Nginx to apply the changes:
|
@@ -431,7 +412,33 @@ sudo /etc/init.d/nginx restart
|
|
431
412
|
|
432
413
|
.Standalone
|
433
414
|
|
434
|
-
|
415
|
+
First register the Brightbox Apache PPA. Run this on Ubuntu:
|
416
|
+
|
417
|
+
-----------------------------
|
418
|
+
sudo apt-add-repository ppa:brightbox/passenger-experimental
|
419
|
+
sudo apt-get update
|
420
|
+
-----------------------------
|
421
|
+
|
422
|
+
On Debian, the `apt-add-repository` command isn't available so you have to install the repository and the key by hand:
|
423
|
+
|
424
|
+
-----------------------------
|
425
|
+
echo deb http://ppa.launchpad.net/brightbox/passenger-experimental/ubuntu lucid main | sudo tee /etc/apt/sources.list.d/brightbox-passenger.list
|
426
|
+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
|
427
|
+
sudo apt-get update
|
428
|
+
-----------------------------
|
429
|
+
|
430
|
+
Once the PPA is added, you can proceed with installing Phusion Passenger for Apache by running:
|
431
|
+
|
432
|
+
---------------------------------------------
|
433
|
+
sudo apt-get install ruby-passenger
|
434
|
+
---------------------------------------------
|
435
|
+
|
436
|
+
You can then proceed with starting Phusion Passenger Standalone:
|
437
|
+
|
438
|
+
---------------------------------------------
|
439
|
+
cd /path-to-your-app
|
440
|
+
passenger start
|
441
|
+
---------------------------------------------
|
435
442
|
|
436
443
|
|
437
444
|
=== Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux
|
@@ -508,7 +515,38 @@ yum install passenger-standalone
|
|
508
515
|
[float]
|
509
516
|
==== Building your own packages
|
510
517
|
|
511
|
-
There are instructions for building your own packages and Yum repositories in the link:https://github.com/
|
518
|
+
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].
|
519
|
+
|
520
|
+
|
521
|
+
=== Installing or upgrading on Mac OS X with Homebrew
|
522
|
+
|
523
|
+
.Open source
|
524
|
+
|
525
|
+
Every time we release a new Phusion Passenger version, we make it available through Homebrew. Please note that the Homebrew maintainers have to merge our pull requests manually, so it may take a day or two before a new version shows up in the official Homebrew repository.
|
526
|
+
|
527
|
+
1. Update the Homebrew recipes:
|
528
|
+
+
|
529
|
+
---------------------------
|
530
|
+
brew update
|
531
|
+
---------------------------
|
532
|
+
2. Run the following command and follow the instructions. This will give you access to link:Users%20guide%20Apache.html[Phusion Passenger for Apache] and link:Users%20guide%20Standalone.html[Phusion Passenger Standalone].
|
533
|
+
+
|
534
|
+
---------------------------
|
535
|
+
brew install passenger
|
536
|
+
-OR-
|
537
|
+
brew upgrade passenger
|
538
|
+
---------------------------
|
539
|
+
3. (Optional) If you want to use link:Users%20guide%20Nginx.html[Phusion Passenger for Nginx], run:
|
540
|
+
+
|
541
|
+
---------------------------
|
542
|
+
brew install nginx --with-passenger
|
543
|
+
-OR-
|
544
|
+
brew upgrade nginx --wtih-passenger
|
545
|
+
---------------------------
|
546
|
+
|
547
|
+
.Enterprise
|
548
|
+
|
549
|
+
link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] is currently not available through Homebrew. Please try one of the other installation methods insteads.
|
512
550
|
|
513
551
|
|
514
552
|
=== Upgrading from open source to Enterprise
|
@@ -659,6 +697,8 @@ On some systems, C/C++ libraries and headers that Phusion Passenger requires may
|
|
659
697
|
These flags are injected into all C/C++ compiler invocations that involve linking. This includes compiler invocations that compile *and* link. The flags are injected at the beginning of the command string, but after `EXTRA_PRE_CFLAGS` and `EXTRA_PRE_CXXFLAGS`.
|
660
698
|
`EXTRA_LDFLAGS`::
|
661
699
|
Similar to `EXTRA_PRE_LDFLAGS`, but injected at the very end of the command string, even after `EXTRA_CFLAGS` and `EXTRA_CXXFLAGS`.
|
700
|
+
`PASSENGER_THREAD_LOCAL_STORAGE`::
|
701
|
+
Setting this to 1 will enable the `PASSENGER_THREAD_LOCAL_STORAGE` macro, which forcefully disables the use of thread-local storage inside the Phusion Passenger codebase. Setting this environment variable is useful on systems that have broken support for thread-local storage, despite passing our build system's check for proper thread-local storage support. At the time of writing, one user has reported that Ubuntu 12.04 32-bit has broken thread-local storage report although neither the reporter nor us were able to reproduce the problem on any other systems running Ubuntu 12.04 32-bit. Note that this flag has no effect on non-Phusion Passenger code.
|
662
702
|
|
663
703
|
NOTE: If you run the installer with `sudo` then environment variables may not be passed properly. Learn more at <<env_vars_and_sudo,Environment variables and sudo>>.
|
664
704
|
|
@@ -879,6 +919,7 @@ done this, you need to remove the Phusion Passenger files.
|
|
879
919
|
in which you placed the extracted Phusion Passenger files. This directory is the
|
880
920
|
same as the one pointed to the by `PassengerRoot`/`passenger_root` configuration directive.
|
881
921
|
- If you installed Phusion Passenger through APT or YUM, then use them to uninstall Phusion Passenger.
|
922
|
+
- If you installed Phusion Passenger through Homebrew, then run `brew uninstall passenger`.
|
882
923
|
|
883
924
|
ifdef::nginx[]
|
884
925
|
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.
|