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,23 +32,39 @@
32
32
 
33
33
  2.6. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-b17h8g
34
34
 
35
- 2.7. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-1arnxii
35
+ 2.7. Cryptographic verification of installation files => cryptographic-verification-of-installation-files-ed3r9v
36
36
 
37
- 2.8. Customizing the compilation process => customizing-the-compilation-process-1sds3od
37
+ 2.7.1. Synopsis => synopsis-uwnz2o
38
38
 
39
- 2.8.1. Setting the compiler => setting-the-compiler-1symq7h
39
+ 2.7.2. Importing the Phusion Software Signing key => importing-the-phusion-software-signing-key-1x0rhv
40
40
 
41
- 2.8.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-wzu0ey
41
+ 2.7.3. Verifying the Phusion Software Signing key => verifying-the-phusion-software-signing-key-10430lg
42
42
 
43
- 2.8.3. Forcing location of certain command line tools => forcing-location-of-certain-command-line-tools-1hym30u
43
+ 2.7.4. Verifying the gem and tarball => verifying-the-gem-and-tarball-1nf0uov
44
44
 
45
- 2.9. Working with the Apache configuration file => locating-the-apache-configuration-file-1fterqv
45
+ 2.7.5. Verifying Git signatures => verifying-git-signatures-oaafwd
46
46
 
47
- 2.10. Disabling without uninstalling => unloading-disabling-phusion-passenger-from-apache-without-uninstalling-it-s1axnx
47
+ 2.7.6. Verifying DEB and RPM packages => verifying-deb-and-rpm-packages-vgtv04
48
48
 
49
- 2.11. Uninstalling => uninstalling-phusion-passenger-1qb4ssq
49
+ 2.7.7. Revocation => revocation-4o01n2
50
50
 
51
- 2.12. Moving to a different directory => moving-to-a-different-directory-1n0gkwh
51
+ 2.8. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-1arnxii
52
+
53
+ 2.9. Customizing the compilation process => customizing-the-compilation-process-1sds3od
54
+
55
+ 2.9.1. Setting the compiler => setting-the-compiler-1symq7h
56
+
57
+ 2.9.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-wzu0ey
58
+
59
+ 2.9.3. Forcing location of certain command line tools => forcing-location-of-certain-command-line-tools-1hym30u
60
+
61
+ 2.10. Working with the Apache configuration file => locating-the-apache-configuration-file-1fterqv
62
+
63
+ 2.11. Disabling without uninstalling => unloading-disabling-phusion-passenger-from-apache-without-uninstalling-it-s1axnx
64
+
65
+ 2.12. Uninstalling => uninstalling-phusion-passenger-1qb4ssq
66
+
67
+ 2.13. Moving to a different directory => moving-to-a-different-directory-1n0gkwh
52
68
 
53
69
  3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3.x) application => deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-x-application-9r92hi
54
70
 
@@ -98,111 +114,113 @@
98
114
 
99
115
  6.1. PassengerRoot <directory> => passengerroot-directory--sere8l
100
116
 
101
- 6.2. PassengerRuby <filename> => passengerruby-filename--1r3fv73
117
+ 6.2. PassengerDefaultRuby and PassengerRuby => passengerdefaultruby-and-passengerruby-7zblp8
118
+
119
+ 6.3. PassengerRuby <filename> => passengerruby-filename--1r3fv73
102
120
 
103
- 6.3. PassengerPython <filename> => passengerpython-filename--1ssesv3
121
+ 6.4. PassengerPython <filename> => passengerpython-filename--1ssesv3
104
122
 
105
- 6.4. PassengerAppRoot <path/to/root> => passengerapproot-path-to-root--uf24yd
123
+ 6.5. PassengerAppRoot <path/to/root> => passengerapproot-path-to-root--uf24yd
106
124
 
107
- 6.5. PassengerSpawnMethod <string> => passengerspawnmethod-string--sodg2y
125
+ 6.6. PassengerSpawnMethod <string> => passengerspawnmethod-string--sodg2y
108
126
 
109
- 6.6. PassengerEnabled <on|off> => passengerenabled-on-off--74rzth
127
+ 6.7. PassengerEnabled <on|off> => passengerenabled-on-off--74rzth
110
128
 
111
- 6.7. PassengerTempDir <directory> => passengertempdir-directory--68h2ng
129
+ 6.8. PassengerTempDir <directory> => passengertempdir-directory--68h2ng
112
130
 
113
- 6.8. PassengerUploadBufferDir <directory> => passengeruploadbufferdir-directory--kdr8at
131
+ 6.9. PassengerUploadBufferDir <directory> => passengeruploadbufferdir-directory--kdr8at
114
132
 
115
- 6.9. PassengerRestartDir <directory> => passengerrestartdir-directory--1fmhmv0
133
+ 6.10. PassengerRestartDir <directory> => passengerrestartdir-directory--1fmhmv0
116
134
 
117
- 6.10. PassengerBufferResponse <on|off> => passengerbufferresponse-on-off--1y7ilka
135
+ 6.11. PassengerBufferResponse <on|off> => passengerbufferresponse-on-off--1y7ilka
118
136
 
119
- 6.11. PassengerRollingRestarts <on|off> => passengerrollingrestarts
137
+ 6.12. PassengerRollingRestarts <on|off> => passengerrollingrestarts
120
138
 
121
- 6.12. PassengerResistDeploymentErrors <on|off> => passengerresistdeploymenterrors
139
+ 6.13. PassengerResistDeploymentErrors <on|off> => passengerresistdeploymenterrors
122
140
 
123
- 6.13. Security options => security-options-1pb75ho
141
+ 6.14. Security options => security-options-1pb75ho
124
142
 
125
- 6.13.1. PassengerUserSwitching <on|off> => passengeruserswitching
143
+ 6.14.1. PassengerUserSwitching <on|off> => passengeruserswitching
126
144
 
127
- 6.13.2. PassengerUser <username> => passengeruser
145
+ 6.14.2. PassengerUser <username> => passengeruser
128
146
 
129
- 6.13.3. PassengerGroup <group name> => passengergroup
147
+ 6.14.3. PassengerGroup <group name> => passengergroup
130
148
 
131
- 6.13.4. PassengerDefaultUser <username> => passengerdefaultuser
149
+ 6.14.4. PassengerDefaultUser <username> => passengerdefaultuser
132
150
 
133
- 6.13.5. PassengerDefaultGroup <group name> => passengerdefaultgroup
151
+ 6.14.5. PassengerDefaultGroup <group name> => passengerdefaultgroup
134
152
 
135
- 6.13.6. PassengerFriendlyErrorPages <on|off> => passengerfriendlyerrorpages
153
+ 6.14.6. PassengerFriendlyErrorPages <on|off> => passengerfriendlyerrorpages
136
154
 
137
- 6.14. Resource control and optimization options => resource-control-and-optimization-options-zu2f7u
155
+ 6.15. Resource control and optimization options => resource-control-and-optimization-options-zu2f7u
138
156
 
139
- 6.14.1. PassengerMaxPoolSize <integer> => passengermaxpoolsize-integer--am64q8
157
+ 6.15.1. PassengerMaxPoolSize <integer> => passengermaxpoolsize-integer--am64q8
140
158
 
141
- 6.14.2. PassengerMinInstances <integer> => passengermininstances-integer--wegq6b
159
+ 6.15.2. PassengerMinInstances <integer> => passengermininstances-integer--wegq6b
142
160
 
143
- 6.14.3. PassengerMaxInstances <integer> => passengermaxinstances
161
+ 6.15.3. PassengerMaxInstances <integer> => passengermaxinstances
144
162
 
145
- 6.14.4. PassengerMaxInstancesPerApp <integer> => passengermaxinstancesperapp
163
+ 6.15.4. PassengerMaxInstancesPerApp <integer> => passengermaxinstancesperapp
146
164
 
147
- 6.14.5. PassengerPoolIdleTime <integer> => passengerpoolidletime-integer--a3gunq
165
+ 6.15.5. PassengerPoolIdleTime <integer> => passengerpoolidletime-integer--a3gunq
148
166
 
149
- 6.14.6. PassengerMaxPreloaderIdleTime <integer> => railsappspawneridletime-integer--1awgog1
167
+ 6.15.6. PassengerMaxPreloaderIdleTime <integer> => railsappspawneridletime-integer--1awgog1
150
168
 
151
- 6.14.7. PassengerConcurrencyModel <process|thread> => passengerconcurrencymodel-process-thread--1eipofj
169
+ 6.15.7. PassengerConcurrencyModel <process|thread> => passengerconcurrencymodel-process-thread--1eipofj
152
170
 
153
- 6.14.8. PassengerThreadCount <number> => passengerthreadcount-number--10jl64a
171
+ 6.15.8. PassengerThreadCount <number> => passengerthreadcount-number--10jl64a
154
172
 
155
- 6.14.9. PassengerMaxRequests <integer> => passengermaxrequests-integer--17qkw9n
173
+ 6.15.9. PassengerMaxRequests <integer> => passengermaxrequests-integer--17qkw9n
156
174
 
157
- 6.14.10. PassengerMaxRequestTime <seconds> => passengermaxrequesttime-seconds--127v1i2
175
+ 6.15.10. PassengerMaxRequestTime <seconds> => passengermaxrequesttime-seconds--127v1i2
158
176
 
159
- 6.14.11. PassengerMemoryLimit <integer> => passengermemorylimit-integer--18irza1
177
+ 6.15.11. PassengerMemoryLimit <integer> => passengermemorylimit-integer--18irza1
160
178
 
161
- 6.14.12. PassengerStatThrottleRate <integer> => passengerstatthrottlerate-integer--1dcfda3
179
+ 6.15.12. PassengerStatThrottleRate <integer> => passengerstatthrottlerate-integer--1dcfda3
162
180
 
163
- 6.14.13. PassengerPreStart <url> => passengerprestart-url--1utb57k
181
+ 6.15.13. PassengerPreStart <url> => passengerprestart-url--1utb57k
164
182
 
165
- 6.14.14. PassengerHighPerformance <on|off> => passengerhighperformance-on-off--nvfa86
183
+ 6.15.14. PassengerHighPerformance <on|off> => passengerhighperformance-on-off--nvfa86
166
184
 
167
- 6.15. Compatibility options => compatibility-options-8jve5a
185
+ 6.16. Compatibility options => compatibility-options-8jve5a
168
186
 
169
- 6.15.1. PassengerResolveSymlinksInDocumentRoot <on|off> => passengerresolvesymlinksindocumentroot-on-off--1r0qcp8
187
+ 6.16.1. PassengerResolveSymlinksInDocumentRoot <on|off> => passengerresolvesymlinksindocumentroot-on-off--1r0qcp8
170
188
 
171
- 6.15.2. PassengerAllowEncodedSlashes <on|off> => passengerallowencodedslashes-on-off--1y3s1ww
189
+ 6.16.2. PassengerAllowEncodedSlashes <on|off> => passengerallowencodedslashes-on-off--1y3s1ww
172
190
 
173
- 6.16. Logging and debugging options => logging-and-debugging-options-el2cuc
191
+ 6.17. Logging and debugging options => logging-and-debugging-options-el2cuc
174
192
 
175
- 6.16.1. PassengerLogLevel <integer> => passengerloglevel-integer--s3kbil
193
+ 6.17.1. PassengerLogLevel <integer> => passengerloglevel-integer--s3kbil
176
194
 
177
- 6.16.2. PassengerDebugLogFile <filename> => passengerdebuglogfile-filename--1wjm2j1
195
+ 6.17.2. PassengerDebugLogFile <filename> => passengerdebuglogfile-filename--1wjm2j1
178
196
 
179
- 6.16.3. PassengerDebugger <on|off> => passengerdebugger-on-off--19you7e
197
+ 6.17.3. PassengerDebugger <on|off> => passengerdebugger-on-off--19you7e
180
198
 
181
- 6.17. Classic Ruby on Rails (⇐ 2.x)-specific options => ruby-on-rails-specific-options-1t10wfu
199
+ 6.18. Classic Ruby on Rails (⇐ 2.x)-specific options => ruby-on-rails-specific-options-1t10wfu
182
200
 
183
- 6.17.1. RailsBaseURI <uri> => railsbaseuri-uri--1txrw3k
201
+ 6.18.1. RailsBaseURI <uri> => railsbaseuri-uri--1txrw3k
184
202
 
185
- 6.17.2. RailsEnv <string> => railsenv-string--1b0xxvu
203
+ 6.18.2. RailsEnv <string> => railsenv-string--1b0xxvu
186
204
 
187
- 6.18. Rack and Rails >= 3 specific options => rack-specific-options-wk9qzt
205
+ 6.19. Rack and Rails >= 3 specific options => rack-specific-options-wk9qzt
188
206
 
189
- 6.18.1. RackBaseURI <uri> => rackbaseuri-uri--1to24pj
207
+ 6.19.1. RackBaseURI <uri> => rackbaseuri-uri--1to24pj
190
208
 
191
- 6.18.2. RackEnv <string> => rackenv-string--vve9py
209
+ 6.19.2. RackEnv <string> => rackenv-string--vve9py
192
210
 
193
- 6.19. Deprecated or removed options => deprecated-options-pm9m57
211
+ 6.20. Deprecated or removed options => deprecated-options-pm9m57
194
212
 
195
- 6.19.1. RailsRuby => railsruby-ht09ei
213
+ 6.20.1. RailsRuby => railsruby-ht09ei
196
214
 
197
- 6.19.2. RailsUserSwitching => railsuserswitching-1npx8y4
215
+ 6.20.2. RailsUserSwitching => railsuserswitching-1npx8y4
198
216
 
199
- 6.19.3. RailsDefaultUser => railsdefaultuser-19j7n3m
217
+ 6.20.3. RailsDefaultUser => railsdefaultuser-19j7n3m
200
218
 
201
- 6.19.4. RailsAllowModRewrite => railsallowmodrewrite-1vkziro
219
+ 6.20.4. RailsAllowModRewrite => railsallowmodrewrite-1vkziro
202
220
 
203
- 6.19.5. RailsSpawnMethod => railsspawnmethod-1aljgpa
221
+ 6.20.5. RailsSpawnMethod => railsspawnmethod-1aljgpa
204
222
 
205
- 6.19.6. RailsAutoDetect, RackAutoDetect and WsgiAutoDetect => railsautodetect-rackautodetect-and-wsgiautodetect-1qgakzs
223
+ 6.20.6. RailsAutoDetect, RackAutoDetect and WsgiAutoDetect => railsautodetect-rackautodetect-and-wsgiautodetect-1qgakzs
206
224
 
207
225
  7. Troubleshooting => troubleshooting-2ihihi
208
226
 
@@ -399,7 +399,7 @@ $ some_awesome_editor passenger_wsgi.py
399
399
  $ cat passenger_wsgi.py
400
400
  def application(environ, start_response):
401
401
  start_response('200 OK', [('Content-Type', 'text/plain')])
402
- return ["hello world!\n"]
402
+ return [b"hello world!\n"]
403
403
  -------------------------------------------
404
404
 
405
405
  Finally, we deploy it by adding the following configuration options to
@@ -487,37 +487,75 @@ this option as well. Please read
487
487
 
488
488
  This required option may only occur once, in the global server configuration.
489
489
 
490
+ [[PassengerDefaultRuby]]
491
+ === PassengerDefaultRuby and PassengerRuby ===
492
+ :version: 4.0.0
493
+ include::users_guide_snippets/since_version.txt[]
494
+
495
+ This option specifies the default Ruby interpreter to use for web apps as well as for all sorts of internal Phusion Passenger helper scripts, e.g. the one used by <<PassengerPreStart,PassengerPreStart>>. Please see <<PassengerRuby,PassengerRuby>> for more information, as well as how it relates to <<PassengerRuby,PassengerRuby>>.
496
+
497
+ This option may occur in the global server configuration. The default value is 'ruby', meaning that the Ruby interpreter will be looked up according to the `PATH` environment variable.
498
+
490
499
  [[PassengerRuby]]
491
500
  === PassengerRuby <filename> ===
492
- This option allows one to specify the Ruby interpreter to use.
501
+ The `PassengerDefaultRuby` and `PassengerRuby` directives specify the Ruby interpreter to use. Similarly, the `PassengerPython` directive is for specifying the Python interpreter.
493
502
 
494
- Since version 4.0.0, this option may occur in the following places:
503
+ The relationship between `PassengerDefaultRuby` and `PassengerRuby` is as follows:
495
504
 
496
- * In the global server configuration.
497
- * In a virtual host configuration block.
498
- * In a `<Directory>` or `<Location>` block.
499
- * In '.htaccess', if `AllowOverride Options` is on.
505
+ * `PassengerDefaultRuby` may only occur in the global server configuration.
506
+ * `PassengerRuby` may occur everywhere: in the global server configuration, in `<VirtualHost>`, in `<Directory>`, in `<Location>`, and in '.htaccess' if `AllowOverride Options` is on.
507
+ * You don't *have* to specify `PassengerRuby`. In this case `PassengerDefaultRuby` is used as the Ruby interpreter. But if you do specify `PassengerRuby` then it will override `PassengerDefaultRuby` in that context. This allows you to use `PassengerRuby` to specify a different Ruby interpreter on a per-application basis.
500
508
 
501
- If you want to use a different Ruby interpreter for two different applications then you should define different `PassengerRuby` directives in different virtual host blocks.
509
+ Phusion Passenger not only uses Ruby to run web apps, but also for running certain helper tools that are written in Ruby, e.g. the internal helper script used by <<PassengerPreStart,PassengerPreStart>>. These tools are always run using `PassengerDefaultRuby`, never by `PassengerRuby`. `PassengerRuby` is only used for running web apps.
502
510
 
503
- In versions prior to 4.0.0, only a single Ruby version is supported for the entire Apache instance, so `PassengerRuby` may only occur in the global server configuration.
511
+ The reason why `PassengerDefaultRuby` exists at all is because limitations in the Apache API prevents us from implementing the same behavior using only the `PassengerRuby` directive.
504
512
 
505
- The default value is 'ruby', meaning that the Ruby interpreter will be looked up according to the `PATH` environment variable.
513
+ There is no `PassengerDefaultPython` because there are no Phusion Passenger tools written in Python. As such, having `PassengerPython` is enough.
506
514
 
507
- === PassengerPython <filename> ===
508
- :version: 4.0.0
509
- include::users_guide_snippets/since_version.txt[]
515
+ The following example illustrates how it works and how you can use these options to specify different Ruby/Python interpreters for different web apps.
510
516
 
511
- This option allows one to specify the Python interpreter to use. It may occur in the following places:
517
+ ------------------------------
518
+ # Use Ruby 1.8.7 by default.
519
+ PassengerDefaultRuby /usr/bin/ruby1.8
520
+ # Use Python 2.6 by default.
521
+ PassengerPython /usr/bin/python2.6
512
522
 
513
- * In the global server configuration.
514
- * In a virtual host configuration block.
515
- * In a `<Directory>` or `<Location>` block.
516
- * In '.htaccess', if `AllowOverride Options` is on.
523
+ <VirtualHost *:80>
524
+ # This Rails web app will use Ruby 1.8.7
525
+ ServerName www.foo.com
526
+ DocumentRoot /webapps/foo/public
527
+ </VirtualHost>
528
+
529
+ <VirtualHost *:80>
530
+ # This Rails web app will use Ruby 1.9.3, as installed by RVM
531
+ PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3/ruby
532
+ ServerName www.bar.com
533
+ DocumentRoot /webapps/bar/public
534
+
535
+ # If you have a web app deployed in a sub-URI, customize
536
+ # PassengerRuby/PassengerPython inside a <Location> block.
537
+ # The web app under www.bar.com/blog will use JRuby 1.7.1
538
+ RackBaseURI /blog
539
+ <Location /blog>
540
+ PassengerRuby /usr/local/rvm/wrappers/jruby-1.7.1/ruby
541
+ </Location>
542
+ </VirtualHost>
543
+
544
+ <VirtualHost *:80>
545
+ # This Flask web app will use Python 3.0
546
+ PassengerPython /usr/bin/python3.0
547
+ ServerName www.baz.com
548
+ DocumentRoot /webapps/baz/public
549
+ </VirtualHost>
550
+ ------------------------------
551
+
552
+ include::users_guide_snippets/rvm_helper_tool.txt[]
517
553
 
518
- If you want to use a different Python interpreter for two different applications then you should define different `PassengerPython` directives in different virtual host blocks.
554
+ === PassengerPython <filename> ===
555
+ :version: 4.0.0
556
+ include::users_guide_snippets/since_version.txt[]
519
557
 
520
- The default value is 'python', meaning that the Python interpreter will be looked up according to the `PATH` environment variable.
558
+ This option allows one to specify the Python interpreter to use. See <<PassengerRuby,PassengerRuby>> for more information. The default value is 'python', meaning that the Python interpreter will be looked up according to the `PATH` environment variable.
521
559
 
522
560
  [[PassengerAppRoot]]
523
561
  === PassengerAppRoot <path/to/root> ===
@@ -954,27 +992,15 @@ In each place, it may be specified at most once. The default value is 'on'.
954
992
  ==== PassengerMaxPoolSize <integer> ====
955
993
  The maximum number of <<application_process,application processes>> that may
956
994
  simultaneously exist. A larger number results in higher memory usage,
957
- but improved ability to handle concurrent HTTP clients.
995
+ but improves the ability to handle concurrent HTTP requests.
958
996
 
959
- The optimal value depends on your system's hardware and the server's average
960
- load. You should experiment with different values. But generally speaking,
961
- the value should be at least equal to the number of CPUs (or CPU cores) that
962
- you have. If your system has 2 GB of RAM, then we recommend a value of '15'.
963
- If your system is a Virtual Private Server (VPS) and has about 256 MB RAM, and
964
- is also running other services such as MySQL, then we recommend a value of '2'.
997
+ 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].
965
998
 
966
- If you find that your server is unable to handle the load on your Rails/Rack websites
967
- (i.e. running out of memory) then you should lower this value. (Though if your
968
- sites are really that popular, then you should strongly consider upgrading your
969
- hardware or getting more servers.)
999
+ If you find that your server is running out of memory then you should lower this value.
970
1000
 
971
1001
  This option may only occur once, in the global server configuration.
972
1002
  The default value is '6'.
973
1003
 
974
- TIP: We strongly recommend you to <<reducing_memory_usage,use Ruby Enterprise
975
- Edition>>. This allows you to reduce the memory usage of your Ruby on Rails applications
976
- by about 33%, and it's not hard to install.
977
-
978
1004
  [[PassengerMinInstances]]
979
1005
  ==== PassengerMinInstances <integer> ====
980
1006
  This specifies the minimum number of application processes that should exist for a
@@ -1111,16 +1111,24 @@ using the command line.</p></div>
1111
1111
  <div class="foo toclevel3"><a href="#_installing_or_upgrading_on_debian_6_or_ubuntu">2.4. Installing or upgrading on Debian 6 or Ubuntu</a></div>
1112
1112
  <div class="foo toclevel3"><a href="#_installing_or_upgrading_on_red_hat_fedora_centos_or_scientificlinux">2.5. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux</a></div>
1113
1113
  <div class="foo toclevel3"><a href="#_upgrading_from_open_source_to_enterprise">2.6. Upgrading from open source to Enterprise</a></div>
1114
- <div class="foo toclevel3"><a href="#_non_interactive_automatic_headless_installs_or_upgrades">2.7. Non-interactive, automatic, headless installs or upgrades</a></div>
1115
- <div class="foo toclevel3"><a href="#_customizing_the_compilation_process">2.8. Customizing the compilation process</a></div>
1116
- <div class="foo toclevel4"><a href="#_setting_the_compiler">2.8.1. Setting the compiler</a></div>
1117
- <div class="foo toclevel4"><a href="#_adding_additional_compiler_or_linker_flags">2.8.2. Adding additional compiler or linker flags</a></div>
1118
- <div class="foo toclevel4"><a href="#_forcing_location_of_certain_command_line_tools">2.8.3. Forcing location of certain command line tools</a></div>
1119
- <div class="foo toclevel3"><a href="#_installing_as_a_normal_nginx_module_without_using_the_installer">2.9. Installing as a normal Nginx module without using the installer</a></div>
1120
- <div class="foo toclevel3"><a href="#nginx_init_script">2.10. Creating an Nginx init script</a></div>
1121
- <div class="foo toclevel3"><a href="#_disabling_without_uninstalling">2.11. Disabling without uninstalling</a></div>
1122
- <div class="foo toclevel3"><a href="#uninstalling">2.12. Uninstalling</a></div>
1123
- <div class="foo toclevel3"><a href="#moving_phusion_passenger">2.13. Moving to a different directory</a></div>
1114
+ <div class="foo toclevel3"><a href="#_cryptographic_verification_of_installation_files">2.7. Cryptographic verification of installation files</a></div>
1115
+ <div class="foo toclevel4"><a href="#_synopsis_2">2.7.1. Synopsis</a></div>
1116
+ <div class="foo toclevel4"><a href="#_importing_the_phusion_software_signing_key">2.7.2. Importing the Phusion Software Signing key</a></div>
1117
+ <div class="foo toclevel4"><a href="#_verifying_the_phusion_software_signing_key">2.7.3. Verifying the Phusion Software Signing key</a></div>
1118
+ <div class="foo toclevel4"><a href="#_verifying_the_gem_and_tarball">2.7.4. Verifying the gem and tarball</a></div>
1119
+ <div class="foo toclevel4"><a href="#_verifying_git_signatures">2.7.5. Verifying Git signatures</a></div>
1120
+ <div class="foo toclevel4"><a href="#_verifying_deb_and_rpm_packages">2.7.6. Verifying DEB and RPM packages</a></div>
1121
+ <div class="foo toclevel4"><a href="#_revocation">2.7.7. Revocation</a></div>
1122
+ <div class="foo toclevel3"><a href="#_non_interactive_automatic_headless_installs_or_upgrades">2.8. Non-interactive, automatic, headless installs or upgrades</a></div>
1123
+ <div class="foo toclevel3"><a href="#_customizing_the_compilation_process">2.9. Customizing the compilation process</a></div>
1124
+ <div class="foo toclevel4"><a href="#_setting_the_compiler">2.9.1. Setting the compiler</a></div>
1125
+ <div class="foo toclevel4"><a href="#_adding_additional_compiler_or_linker_flags">2.9.2. Adding additional compiler or linker flags</a></div>
1126
+ <div class="foo toclevel4"><a href="#_forcing_location_of_certain_command_line_tools">2.9.3. Forcing location of certain command line tools</a></div>
1127
+ <div class="foo toclevel3"><a href="#_installing_as_a_normal_nginx_module_without_using_the_installer">2.10. Installing as a normal Nginx module without using the installer</a></div>
1128
+ <div class="foo toclevel3"><a href="#nginx_init_script">2.11. Creating an Nginx init script</a></div>
1129
+ <div class="foo toclevel3"><a href="#_disabling_without_uninstalling">2.12. Disabling without uninstalling</a></div>
1130
+ <div class="foo toclevel3"><a href="#uninstalling">2.13. Uninstalling</a></div>
1131
+ <div class="foo toclevel3"><a href="#moving_phusion_passenger">2.14. Moving to a different directory</a></div>
1124
1132
  <div class="foo toclevel2"><a href="#deploying_a_ror_app">3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails &gt;= 3) application</a></div>
1125
1133
  <div class="foo toclevel3"><a href="#_deploying_to_a_virtual_host_8217_s_root">3.1. Deploying to a virtual host’s root</a></div>
1126
1134
  <div class="foo toclevel3"><a href="#deploying_rails_to_sub_uri">3.2. Deploying to a sub URI</a></div>
@@ -1145,7 +1153,7 @@ using the command line.</p></div>
1145
1153
  <div class="foo toclevel3"><a href="#_redeploying_restarting_the_wsgi_application">5.3. Redeploying (restarting the WSGI application)</a></div>
1146
1154
  <div class="foo toclevel2"><a href="#_configuring_phusion_passenger">6. Configuring Phusion Passenger</a></div>
1147
1155
  <div class="foo toclevel3"><a href="#_passenger_root_lt_directory_gt">6.1. passenger_root &lt;directory&gt;</a></div>
1148
- <div class="foo toclevel3"><a href="#_passenger_ruby_lt_filename_gt">6.2. passenger_ruby &lt;filename&gt;</a></div>
1156
+ <div class="foo toclevel3"><a href="#PassengerRuby">6.2. passenger_ruby &lt;filename&gt;</a></div>
1149
1157
  <div class="foo toclevel3"><a href="#_passenger_python_lt_filename_gt">6.3. passenger_python &lt;filename&gt;</a></div>
1150
1158
  <div class="foo toclevel3"><a href="#PassengerAppRoot">6.4. passenger_app_root &lt;path/to/root&gt;</a></div>
1151
1159
  <div class="foo toclevel3"><a href="#PassengerSpawnMethod">6.5. passenger_spawn_method &lt;string&gt;</a></div>
@@ -1645,8 +1653,26 @@ sudo apt-get update</pre>
1645
1653
  <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.5. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux</h3>
1646
1654
  <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>
1647
1655
  <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>
1648
- <span class="anchor_helper" id="_step_1_install_the_release_package"></span><h4 class="float" data-anchor="_step_1_install_the_release_package">Step 1: Install the release package</h4>
1649
- <div class="paragraph"><p>The easiest way to install Phusion Passenger and keep it up to date is to install the passenger-release package from the <a href="http://passenger.stealthymonkeys.com/">main repository</a>.</p></div>
1656
+ <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>
1657
+ <div class="listingblock">
1658
+ <div class="content monospaced">
1659
+ <pre>rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc</pre>
1660
+ </div>
1661
+ </div>
1662
+ <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>
1663
+ <div class="paragraph"><p>Install the passenger-release package from the <a href="http://passenger.stealthymonkeys.com/">main repository</a>.</p></div>
1664
+ <div class="paragraph"><p>Fedora Core 17:</p></div>
1665
+ <div class="listingblock">
1666
+ <div class="content monospaced">
1667
+ <pre>yum install http://passenger.stealthymonkeys.com/fedora/17/passenger-release.noarch.rpm</pre>
1668
+ </div>
1669
+ </div>
1670
+ <div class="paragraph"><p>Fedora Core 16:</p></div>
1671
+ <div class="listingblock">
1672
+ <div class="content monospaced">
1673
+ <pre>yum install http://passenger.stealthymonkeys.com/fedora/16/passenger-release.noarch.rpm</pre>
1674
+ </div>
1675
+ </div>
1650
1676
  <div class="paragraph"><p>Fedora Core 15:</p></div>
1651
1677
  <div class="listingblock">
1652
1678
  <div class="content monospaced">
@@ -1659,19 +1685,19 @@ sudo apt-get update</pre>
1659
1685
  <pre>yum install http://passenger.stealthymonkeys.com/fedora/14/passenger-release.noarch.rpm</pre>
1660
1686
  </div>
1661
1687
  </div>
1662
- <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>
1688
+ <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>
1663
1689
  <div class="listingblock">
1664
1690
  <div class="content monospaced">
1665
- <pre>rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm</pre>
1691
+ <pre>yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm</pre>
1666
1692
  </div>
1667
1693
  </div>
1668
- <div class="paragraph"><p>RHEL 6 / CentOS 6 / ScientificLinux 6:</p></div>
1694
+ <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>
1669
1695
  <div class="listingblock">
1670
1696
  <div class="content monospaced">
1671
- <pre>yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm</pre>
1697
+ <pre>rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm</pre>
1672
1698
  </div>
1673
1699
  </div>
1674
- <span class="anchor_helper" id="_step_2_use_yum"></span><h4 class="float" data-anchor="_step_2_use_yum">Step 2: Use YUM</h4>
1700
+ <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>
1675
1701
  <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>
1676
1702
  <div class="paragraph"><p>Phusion Passenger for Apache:</p></div>
1677
1703
  <div class="listingblock">
@@ -1713,13 +1739,115 @@ Install the Enterprise version by following one of the installation guides in th
1713
1739
  <div class="paragraph"><p>The uninstallation is necessary because the Enterprise Ruby gem has a different gem name (<em>passenger-enterprise-server</em> instead of <em>passenger</em>), but the same administration command names (e.g. <span class="monospaced">passenger-status</span>). Uninstalling the open source version avoids any conflicts.</p></div>
1714
1740
  </div>
1715
1741
  <div class="sect2">
1716
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_non_interactive_automatic_headless_installs_or_upgrades"></span><h3 data-comment-topic="non-interactive-automatic-headless-installs-or-upgrades-834ymv" data-anchor="_non_interactive_automatic_headless_installs_or_upgrades">2.7. Non-interactive, automatic, headless installs or upgrades</h3>
1742
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_cryptographic_verification_of_installation_files"></span><h3 data-comment-topic="cryptographic-verification-of-installation-files-2goray" data-anchor="_cryptographic_verification_of_installation_files">2.7. Cryptographic verification of installation files</h3>
1743
+ <div class="sect3">
1744
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_synopsis_2"></span><h4 data-comment-topic="synopsis-4fv6zw" data-anchor="_synopsis_2">2.7.1. Synopsis</h4>
1745
+ <div class="paragraph"><p>We digitally sign various files with our GPG key so that you can check whether they’re legit, i.e. whether they really came from Phusion and haven’t been tampered with by a third party. We apply signing since the open source version 4.0.0 RC 4, or the Enterprise version 4.0.0 RC 1.</p></div>
1746
+ </div>
1747
+ <div class="sect3">
1748
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_importing_the_phusion_software_signing_key"></span><h4 data-comment-topic="importing-the-phusion-software-signing-key-1qfpaj4" data-anchor="_importing_the_phusion_software_signing_key">2.7.2. Importing the Phusion Software Signing key</h4>
1749
+ <div class="paragraph"><p>Phusion’s GPG key for signing software is as follows:</p></div>
1750
+ <div class="literalblock">
1751
+ <div class="content monospaced">
1752
+ <pre>Phusion Software Signing (software-signing@phusion.nl)
1753
+ Short key ID: 0x0A212A8C
1754
+ Long key ID: 0x2AC745A50A212A8C
1755
+ Fingerprint: D5F0 8514 2693 9232 F437 AB72 2AC7 45A5 0A21 2A8C</pre>
1756
+ </div>
1757
+ </div>
1758
+ <div class="paragraph"><p>This key is stored at <a href="http://www.phusion.nl/about/gpg">the Phusion website</a> and at the key servers <a href="http://pool.sks-keyservers.net/pks/lookup?op=get&amp;search=0x2AC745A50A212A8C">sks-keyservers.net</a> and <a href="http://keyserver.ubuntu.com/pks/lookup?op=get&amp;search=0x2AC745A50A212A8C">keyserver.ubuntu.com</a>. You can import it to your keyring with one of these command:</p></div>
1759
+ <div class="listingblock">
1760
+ <div class="content monospaced">
1761
+ <pre>gpg --keyserver pool.sks-keyservers.net --search-keys 0x2AC745A50A212A8C
1762
+ # -OR-
1763
+ gpg --keyserver keyserver.ubuntu.com --search-keys 0x2AC745A50A212A8C</pre>
1764
+ </div>
1765
+ </div>
1766
+ <div class="paragraph"><p>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 <a href="mailto:support@phusion.nl">support@phusion.nl</a>. Include "notspam" in the message to bypass our spam filter.</p></div>
1767
+ <div class="paragraph"><p>The email address <a href="mailto:software-signing@phusion.nl">software-signing@phusion.nl</a> redirects to <a href="mailto:info@phusion.nl">info@phusion.nl</a> so it’s safe to send email there.</p></div>
1768
+ </div>
1769
+ <div class="sect3">
1770
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_the_phusion_software_signing_key"></span><h4 data-comment-topic="verifying-the-phusion-software-signing-key-i7f1vj" data-anchor="_verifying_the_phusion_software_signing_key">2.7.3. Verifying the Phusion Software Signing key</h4>
1771
+ <div class="paragraph"><p>The Phusion Software Signing key is also <strong>signed by the Phusion founders</strong>. Their keys are as follows:</p></div>
1772
+ <div class="literalblock">
1773
+ <div class="content monospaced">
1774
+ <pre>Hongli Lai (hongli@phusion.nl)
1775
+ Short key ID: 4B6F4332
1776
+ Long key ID: 06A131094B6F4332
1777
+ Fingerprint: 64E8 0420 FC6A 499F 9E1F 81FA 06A1 3109 4B6F 4332</pre>
1778
+ </div>
1779
+ </div>
1780
+ <div class="literalblock">
1781
+ <div class="content monospaced">
1782
+ <pre>Ninh Bui (ninh@phusion.nl)
1783
+ Short key ID: 6FAF3782
1784
+ Long key ID: BA8DA3F46FAF3782
1785
+ Fingerprint: 353A 398C 49AF 5CD5 74A0 656C BA8D A3F4 6FAF 3782</pre>
1786
+ </div>
1787
+ </div>
1788
+ <div class="paragraph"><p>Both keys are stored at both sks-servers.net and keyserver.ubuntu.com. Import them with:</p></div>
1789
+ <div class="listingblock">
1790
+ <div class="content monospaced">
1791
+ <pre>gpg --keyserver pool.sks-servers.net --search-keys 0x06A131094B6F4332
1792
+ gpg --keyserver pool.sks-servers.net --search-keys 0xBA8DA3F46FAF3782
1793
+ # -OR-
1794
+ gpg --keyserver keyserver.ubuntu.com --search-keys 0x06A131094B6F4332
1795
+ gpg --keyserver keyserver.ubuntu.com --search-keys 0xBA8DA3F46FAF3782</pre>
1796
+ </div>
1797
+ </div>
1798
+ </div>
1799
+ <div class="sect3">
1800
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_the_gem_and_tarball"></span><h4 data-comment-topic="verifying-the-gem-and-tarball-dr9466" data-anchor="_verifying_the_gem_and_tarball">2.7.4. Verifying the gem and tarball</h4>
1801
+ <div class="paragraph"><p>You can find the open source version’s gem and tarball GPG signatures at <a href="https://www.phusionpassenger.com/signatures/">https://www.phusionpassenger.com/signatures/</a>. The Enterprise version’s GPG signatures can be found in the <a href="https://www.phusionpassenger.com/orders">Customer Area</a>. All signatures have the <em>.asc</em> extension. Once you have imported our key, you can verify the validity of a file against its signature as follows:</p></div>
1802
+ <div class="listingblock">
1803
+ <div class="content monospaced">
1804
+ <pre>$ gpg --verify passenger-x.x.x.tar.gz.asc passenger-x.x.x.tar.gz
1805
+ gpg: Signature made Mon Mar 11 09:45:46 2013 CET using RSA key ID 0A212A8C
1806
+ gpg: Good signature from "Phusion Software Signing &lt;software-signing@phusion.nl&gt;"</pre>
1807
+ </div>
1808
+ </div>
1809
+ </div>
1810
+ <div class="sect3">
1811
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_git_signatures"></span><h4 data-comment-topic="verifying-git-signatures-dyo4fk" data-anchor="_verifying_git_signatures">2.7.5. Verifying Git signatures</h4>
1812
+ <div class="paragraph"><p>Tags in the <a href="https://github.com/FooBarWidget/passenger">Git repository for the open source version</a> are also tagged. You can verify a Git tag as follows:</p></div>
1813
+ <div class="listingblock">
1814
+ <div class="content monospaced">
1815
+ <pre>$ git tag --verify release-x.x.x
1816
+ object d886f34b5705e4314feccaf0d77b9a38416e15e0
1817
+ type commit
1818
+ tag release-4.0.0.rc5
1819
+ tagger Hongli Lai (Phusion) &lt;hongli@phusion.nl&gt; 1362993117 +0100
1820
+
1821
+ This is a tag message.
1822
+ gpg: Signature made Mon Mar 11 10:12:02 2013 CET using RSA key ID 0A212A8C
1823
+ gpg: Good signature from "Phusion Software Signing &lt;software-signing@phusion.nl&gt;"</pre>
1824
+ </div>
1825
+ </div>
1826
+ </div>
1827
+ <div class="sect3">
1828
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_verifying_deb_and_rpm_packages"></span><h4 data-comment-topic="verifying-deb-and-rpm-packages-1ed36d5" data-anchor="_verifying_deb_and_rpm_packages">2.7.6. Verifying DEB and RPM packages</h4>
1829
+ <div class="paragraph"><p>The DEB and RPM packages are signed with the signatures of the respective packagers. Phusion does not provide signatures for them.</p></div>
1830
+ </div>
1831
+ <div class="sect3">
1832
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_revocation"></span><h4 data-comment-topic="revocation-xwvhea" data-anchor="_revocation">2.7.7. Revocation</h4>
1833
+ <div class="paragraph"><p>In the event our key is compromised, we will revoke the key and upload the revocation information to sks-servers.net and keyserver.ubuntu.com. However your system will not know about the revocation until you update the keys from the keyservers. You should update your keys regularly (e.g. once a week) by invoking:</p></div>
1834
+ <div class="listingblock">
1835
+ <div class="content monospaced">
1836
+ <pre>gpg --refresh-keys --keyserver pool.sks-servers.net
1837
+ # -OR-
1838
+ gpg --refresh-keys --keyserver keyserver.ubuntu.com</pre>
1839
+ </div>
1840
+ </div>
1841
+ </div>
1842
+ </div>
1843
+ <div class="sect2">
1844
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_non_interactive_automatic_headless_installs_or_upgrades"></span><h3 data-comment-topic="non-interactive-automatic-headless-installs-or-upgrades-834ymv" data-anchor="_non_interactive_automatic_headless_installs_or_upgrades">2.8. Non-interactive, automatic, headless installs or upgrades</h3>
1717
1845
  <div class="paragraph"><p>By default, the installer (<span class="monospaced">passenger-install-nginx-module</span>) is interactive. If you want to automate installation then you can do so by passing various answers to the installer through command line options. Please run the installer with <span class="monospaced">--help</span> for a list of available command line options.</p></div>
1718
1846
  </div>
1719
1847
  <div class="sect2">
1720
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_customizing_the_compilation_process"></span><h3 data-comment-topic="customizing-the-compilation-process-u4cdcf" data-anchor="_customizing_the_compilation_process">2.8. Customizing the compilation process</h3>
1848
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_customizing_the_compilation_process"></span><h3 data-comment-topic="customizing-the-compilation-process-u4cdcf" data-anchor="_customizing_the_compilation_process">2.9. Customizing the compilation process</h3>
1721
1849
  <div class="sect3">
1722
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_setting_the_compiler"></span><h4 data-comment-topic="setting-the-compiler-1l6dpe1" data-anchor="_setting_the_compiler">2.8.1. Setting the compiler</h4>
1850
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_setting_the_compiler"></span><h4 data-comment-topic="setting-the-compiler-1l6dpe1" data-anchor="_setting_the_compiler">2.9.1. Setting the compiler</h4>
1723
1851
  <div class="paragraph"><p>You can force the Phusion Passenger build system to use a specific C or C++ compiler by setting the <span class="monospaced">CC</span> and <span class="monospaced">CXX</span> environment variables. These may be set to any arbitrary shell commands.</p></div>
1724
1852
  <div class="paragraph"><p>For example, contributors who want to hack on Phusion Passenger may want to use Clang for faster compilation and <a href="http://ccache.samba.org/">ccache</a> for faster recompilation, and may want to enable more error-catching compilation flags:</p></div>
1725
1853
  <div class="listingblock">
@@ -1730,7 +1858,7 @@ export CXX='ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefi
1730
1858
  </div>
1731
1859
  </div>
1732
1860
  <div class="sect3">
1733
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_adding_additional_compiler_or_linker_flags"></span><h4 data-comment-topic="adding-additional-compiler-or-linker-flags-1jehjon" data-anchor="_adding_additional_compiler_or_linker_flags">2.8.2. Adding additional compiler or linker flags</h4>
1861
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_adding_additional_compiler_or_linker_flags"></span><h4 data-comment-topic="adding-additional-compiler-or-linker-flags-1jehjon" data-anchor="_adding_additional_compiler_or_linker_flags">2.9.2. Adding additional compiler or linker flags</h4>
1734
1862
  <div class="paragraph"><p>On some systems, C/C++ libraries and headers that Phusion Passenger requires may be located in a non-standard directory. You can force the Phusion Passenger build system to look in those locations by injecting compiler and linker flags using the following environment variables:</p></div>
1735
1863
  <div class="dlist"><dl>
1736
1864
  <dt class="hdlist1">
@@ -1784,7 +1912,7 @@ export CXX='ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefi
1784
1912
  </dl></div>
1785
1913
  </div>
1786
1914
  <div class="sect3">
1787
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_forcing_location_of_certain_command_line_tools"></span><h4 data-comment-topic="forcing-location-of-certain-command-line-tools-1j93cki" data-anchor="_forcing_location_of_certain_command_line_tools">2.8.3. Forcing location of certain command line tools</h4>
1915
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_forcing_location_of_certain_command_line_tools"></span><h4 data-comment-topic="forcing-location-of-certain-command-line-tools-1j93cki" data-anchor="_forcing_location_of_certain_command_line_tools">2.9.3. Forcing location of certain command line tools</h4>
1788
1916
  <div class="paragraph"><p>The Phusion Passenger build system attempts to autodetect many things by locating relevant helper tools. For example, to find out which compiler flags it should use for compiling Apache modules, it locates the <span class="monospaced">apxs2</span> command and queries it. To find out which compiler flags it should use for libcurl, it queries the <span class="monospaced">curl-config</span> command. These commands may not be in <span class="monospaced">$PATH</span>, or even when they are you may want to use a different one.</p></div>
1789
1917
  <div class="paragraph"><p>You can often force the build to find certain command line tools at certain locations by using the following environment variables:</p></div>
1790
1918
  <div class="dlist"><dl>
@@ -1840,7 +1968,7 @@ export CXX='ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefi
1840
1968
  </div>
1841
1969
  </div>
1842
1970
  <div class="sect2">
1843
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_as_a_normal_nginx_module_without_using_the_installer"></span><h3 data-comment-topic="installing-as-a-normal-nginx-module-without-using-the-installer-1kkpes5" data-anchor="_installing_as_a_normal_nginx_module_without_using_the_installer">2.9. Installing as a normal Nginx module without using the installer</h3>
1971
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_as_a_normal_nginx_module_without_using_the_installer"></span><h3 data-comment-topic="installing-as-a-normal-nginx-module-without-using-the-installer-1kkpes5" data-anchor="_installing_as_a_normal_nginx_module_without_using_the_installer">2.10. Installing as a normal Nginx module without using the installer</h3>
1844
1972
  <div class="paragraph"><p>You can also install Phusion Passenger the way you install any other Nginx module, e.g. with <span class="monospaced">--add-module</span>. Run Nginx’s configure script with <span class="monospaced">--add-module=/path-to-passenger-root/ext/nginx</span>.</p></div>
1845
1973
  <div class="paragraph"><p>If you installed Phusion Passenger via the gem, then <em>path-to-passenger-root</em> can be obtained with the command:</p></div>
1846
1974
  <div class="listingblock">
@@ -1864,13 +1992,18 @@ line into your Nginx configuration file:</p></div>
1864
1992
  <div class="paragraph"><p>After having done so, restart Nginx.</p></div>
1865
1993
  </div>
1866
1994
  <div class="sect2">
1867
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="nginx_init_script"></span><h3 data-comment-topic="creating-an-nginx-init-script-1kd8zg5" data-anchor="nginx_init_script">2.10. Creating an Nginx init script</h3>
1995
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="nginx_init_script"></span><h3 data-comment-topic="creating-an-nginx-init-script-1kd8zg5" data-anchor="nginx_init_script">2.11. Creating an Nginx init script</h3>
1868
1996
  <div class="paragraph"><p>If you installed Nginx with one of the generic installation methods then you won’t have an init script to start, stop and restart Nginx with. A bare Nginx installation works with signals: you start it by invoking it from the command line, you stop it by sending SIGTERM to it and you gracefully restart it by sending SIGHUP to it.</p></div>
1869
1997
  <div class="paragraph"><p>If you prefer to use an init script then please refer to the following resources:</p></div>
1870
1998
  <div class="ulist"><ul>
1871
1999
  <li>
1872
2000
  <p>
1873
- <a href="http://wiki.nginx.org/Nginx-init-ubuntu">Init script for Ubuntu</a>
2001
+ <a href="http://wiki.nginx.org/Nginx-init-ubuntu">Init script for Ubuntu 8.04-9.10</a>
2002
+ </p>
2003
+ </li>
2004
+ <li>
2005
+ <p>
2006
+ <a href="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</a>
1874
2007
  </p>
1875
2008
  </li>
1876
2009
  <li>
@@ -1882,7 +2015,7 @@ line into your Nginx configuration file:</p></div>
1882
2015
  <div class="paragraph"><p>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.</p></div>
1883
2016
  </div>
1884
2017
  <div class="sect2">
1885
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_disabling_without_uninstalling"></span><h3 data-comment-topic="disabling-without-uninstalling-1t5tqan" data-anchor="_disabling_without_uninstalling">2.11. Disabling without uninstalling</h3>
2018
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_disabling_without_uninstalling"></span><h3 data-comment-topic="disabling-without-uninstalling-1t5tqan" data-anchor="_disabling_without_uninstalling">2.12. Disabling without uninstalling</h3>
1886
2019
  <div class="paragraph"><p>You can temporarily unload (disable) Phusion Passenger from the web server, without
1887
2020
  uninstalling the Phusion Passenger files, so that the web server behaves as if Phusion
1888
2021
  Passenger was never installed in the first place. This might be useful to you if -
@@ -1938,7 +2071,7 @@ http {
1938
2071
  <div class="paragraph"><p>After you’ve done this, save the configuration file and restart the web server.</p></div>
1939
2072
  </div>
1940
2073
  <div class="sect2">
1941
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="uninstalling"></span><h3 data-comment-topic="uninstalling-phusion-passenger-wuycvb" data-anchor="uninstalling">2.12. Uninstalling</h3>
2074
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="uninstalling"></span><h3 data-comment-topic="uninstalling-phusion-passenger-wuycvb" data-anchor="uninstalling">2.13. Uninstalling</h3>
1942
2075
  <div class="paragraph"><p>To uninstall Phusion Passenger, please first remove all Phusion Passenger
1943
2076
  configuration directives from your web server configuration file(s). After you’ve
1944
2077
  done this, you need to remove the Phusion Passenger files.</p></div>
@@ -1962,10 +2095,10 @@ If you installed Phusion Passenger through APT or YUM, then use them to uninstal
1962
2095
  </p>
1963
2096
  </li>
1964
2097
  </ul></div>
1965
- <div class="paragraph"><p>Nginx does not have to be recompiled. Altough it contains Phusion Passenger code, it will not do anything when Phusion Passenger is disabled.</p></div>
2098
+ <div class="paragraph"><p>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.</p></div>
1966
2099
  </div>
1967
2100
  <div class="sect2">
1968
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="moving_phusion_passenger"></span><h3 data-comment-topic="moving-to-a-different-directory-gif3wo" data-anchor="moving_phusion_passenger">2.13. Moving to a different directory</h3>
2101
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="moving_phusion_passenger"></span><h3 data-comment-topic="moving-to-a-different-directory-gif3wo" data-anchor="moving_phusion_passenger">2.14. Moving to a different directory</h3>
1969
2102
  <div class="paragraph"><p>If you installed Phusion Passenger through a tarball then you can move the Phusion Passenger directory to another location. This is not possible if you used any of the other installation methods.</p></div>
1970
2103
  <div class="paragraph"><p>First, move the directory to whereever you like:</p></div>
1971
2104
  <div class="listingblock">
@@ -2502,7 +2635,7 @@ $ some_awesome_editor passenger_wsgi.py
2502
2635
  $ cat passenger_wsgi.py
2503
2636
  def application(environ, start_response):
2504
2637
  start_response('200 OK', [('Content-Type', 'text/plain')])
2505
- return ["hello world!\n"]</pre>
2638
+ return [b"hello world!\n"]</pre>
2506
2639
  </div>
2507
2640
  </div>
2508
2641
  <div class="paragraph"><p>Finally, we deploy it by adding the following configuration options to
@@ -2593,9 +2726,10 @@ this option as well. Please read
2593
2726
  <div class="paragraph"><p>This required option may only occur once, in the <em>http</em> configuration block.</p></div>
2594
2727
  </div>
2595
2728
  <div class="sect2">
2596
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_ruby_lt_filename_gt"></span><h3 data-comment-topic="passenger-ruby-filename--1gnok5k" data-anchor="_passenger_ruby_lt_filename_gt">6.2. passenger_ruby &lt;filename&gt;</h3>
2597
- <div class="paragraph"><p>This option allows one to specify the Ruby interpreter to use.</p></div>
2598
- <div class="paragraph"><p>Since version 4.0.0, this option may occur in the following places:</p></div>
2729
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerRuby"></span><h3 data-comment-topic="passenger-ruby-filename--1gnok5k" data-anchor="PassengerRuby">6.2. passenger_ruby &lt;filename&gt;</h3>
2730
+ <div class="paragraph"><p>The <span class="monospaced">passenger_ruby</span> option allows one to specify the Ruby interpreter to use. Similarly, the <span class="monospaced">passenger_python</span> option is for specifying the Python interpreter.</p></div>
2731
+ <div class="paragraph"><p>In versions prior to 4.0.0, only a single Ruby version was supported for the entire Nginx instance, so <span class="monospaced">passenger_ruby</span> may only occur in the global server configuration. Also, the <span class="monospaced">passenger_python</span> option was not supported.</p></div>
2732
+ <div class="paragraph"><p>Since version 4.0.0, the <span class="monospaced">passenger_python</span> 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:</p></div>
2599
2733
  <div class="ulist"><ul>
2600
2734
  <li>
2601
2735
  <p>
@@ -2618,38 +2752,116 @@ In an <em>if</em> configuration scope.
2618
2752
  </p>
2619
2753
  </li>
2620
2754
  </ul></div>
2621
- <div class="paragraph"><p>If you want to use a different Ruby interpreter for two different applications then you should define different <span class="monospaced">passenger_ruby</span> directives in different <em>http</em> blocks.</p></div>
2622
- <div class="paragraph"><p>In versions prior to 4.0.0, only a single Ruby version is supported for the entire Nginx instance, so <span class="monospaced">passenger_ruby</span> may only occur in the <em>http</em> configuration block.</p></div>
2623
- <div class="paragraph"><p>The default value is <em>ruby</em>, meaning that the Ruby interpreter will be looked up according to the <span class="monospaced">PATH</span> environment variable.</p></div>
2755
+ <div class="paragraph"><p>The <span class="monospaced">passenger_ruby</span> in the <span class="monospaced">http</span> block - that is, the one that <span class="monospaced">passenger-install-nginx-module</span> outputs - is used for invoking certain Phusion Passenger tools that are written in Ruby, e.g. the internal helper script used by <a href="#PassengerPreStart">passenger_pre_start</a>. It is also used as the default Ruby interpreter for Ruby web apps. You don’t <strong>have</strong> to specify a <span class="monospaced">passenger_ruby</span> in the <span class="monospaced">http</span> block though, because the default is to use the first <span class="monospaced">ruby</span> command found in <span class="monospaced">$PATH</span>.</p></div>
2756
+ <div class="paragraph"><p>The <span class="monospaced">passenger_python</span> option works in a similar manner, but applies to Python instead.</p></div>
2757
+ <div class="paragraph"><p>You can also override <span class="monospaced">passenger_ruby</span> or <span class="monospaced">passenger_python</span> in specific contexts if you want to use a different Ruby/Python interpreter for that web app. For example:</p></div>
2758
+ <div class="listingblock">
2759
+ <div class="content monospaced">
2760
+ <pre>http {
2761
+ passenger_root ...;
2762
+
2763
+ # Use Ruby 1.8.7 by default.
2764
+ passenger_ruby /usr/bin/ruby1.8;
2765
+ # Use Python 2.6 by default.
2766
+ passenger_python /usr/bin/python2.6;
2767
+
2768
+ server {
2769
+ # This Rails web app will use Ruby 1.8.7
2770
+ listen 80;
2771
+ server_name www.foo.com;
2772
+ root /webapps/foo/public;
2773
+ }
2774
+
2775
+ server {
2776
+ # This Rails web app will use Ruby 1.9.3, as installed by RVM
2777
+ passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3/ruby;
2778
+
2779
+ listen 80;
2780
+ server_name www.bar.com;
2781
+ root /webapps/bar/public;
2782
+
2783
+ # If you have a web app deployed in a sub-URI, customize
2784
+ # passenger_ruby/passenger_python inside a `location` block.
2785
+ # The web app under www.bar.com/blog will use JRuby 1.7.1
2786
+ passenger_base_uri /blog;
2787
+ location /blog {
2788
+ passenger_ruby /usr/local/rvm/wrappers/jruby-1.7.1/ruby;
2789
+ }
2790
+ }
2791
+
2792
+ server {
2793
+ # This Flask web app will use Python 3.0
2794
+ passenger_python /usr/bin/python3.0;
2795
+
2796
+ listen 80;
2797
+ server_name www.baz.com;
2798
+ root /webapps/baz/public;
2799
+ }
2800
+ }</pre>
2801
+ </div>
2802
+ </div>
2803
+ <div class="paragraph">
2804
+ <div class="title">RVM helper tool</div>
2805
+ <p>Phusion Passenger provides the <span class="monospaced">passenger-config --ruby-command</span> 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.</p>
2806
+ </div>
2807
+ <div class="paragraph"><p>For this purpose we’ll want to invoke <span class="monospaced">passenger-config</span> using its full path, because each time you <span class="monospaced">rvm use</span> a different Ruby interpreter, RVM changes <span class="monospaced">$PATH</span>. If you did not install Phusion Passenger through the generic tarball installation method, then here’s how you can figure out where <span class="monospaced">passenger-config</span> is:</p></div>
2808
+ <div class="listingblock">
2809
+ <div class="content monospaced">
2810
+ <pre>$ which passenger-config
2811
+ /opt/passenger/bin/passenger-config</pre>
2812
+ </div>
2813
+ </div>
2814
+ <div class="paragraph"><p>Now, switch to all the RVM Ruby interpreters you want to use. In each interpreter, invoke <span class="monospaced">passenger-config --ruby-command</span>. For Ruby 1.8.7:</p></div>
2815
+ <div class="listingblock">
2816
+ <div class="content monospaced">
2817
+ <pre>$ rvm use 1.8.7
2818
+ $ /opt/passenger/bin/passenger-config --ruby-command
2819
+ passenger-config was invoked through the following Ruby interpreter:
2820
+ Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
2821
+ Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
2822
+ To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
2823
+ To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
2824
+ To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start
2825
+
2826
+ The following Ruby interpreter was found first in $PATH:
2827
+ Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
2828
+ Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
2829
+ To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
2830
+ To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
2831
+ To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start
2832
+
2833
+ ## Notes for RVM users
2834
+ 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'.</pre>
2835
+ </div>
2836
+ </div>
2837
+ <div class="paragraph"><p>Then, for Ruby 1.9.3:</p></div>
2838
+ <div class="listingblock">
2839
+ <div class="content monospaced">
2840
+ <pre>$ rvm use 1.9.3
2841
+ $ /opt/passenger/bin/passenger-config --ruby-command
2842
+ passenger-config was invoked through the following Ruby interpreter:
2843
+ Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
2844
+ Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
2845
+ To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
2846
+ To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
2847
+ To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start
2848
+
2849
+ The following Ruby interpreter was found first in $PATH:
2850
+ Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
2851
+ Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
2852
+ To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
2853
+ To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
2854
+ To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start
2855
+
2856
+ ## Notes for RVM users
2857
+ 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'.</pre>
2858
+ </div>
2859
+ </div>
2624
2860
  </div>
2625
2861
  <div class="sect2">
2626
2862
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_python_lt_filename_gt"></span><h3 data-comment-topic="passenger-python-filename--14p554" data-anchor="_passenger_python_lt_filename_gt">6.3. passenger_python &lt;filename&gt;</h3>
2627
2863
  <div class="paragraph"><p><strong>Introduced in version 4.0.0.</strong></p></div>
2628
- <div class="paragraph"><p>This option allows one to specify the Python interpreter to use. It may occur in the following places:</p></div>
2629
- <div class="ulist"><ul>
2630
- <li>
2631
- <p>
2632
- In the <em>http</em> configuration block.
2633
- </p>
2634
- </li>
2635
- <li>
2636
- <p>
2637
- In a <em>server</em> configuration block.
2638
- </p>
2639
- </li>
2640
- <li>
2641
- <p>
2642
- In a <em>location</em> configuration block.
2643
- </p>
2644
- </li>
2645
- <li>
2646
- <p>
2647
- In an <em>if</em> configuration scope.
2648
- </p>
2649
- </li>
2650
- </ul></div>
2651
- <div class="paragraph"><p>If you want to use a different Python interpreter for two different applications then you should define different <span class="monospaced">passenger_python</span> directives in different <em>http</em> blocks.</p></div>
2652
- <div class="paragraph"><p>The default value is <em>python</em>, meaning that the Python interpreter will be looked up according to the <span class="monospaced">PATH</span> environment variable.</p></div>
2864
+ <div class="paragraph"><p>This option allows one to specify the Python interpreter to use. See <a href="#PassengerRuby">passenger_ruby</a> for more information. The default value is <em>python</em>, meaning that the Python interpreter will be looked up according to the <span class="monospaced">PATH</span> environment variable.</p></div>
2653
2865
  </div>
2654
2866
  <div class="sect2">
2655
2867
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerAppRoot"></span><h3 data-comment-topic="passenger-app-root-path-to-root--1dbudc6" data-anchor="PassengerAppRoot">6.4. passenger_app_root &lt;path/to/root&gt;</h3>
@@ -3388,28 +3600,11 @@ In an <em>if</em> configuration scope.
3388
3600
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMaxPoolSize"></span><h4 data-comment-topic="passenger-max-pool-size-integer--3jzefs" data-anchor="PassengerMaxPoolSize">6.12.1. passenger_max_pool_size &lt;integer&gt;</h4>
3389
3601
  <div class="paragraph"><p>The maximum number of <a href="#application_process">application processes</a> that may
3390
3602
  simultanously exist. A larger number results in higher memory usage,
3391
- but improved ability to handle concurrent HTTP clients.</p></div>
3392
- <div class="paragraph"><p>The optimal value depends on your system’s hardware and the server’s average
3393
- load. You should experiment with different values. But generally speaking,
3394
- the value should be at least equal to the number of CPUs (or CPU cores) that
3395
- you have. If your system has 2 GB of RAM, then we recommend a value of <em>15</em>.
3396
- If your system is a Virtual Private Server (VPS) and has about 256 MB RAM, and
3397
- is also running other services such as MySQL, then we recommend a value of <em>2</em>.</p></div>
3398
- <div class="paragraph"><p>If you find that your server is unable to handle the load on your Rails/Rack websites
3399
- (i.e. running out of memory) then you should lower this value. (Though if your
3400
- sites are really that popular, then you should strongly consider upgrading your
3401
- hardware or getting more servers.)</p></div>
3603
+ but improves the ability to handle concurrent HTTP requests.</p></div>
3604
+ <div class="paragraph"><p>The optimal value depends on your system’s hardware and your workload. You can learn more at the Phusion article <a href="http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/">Tuning Phusion Passenger’s conurrency settings</a>.</p></div>
3605
+ <div class="paragraph"><p>If you find that your server is running out of memory then you should lower this value.</p></div>
3402
3606
  <div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
3403
3607
  The default value is <em>6</em>.</p></div>
3404
- <div class="admonitionblock">
3405
- <table><tr>
3406
- <td class="icon">
3407
- <img src="./images/icons/tip.png" alt="Tip">
3408
- </td>
3409
- <td class="content">We strongly recommend you to <a href="#reducing_memory_usage">use Ruby Enterprise Edition</a>. This allows you to reduce the memory usage of your Ruby on Rails applications
3410
- by about 33%, and it’s not hard to install.</td>
3411
- </tr></table>
3412
- </div>
3413
3608
  </div>
3414
3609
  <div class="sect3">
3415
3610
  <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMinInstances"></span><h4 data-comment-topic="passenger-min-instances-integer--uclykt" data-anchor="PassengerMinInstances">6.12.2. passenger_min_instances &lt;integer&gt;</h4>
@@ -5252,7 +5447,7 @@ has no effect.</p></div>
5252
5447
  <div id="footnotes"><hr></div>
5253
5448
  <div id="footer">
5254
5449
  <div id="footer-text">
5255
- Last updated 2013-03-03 11:14:55 CET
5450
+ Last updated 2013-03-17 14:06:54 CET
5256
5451
  </div>
5257
5452
  </div>
5258
5453
  <script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */