passenger 3.9.2.beta → 4.0.0.rc4
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/.travis.yml +3 -0
- data/NEWS +77 -7
- data/README.md +3 -11
- data/bin/passenger-install-apache2-module +24 -20
- data/bin/passenger-install-nginx-module +25 -23
- data/build/agents.rb +11 -0
- data/build/apache2.rb +9 -5
- data/build/basics.rb +37 -30
- data/build/common_library.rb +4 -1
- data/build/cplusplus_support.rb +5 -5
- data/build/cxx_tests.rb +28 -8
- data/build/integration_tests.rb +6 -3
- data/build/nginx.rb +3 -3
- data/build/packaging.rb +95 -57
- data/build/ruby_extension.rb +34 -21
- data/build/ruby_tests.rb +4 -2
- data/build/test_basics.rb +1 -1
- data/dev/run_travis.sh +36 -1
- data/doc/Users guide Apache.html +425 -308
- data/doc/Users guide Apache.idmap.txt +78 -70
- data/doc/Users guide Apache.index.sqlite3 +0 -0
- data/doc/Users guide Apache.txt +33 -92
- data/doc/Users guide Nginx.html +519 -220
- data/doc/Users guide Nginx.idmap.txt +78 -60
- data/doc/Users guide Nginx.txt +115 -26
- data/doc/Users guide Standalone.html +8 -2
- data/doc/users_guide_snippets/analysis_and_system_maintenance.txt +1 -7
- data/doc/users_guide_snippets/installation.txt +167 -22
- data/doc/users_guide_snippets/rackup_specifications.txt +4 -0
- data/doc/users_guide_snippets/since_version.txt +1 -0
- data/doc/users_guide_snippets/support_information.txt +3 -7
- data/doc/users_guide_snippets/tips.txt +0 -24
- data/ext/apache2/Configuration.cpp +11 -33
- data/ext/apache2/Configuration.hpp +3 -18
- data/ext/apache2/DirectoryMapper.h +20 -70
- data/ext/apache2/Hooks.cpp +2 -2
- data/ext/common/AgentsStarter.cpp +0 -2
- data/ext/common/AgentsStarter.h +0 -1
- data/ext/common/AgentsStarter.hpp +1 -3
- data/ext/common/ApplicationPool2/AppTypes.cpp +74 -0
- data/ext/common/ApplicationPool2/AppTypes.h +202 -0
- data/ext/common/ApplicationPool2/Common.h +12 -10
- data/ext/common/ApplicationPool2/DirectSpawner.h +256 -0
- data/ext/common/ApplicationPool2/DummySpawner.h +90 -0
- data/ext/common/ApplicationPool2/Group.h +311 -94
- data/ext/common/ApplicationPool2/Implementation.cpp +405 -145
- data/ext/common/ApplicationPool2/Options.h +24 -26
- data/ext/common/ApplicationPool2/PipeWatcher.h +20 -13
- data/ext/common/ApplicationPool2/Pool.h +326 -183
- data/ext/common/ApplicationPool2/Process.h +205 -55
- data/ext/common/ApplicationPool2/README.md +1 -1
- data/ext/common/ApplicationPool2/Session.h +21 -10
- data/ext/common/ApplicationPool2/SmartSpawner.h +801 -0
- data/ext/common/ApplicationPool2/Spawner.h +141 -1149
- data/ext/common/ApplicationPool2/SpawnerFactory.h +132 -0
- data/ext/common/ApplicationPool2/SuperGroup.h +146 -223
- data/ext/common/Constants.h +4 -2
- data/ext/common/Exceptions.h +23 -1
- data/ext/common/Logging.cpp +17 -6
- data/ext/common/Logging.h +37 -7
- data/ext/common/ResourceLocator.h +1 -1
- data/ext/common/Utils.cpp +49 -1
- data/ext/common/Utils.h +13 -4
- data/ext/common/{AnsiColorConstants.h → Utils/AnsiColorConstants.h} +0 -0
- data/ext/common/{BCrypt.cpp → Utils/BCrypt.cpp} +0 -0
- data/ext/common/{BCrypt.h → Utils/BCrypt.h} +0 -0
- data/ext/common/{Blowfish.c → Utils/Blowfish.c} +0 -0
- data/ext/common/{Blowfish.h → Utils/Blowfish.h} +0 -0
- data/ext/common/Utils/CachedFileStat.hpp +27 -25
- data/ext/common/Utils/Curl.h +184 -0
- data/ext/common/{HttpConstants.h → Utils/HttpConstants.h} +3 -0
- data/ext/common/Utils/IOUtils.cpp +6 -2
- data/ext/common/{IniFile.h → Utils/IniFile.h} +0 -0
- data/ext/common/Utils/LargeFiles.cpp +30 -0
- data/ext/common/Utils/LargeFiles.h +40 -0
- data/ext/common/Utils/StrIntUtils.cpp +72 -8
- data/ext/common/Utils/StrIntUtils.h +24 -2
- data/ext/common/Utils/StringMap.h +12 -2
- data/ext/common/Utils/VariantMap.h +51 -2
- data/ext/common/Utils/jsoncpp.cpp +1 -1
- data/ext/common/agents/Base.cpp +147 -11
- data/ext/common/agents/HelperAgent/AgentOptions.h +14 -6
- data/ext/common/agents/HelperAgent/Main.cpp +79 -19
- data/ext/common/agents/HelperAgent/RequestHandler.h +36 -16
- data/ext/common/agents/LoggingAgent/LoggingServer.h +3 -5
- data/ext/common/agents/LoggingAgent/Main.cpp +2 -4
- data/ext/common/agents/LoggingAgent/RemoteSender.h +18 -24
- data/ext/common/agents/SpawnPreparer.cpp +7 -0
- data/ext/common/agents/Watchdog/Main.cpp +96 -38
- data/ext/nginx/Configuration.c +26 -22
- data/ext/nginx/Configuration.h +4 -2
- data/ext/nginx/ContentHandler.c +23 -52
- data/ext/nginx/ContentHandler.h +5 -11
- data/ext/nginx/config +10 -3
- data/ext/nginx/ngx_http_passenger_module.c +21 -6
- data/ext/nginx/ngx_http_passenger_module.h +4 -1
- data/ext/oxt/dynamic_thread_group.hpp +9 -1
- data/ext/oxt/system_calls.cpp +2 -2
- data/ext/ruby/extconf.rb +2 -1
- data/helper-scripts/backtrace-sanitizer.rb +2 -0
- data/helper-scripts/wsgi-loader.py +54 -21
- data/lib/phusion_passenger.rb +5 -3
- data/lib/phusion_passenger/abstract_installer.rb +18 -41
- data/lib/phusion_passenger/admin_tools/memory_stats.rb +2 -2
- data/lib/phusion_passenger/admin_tools/server_instance.rb +2 -2
- data/lib/phusion_passenger/common_library.rb +23 -3
- data/lib/phusion_passenger/debug_logging.rb +10 -3
- data/lib/phusion_passenger/packaging.rb +1 -0
- data/lib/phusion_passenger/platform_info.rb +113 -115
- data/lib/phusion_passenger/platform_info/compiler.rb +224 -134
- data/lib/phusion_passenger/platform_info/cxx_portability.rb +143 -0
- data/lib/phusion_passenger/platform_info/depcheck.rb +371 -0
- data/lib/phusion_passenger/platform_info/depcheck_specs/apache2.rb +124 -0
- data/lib/phusion_passenger/platform_info/depcheck_specs/compiler_toolchain.rb +97 -0
- data/lib/phusion_passenger/platform_info/depcheck_specs/gems.rb +39 -0
- data/lib/phusion_passenger/platform_info/depcheck_specs/libs.rb +118 -0
- data/lib/phusion_passenger/platform_info/depcheck_specs/ruby.rb +137 -0
- data/lib/phusion_passenger/platform_info/depcheck_specs/utilities.rb +15 -0
- data/lib/phusion_passenger/platform_info/operating_system.rb +6 -5
- data/lib/phusion_passenger/platform_info/ruby.rb +45 -34
- data/lib/phusion_passenger/request_handler.rb +35 -22
- data/lib/phusion_passenger/request_handler/thread_handler.rb +5 -6
- data/lib/phusion_passenger/ruby_core_enhancements.rb +7 -1
- data/lib/phusion_passenger/standalone/runtime_installer.rb +43 -34
- data/lib/phusion_passenger/utils/robust_interruption.rb +34 -18
- data/passenger.gemspec +25 -0
- data/resources/templates/standalone/config.erb +3 -1
- data/test/config.json.travis +2 -2
- data/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp +37 -5
- data/test/cxx/ApplicationPool2/PoolTest.cpp +143 -50
- data/test/cxx/ApplicationPool2/ProcessTest.cpp +8 -0
- data/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp +28 -17
- data/test/cxx/ApplicationPool2/SpawnerTestCases.cpp +31 -26
- data/test/cxx/RequestHandlerTest.cpp +17 -1
- data/test/cxx/UtilsTest.cpp +84 -10
- data/test/integration_tests/apache2_tests.rb +49 -163
- data/test/integration_tests/hello_world_wsgi_spec.rb +2 -2
- data/test/integration_tests/mycook_spec.rb +1 -1
- data/test/integration_tests/nginx_tests.rb +37 -19
- data/test/ruby/request_handler_spec.rb +1 -0
- data/test/ruby/spec_helper.rb +52 -1
- data/test/stub/nginx/nginx.conf.erb +2 -0
- data/test/stub/rack/start.rb +5 -0
- data/test/stub/rails3.0/Gemfile.lock +30 -30
- data/test/stub/rails3.1/Gemfile +1 -1
- data/test/stub/rails3.1/Gemfile.lock +3 -3
- data/test/stub/rails3.2/Gemfile +1 -1
- data/test/stub/rails3.2/Gemfile.lock +4 -4
- data/test/stub/rails_apps/2.3/mycook/app/controllers/welcome_controller.rb +1 -1
- data/test/stub/rails_apps/2.3/mycook/app/helpers/recipes_helper.rb +2 -0
- data/test/stub/rails_apps/2.3/mycook/app/helpers/test_helper.rb +2 -0
- data/test/stub/rails_apps/2.3/mycook/app/helpers/uploads_helper.rb +2 -0
- data/test/stub/rails_apps/2.3/mycook/app/helpers/welcome_helper.rb +2 -0
- data/test/support/nginx_controller.rb +2 -1
- metadata +160 -156
- data/build/gempackagetask.rb +0 -99
- data/build/packagetask.rb +0 -186
- data/ext/common/StringListCreator.h +0 -83
- data/lib/phusion_passenger/dependencies.rb +0 -657
@@ -20,25 +20,35 @@
|
|
20
20
|
|
21
21
|
2. Installation => installing-upgrading-and-uninstalling-phusion-passenger-laryvs
|
22
22
|
|
23
|
-
2.1.
|
23
|
+
2.1. Synopsis => synopsis-l0om5d
|
24
24
|
|
25
|
-
2.2. Generic installation, upgrade and downgrade method: via
|
25
|
+
2.2. Generic installation, upgrade and downgrade method: via RubyGems => installing-via-the-gem-39jw1u
|
26
26
|
|
27
|
-
2.3.
|
27
|
+
2.3. Generic installation, upgrade and downgrade method: via tarball => installing-via-the-source-tarball-1cgxrqc
|
28
28
|
|
29
|
-
2.4. Installing or upgrading on
|
29
|
+
2.4. Installing or upgrading on Debian 6 or Ubuntu => installing-or-upgrading-on-ubuntu-1xg22xs
|
30
30
|
|
31
|
-
2.5.
|
31
|
+
2.5. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux => installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1y5ie8b
|
32
32
|
|
33
|
-
2.6.
|
33
|
+
2.6. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-b17h8g
|
34
34
|
|
35
|
-
2.7.
|
35
|
+
2.7. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-1arnxii
|
36
36
|
|
37
|
-
2.8.
|
37
|
+
2.8. Customizing the compilation process => customizing-the-compilation-process-1sds3od
|
38
38
|
|
39
|
-
2.
|
39
|
+
2.8.1. Setting the compiler => setting-the-compiler-1symq7h
|
40
40
|
|
41
|
-
2.
|
41
|
+
2.8.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-wzu0ey
|
42
|
+
|
43
|
+
2.8.3. Forcing location of certain command line tools => forcing-location-of-certain-command-line-tools-1hym30u
|
44
|
+
|
45
|
+
2.9. Working with the Apache configuration file => locating-the-apache-configuration-file-1fterqv
|
46
|
+
|
47
|
+
2.10. Disabling without uninstalling => unloading-disabling-phusion-passenger-from-apache-without-uninstalling-it-s1axnx
|
48
|
+
|
49
|
+
2.11. Uninstalling => uninstalling-phusion-passenger-1qb4ssq
|
50
|
+
|
51
|
+
2.12. Moving to a different directory => moving-to-a-different-directory-1n0gkwh
|
42
52
|
|
43
53
|
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
|
44
54
|
|
@@ -90,109 +100,109 @@
|
|
90
100
|
|
91
101
|
6.2. PassengerRuby <filename> => passengerruby-filename--1r3fv73
|
92
102
|
|
93
|
-
6.3.
|
103
|
+
6.3. PassengerPython <filename> => passengerpython-filename--1ssesv3
|
94
104
|
|
95
|
-
6.4.
|
105
|
+
6.4. PassengerAppRoot <path/to/root> => passengerapproot-path-to-root--uf24yd
|
96
106
|
|
97
|
-
6.5.
|
107
|
+
6.5. PassengerSpawnMethod <string> => passengerspawnmethod-string--sodg2y
|
98
108
|
|
99
|
-
6.6.
|
109
|
+
6.6. PassengerEnabled <on|off> => passengerenabled-on-off--74rzth
|
100
110
|
|
101
|
-
6.7.
|
111
|
+
6.7. PassengerTempDir <directory> => passengertempdir-directory--68h2ng
|
102
112
|
|
103
|
-
6.8.
|
113
|
+
6.8. PassengerUploadBufferDir <directory> => passengeruploadbufferdir-directory--kdr8at
|
104
114
|
|
105
|
-
6.9.
|
115
|
+
6.9. PassengerRestartDir <directory> => passengerrestartdir-directory--1fmhmv0
|
106
116
|
|
107
|
-
6.10.
|
117
|
+
6.10. PassengerBufferResponse <on|off> => passengerbufferresponse-on-off--1y7ilka
|
108
118
|
|
109
|
-
6.11.
|
119
|
+
6.11. PassengerRollingRestarts <on|off> => passengerrollingrestarts
|
110
120
|
|
111
|
-
6.12.
|
121
|
+
6.12. PassengerResistDeploymentErrors <on|off> => passengerresistdeploymenterrors
|
112
122
|
|
113
|
-
6.
|
123
|
+
6.13. Security options => security-options-1pb75ho
|
114
124
|
|
115
|
-
6.
|
125
|
+
6.13.1. PassengerUserSwitching <on|off> => passengeruserswitching
|
116
126
|
|
117
|
-
6.
|
127
|
+
6.13.2. PassengerUser <username> => passengeruser
|
118
128
|
|
119
|
-
6.
|
129
|
+
6.13.3. PassengerGroup <group name> => passengergroup
|
120
130
|
|
121
|
-
6.
|
131
|
+
6.13.4. PassengerDefaultUser <username> => passengerdefaultuser
|
122
132
|
|
123
|
-
6.
|
133
|
+
6.13.5. PassengerDefaultGroup <group name> => passengerdefaultgroup
|
124
134
|
|
125
|
-
6.13.
|
135
|
+
6.13.6. PassengerFriendlyErrorPages <on|off> => passengerfriendlyerrorpages
|
126
136
|
|
127
|
-
6.
|
137
|
+
6.14. Resource control and optimization options => resource-control-and-optimization-options-zu2f7u
|
128
138
|
|
129
|
-
6.
|
139
|
+
6.14.1. PassengerMaxPoolSize <integer> => passengermaxpoolsize-integer--am64q8
|
130
140
|
|
131
|
-
6.
|
141
|
+
6.14.2. PassengerMinInstances <integer> => passengermininstances-integer--wegq6b
|
132
142
|
|
133
|
-
6.
|
143
|
+
6.14.3. PassengerMaxInstances <integer> => passengermaxinstances
|
134
144
|
|
135
|
-
6.
|
145
|
+
6.14.4. PassengerMaxInstancesPerApp <integer> => passengermaxinstancesperapp
|
136
146
|
|
137
|
-
6.
|
147
|
+
6.14.5. PassengerPoolIdleTime <integer> => passengerpoolidletime-integer--a3gunq
|
138
148
|
|
139
|
-
6.
|
149
|
+
6.14.6. PassengerMaxPreloaderIdleTime <integer> => railsappspawneridletime-integer--1awgog1
|
140
150
|
|
141
|
-
6.
|
151
|
+
6.14.7. PassengerConcurrencyModel <process|thread> => passengerconcurrencymodel-process-thread--1eipofj
|
142
152
|
|
143
|
-
6.
|
153
|
+
6.14.8. PassengerThreadCount <number> => passengerthreadcount-number--10jl64a
|
144
154
|
|
145
|
-
6.
|
155
|
+
6.14.9. PassengerMaxRequests <integer> => passengermaxrequests-integer--17qkw9n
|
146
156
|
|
147
|
-
6.
|
157
|
+
6.14.10. PassengerMaxRequestTime <seconds> => passengermaxrequesttime-seconds--127v1i2
|
148
158
|
|
149
|
-
6.
|
159
|
+
6.14.11. PassengerMemoryLimit <integer> => passengermemorylimit-integer--18irza1
|
150
160
|
|
151
|
-
6.
|
161
|
+
6.14.12. PassengerStatThrottleRate <integer> => passengerstatthrottlerate-integer--1dcfda3
|
152
162
|
|
153
|
-
6.13.
|
163
|
+
6.14.13. PassengerPreStart <url> => passengerprestart-url--1utb57k
|
154
164
|
|
155
|
-
6.14.
|
165
|
+
6.14.14. PassengerHighPerformance <on|off> => passengerhighperformance-on-off--nvfa86
|
156
166
|
|
157
|
-
6.
|
167
|
+
6.15. Compatibility options => compatibility-options-8jve5a
|
158
168
|
|
159
|
-
6.
|
169
|
+
6.15.1. PassengerResolveSymlinksInDocumentRoot <on|off> => passengerresolvesymlinksindocumentroot-on-off--1r0qcp8
|
160
170
|
|
161
|
-
6.15.
|
171
|
+
6.15.2. PassengerAllowEncodedSlashes <on|off> => passengerallowencodedslashes-on-off--1y3s1ww
|
162
172
|
|
163
|
-
6.
|
173
|
+
6.16. Logging and debugging options => logging-and-debugging-options-el2cuc
|
164
174
|
|
165
|
-
6.
|
175
|
+
6.16.1. PassengerLogLevel <integer> => passengerloglevel-integer--s3kbil
|
166
176
|
|
167
|
-
6.
|
177
|
+
6.16.2. PassengerDebugLogFile <filename> => passengerdebuglogfile-filename--1wjm2j1
|
168
178
|
|
169
|
-
6.16.
|
179
|
+
6.16.3. PassengerDebugger <on|off> => passengerdebugger-on-off--19you7e
|
170
180
|
|
171
|
-
6.
|
181
|
+
6.17. Classic Ruby on Rails (⇐ 2.x)-specific options => ruby-on-rails-specific-options-1t10wfu
|
172
182
|
|
173
|
-
6.
|
183
|
+
6.17.1. RailsBaseURI <uri> => railsbaseuri-uri--1txrw3k
|
174
184
|
|
175
|
-
6.
|
185
|
+
6.17.2. RailsEnv <string> => railsenv-string--1b0xxvu
|
176
186
|
|
177
|
-
6.
|
187
|
+
6.18. Rack and Rails >= 3 specific options => rack-specific-options-wk9qzt
|
178
188
|
|
179
|
-
6.
|
189
|
+
6.18.1. RackBaseURI <uri> => rackbaseuri-uri--1to24pj
|
180
190
|
|
181
|
-
6.
|
191
|
+
6.18.2. RackEnv <string> => rackenv-string--vve9py
|
182
192
|
|
183
|
-
6.
|
193
|
+
6.19. Deprecated or removed options => deprecated-options-pm9m57
|
184
194
|
|
185
|
-
6.
|
195
|
+
6.19.1. RailsRuby => railsruby-ht09ei
|
186
196
|
|
187
|
-
6.
|
197
|
+
6.19.2. RailsUserSwitching => railsuserswitching-1npx8y4
|
188
198
|
|
189
|
-
6.
|
199
|
+
6.19.3. RailsDefaultUser => railsdefaultuser-19j7n3m
|
190
200
|
|
191
|
-
6.
|
201
|
+
6.19.4. RailsAllowModRewrite => railsallowmodrewrite-1vkziro
|
192
202
|
|
193
|
-
6.
|
203
|
+
6.19.5. RailsSpawnMethod => railsspawnmethod-1aljgpa
|
194
204
|
|
195
|
-
6.
|
205
|
+
6.19.6. RailsAutoDetect, RackAutoDetect and WsgiAutoDetect => railsautodetect-rackautodetect-and-wsgiautodetect-1qgakzs
|
196
206
|
|
197
207
|
7. Troubleshooting => troubleshooting-2ihihi
|
198
208
|
|
@@ -260,19 +270,17 @@
|
|
260
270
|
|
261
271
|
9.4. Bundler support => bundler-support-cf72ih
|
262
272
|
|
263
|
-
9.5.
|
264
|
-
|
265
|
-
9.6. Installing multiple Ruby on Rails versions => installing-multiple-ruby-on-rails-versions-mi5j14
|
273
|
+
9.5. Installing multiple Ruby on Rails versions => installing-multiple-ruby-on-rails-versions-mi5j14
|
266
274
|
|
267
|
-
9.
|
275
|
+
9.6. Making the application restart after each request => making-the-application-restart-after-each-request-183bezx
|
268
276
|
|
269
|
-
9.
|
277
|
+
9.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-a63b6r
|
270
278
|
|
271
|
-
9.
|
279
|
+
9.8. Out-of-Band Garbage Work and Out-of-Band Garbage Collection => out-of-band-garbage-work-and-out-of-band-garbage-collection-kav2p8
|
272
280
|
|
273
|
-
9.
|
281
|
+
9.9. X-Sendfile support => x-sendfile-support-1cgyykw
|
274
282
|
|
275
|
-
9.
|
283
|
+
9.10. Upload progress => upload-progress-71cyl7
|
276
284
|
|
277
285
|
10. Under the hood => under-the-hood-21ue5t
|
278
286
|
|
Binary file
|
data/doc/Users guide Apache.txt
CHANGED
@@ -491,14 +491,33 @@ This required option may only occur once, in the global server configuration.
|
|
491
491
|
=== PassengerRuby <filename> ===
|
492
492
|
This option allows one to specify the Ruby interpreter to use.
|
493
493
|
|
494
|
-
|
494
|
+
Since version 4.0.0, this option may occur in the following places:
|
495
|
+
|
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.
|
500
|
+
|
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.
|
502
|
+
|
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.
|
504
|
+
|
505
|
+
The default value is 'ruby', meaning that the Ruby interpreter will be looked up according to the `PATH` environment variable.
|
506
|
+
|
507
|
+
=== PassengerPython <filename> ===
|
508
|
+
:version: 4.0.0
|
509
|
+
include::users_guide_snippets/since_version.txt[]
|
510
|
+
|
511
|
+
This option allows one to specify the Python interpreter to use. It may occur in the following places:
|
495
512
|
|
496
513
|
* In the global server configuration.
|
497
514
|
* In a virtual host configuration block.
|
498
515
|
* In a `<Directory>` or `<Location>` block.
|
499
516
|
* In '.htaccess', if `AllowOverride Options` is on.
|
500
517
|
|
501
|
-
|
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.
|
519
|
+
|
520
|
+
The default value is 'python', meaning that the Python interpreter will be looked up according to the `PATH` environment variable.
|
502
521
|
|
503
522
|
[[PassengerAppRoot]]
|
504
523
|
=== PassengerAppRoot <path/to/root> ===
|
@@ -553,6 +572,7 @@ This option may occur in the following places:
|
|
553
572
|
|
554
573
|
In each place, it may be specified at most once. The default value is 'smart-lv2'.
|
555
574
|
|
575
|
+
[[PassengerEnabled]]
|
556
576
|
=== PassengerEnabled <on|off> ===
|
557
577
|
You can set this option to 'off' to completely disable Phusion Passenger for
|
558
578
|
a certain location. This is useful if, for example, you want to integrate a PHP
|
@@ -1270,33 +1290,17 @@ This option may occur in the following places:
|
|
1270
1290
|
* In a `<Directory>` or `<Location>` block.
|
1271
1291
|
* In '.htaccess', if `AllowOverride Limits` is on.
|
1272
1292
|
|
1273
|
-
In each place, it may be specified at most once. The default value is '
|
1293
|
+
In each place, it may be specified at most once. The default value is '0'.
|
1274
1294
|
|
1275
1295
|
[NOTE]
|
1276
1296
|
.A word about permissions
|
1277
1297
|
=====================================================
|
1278
|
-
The <<PassengerMemoryLimit,PassengerMemoryLimit>> directive
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
this directive and your `/proc` permissions are too tight, then please consider
|
1285
|
-
untightening the permissions.
|
1286
|
-
=====================================================
|
1287
|
-
|
1288
|
-
[TIP]
|
1289
|
-
.FreeBSD and `/proc`
|
1290
|
-
=====================================================
|
1291
|
-
On many FreeBSD systems, `/proc` is not mounted by default. `/proc` *must* be
|
1292
|
-
mounted in order for <<PassengerMemoryLimit,PassengerMemoryLimit>> to work.
|
1293
|
-
|
1294
|
-
It is also advised that you mount `/proc` with the `linprocfs` filesystem type
|
1295
|
-
instead of the regular FreeBSD `proc` filesystem type. The `linprocfs` filesystem
|
1296
|
-
type allows Phusion Passenger to read memory information from `/proc` directly,
|
1297
|
-
which is very fast. If you mount `/proc` with a different filesystem type, then
|
1298
|
-
Phusion Passenger must resort to querying memory information from the `ps` command,
|
1299
|
-
which is a lot slower.
|
1298
|
+
The <<PassengerMemoryLimit,PassengerMemoryLimit>> directive uses
|
1299
|
+
`ps` command to query memory usage information. On Linux, it further
|
1300
|
+
queries `/proc` to obtain additional memory usage information that's
|
1301
|
+
not obtainable through `ps`. You should ensure that the `ps` works
|
1302
|
+
correctly and that the `/proc` filesystem is accessible by the
|
1303
|
+
`PassengerHelperAgent` process.
|
1300
1304
|
=====================================================
|
1301
1305
|
|
1302
1306
|
[CAUTION]
|
@@ -1739,39 +1743,6 @@ In each place, it may be specified at most once. The default value is 'off'.
|
|
1739
1743
|
These options only have effect on classic Ruby on Rails 1.x and 2.x applications.
|
1740
1744
|
Ruby on Rails >= 3.x applications are considered Rack applications.
|
1741
1745
|
|
1742
|
-
==== RailsAutoDetect <on|off> ====
|
1743
|
-
Whether Phusion Passenger should automatically detect whether a virtual host's
|
1744
|
-
document root is a Ruby on Rails application. The default is 'on'.
|
1745
|
-
|
1746
|
-
This option may occur in the global server configuration or in a virtual host
|
1747
|
-
configuration block.
|
1748
|
-
|
1749
|
-
For example, consider the following configuration:
|
1750
|
-
|
1751
|
-
-----------------------------
|
1752
|
-
RailsAutoDetect off
|
1753
|
-
<VirtualHost *:80>
|
1754
|
-
ServerName www.mycook.com
|
1755
|
-
DocumentRoot /webapps/mycook/public
|
1756
|
-
</VirtualHost>
|
1757
|
-
-----------------------------
|
1758
|
-
|
1759
|
-
If one goes to 'http://www.mycook.com/', the visitor will see the contents of
|
1760
|
-
the '/webapps/mycook/public' folder, instead of the output of the Ruby on Rails
|
1761
|
-
application.
|
1762
|
-
|
1763
|
-
It is possible to explicitly specify that the host is a Ruby on Rails
|
1764
|
-
application by using the <<RailsBaseURI,RailsBaseURI>> configuration option:
|
1765
|
-
|
1766
|
-
-----------------------------
|
1767
|
-
RailsAutoDetect off
|
1768
|
-
<VirtualHost *:80>
|
1769
|
-
ServerName www.mycook.com
|
1770
|
-
DocumentRoot /webapps/mycook/public
|
1771
|
-
RailsBaseURI / # This line has been added.
|
1772
|
-
</VirtualHost>
|
1773
|
-
-----------------------------
|
1774
|
-
|
1775
1746
|
[[RailsBaseURI]]
|
1776
1747
|
==== RailsBaseURI <uri> ====
|
1777
1748
|
Used to specify that the given URI is a Rails application. See
|
@@ -1802,39 +1773,6 @@ In each place, it may be specified at most once. The default value is 'productio
|
|
1802
1773
|
|
1803
1774
|
=== Rack and Rails >= 3 specific options ===
|
1804
1775
|
|
1805
|
-
==== RackAutoDetect <on|off> ====
|
1806
|
-
Whether Phusion Passenger should automatically detect whether a virtual host's
|
1807
|
-
document root is a Rack application. The default is 'on'.
|
1808
|
-
|
1809
|
-
This option may occur in the global server configuration or in a virtual host
|
1810
|
-
configuration block.
|
1811
|
-
|
1812
|
-
For example, consider the following configuration:
|
1813
|
-
|
1814
|
-
-----------------------------
|
1815
|
-
RackAutoDetect off
|
1816
|
-
<VirtualHost *:80>
|
1817
|
-
ServerName www.rackapp.com
|
1818
|
-
DocumentRoot /webapps/my_rack_app/public
|
1819
|
-
</VirtualHost>
|
1820
|
-
-----------------------------
|
1821
|
-
|
1822
|
-
If one goes to 'http://www.rackapp.com/', the visitor will see the contents of
|
1823
|
-
the '/webapps/my_rack_app/public' folder, instead of the output of the Rack
|
1824
|
-
application.
|
1825
|
-
|
1826
|
-
It is possible to explicitly specify that the host is a Rack
|
1827
|
-
application by using the <<RackBaseURI,RackBaseURI>> configuration option:
|
1828
|
-
|
1829
|
-
-----------------------------
|
1830
|
-
RackAutoDetect off
|
1831
|
-
<VirtualHost *:80>
|
1832
|
-
ServerName www.rackapp.com
|
1833
|
-
DocumentRoot /webapps/my_rack_app/public
|
1834
|
-
RackBaseURI / # This line was added
|
1835
|
-
</VirtualHost>
|
1836
|
-
-----------------------------
|
1837
|
-
|
1838
1776
|
[[RackBaseURI]]
|
1839
1777
|
==== RackBaseURI <uri> ====
|
1840
1778
|
Used to specify that the given URI is a Rack application. See
|
@@ -1865,7 +1803,7 @@ This option may occur in the following places:
|
|
1865
1803
|
|
1866
1804
|
In each place, it may be specified at most once. The default value is 'production'.
|
1867
1805
|
|
1868
|
-
=== Deprecated options ===
|
1806
|
+
=== Deprecated or removed options ===
|
1869
1807
|
|
1870
1808
|
The following options have been deprecated, but are still supported for backwards
|
1871
1809
|
compatibility reasons.
|
@@ -1885,6 +1823,9 @@ This option doesn't do anything anymore in recent versions of Phusion Passenger.
|
|
1885
1823
|
==== RailsSpawnMethod ====
|
1886
1824
|
Deprecated in favor of <<PassengerSpawnMethod,PassengerSpawnMethod>>.
|
1887
1825
|
|
1826
|
+
==== RailsAutoDetect, RackAutoDetect and WsgiAutoDetect ====
|
1827
|
+
These options have been removed in version 4.0.0 as part of an optimization. You should use <<PassengerEnabled,PassengerEnabled>> instead.
|
1828
|
+
|
1888
1829
|
|
1889
1830
|
[[troubleshooting]]
|
1890
1831
|
== Troubleshooting ==
|
data/doc/Users guide Nginx.html
CHANGED
@@ -1105,16 +1105,22 @@ using the command line.</p></div>
|
|
1105
1105
|
<div class="foo toclevel3"><a href="#_supported_operating_systems">1.1. Supported operating systems</a></div>
|
1106
1106
|
<div class="foo toclevel3"><a href="#_where_to_get_support">1.2. Where to get support</a></div>
|
1107
1107
|
<div class="foo toclevel2"><a href="#_installation">2. Installation</a></div>
|
1108
|
-
<div class="foo toclevel3"><a href="#
|
1109
|
-
<div class="foo toclevel3"><a href="#
|
1110
|
-
<div class="foo toclevel3"><a href="#
|
1111
|
-
<div class="foo toclevel3"><a href="#
|
1112
|
-
<div class="foo toclevel3"><a href="#
|
1113
|
-
<div class="foo toclevel3"><a href="#
|
1114
|
-
<div class="foo toclevel3"><a href="#
|
1115
|
-
<div class="foo toclevel3"><a href="#
|
1116
|
-
<div class="foo
|
1117
|
-
<div class="foo
|
1108
|
+
<div class="foo toclevel3"><a href="#_synopsis">2.1. Synopsis</a></div>
|
1109
|
+
<div class="foo toclevel3"><a href="#rubygems_generic_install">2.2. Generic installation, upgrade and downgrade method: via RubyGems</a></div>
|
1110
|
+
<div class="foo toclevel3"><a href="#tarball_generic_install">2.3. Generic installation, upgrade and downgrade method: via tarball</a></div>
|
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
|
+
<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
|
+
<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>
|
1118
1124
|
<div class="foo toclevel2"><a href="#deploying_a_ror_app">3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3) application</a></div>
|
1119
1125
|
<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>
|
1120
1126
|
<div class="foo toclevel3"><a href="#deploying_rails_to_sub_uri">3.2. Deploying to a sub URI</a></div>
|
@@ -1140,50 +1146,54 @@ using the command line.</p></div>
|
|
1140
1146
|
<div class="foo toclevel2"><a href="#_configuring_phusion_passenger">6. Configuring Phusion Passenger</a></div>
|
1141
1147
|
<div class="foo toclevel3"><a href="#_passenger_root_lt_directory_gt">6.1. passenger_root <directory></a></div>
|
1142
1148
|
<div class="foo toclevel3"><a href="#_passenger_ruby_lt_filename_gt">6.2. passenger_ruby <filename></a></div>
|
1143
|
-
<div class="foo toclevel3"><a href="#
|
1144
|
-
<div class="foo toclevel3"><a href="#
|
1145
|
-
<div class="foo toclevel3"><a href="#
|
1146
|
-
<div class="foo toclevel3"><a href="#
|
1147
|
-
<div class="foo
|
1148
|
-
<div class="foo
|
1149
|
-
<div class="foo toclevel3"><a href="#
|
1150
|
-
<div class="foo toclevel4"><a href="#
|
1151
|
-
<div class="foo toclevel4"><a href="#
|
1152
|
-
<div class="foo
|
1153
|
-
<div class="foo toclevel4"><a href="#
|
1154
|
-
<div class="foo toclevel4"><a href="#
|
1155
|
-
<div class="foo toclevel4"><a href="#
|
1156
|
-
<div class="foo toclevel4"><a href="#
|
1157
|
-
<div class="foo
|
1158
|
-
<div class="foo toclevel4"><a href="#
|
1159
|
-
<div class="foo toclevel4"><a href="#
|
1160
|
-
<div class="foo
|
1161
|
-
<div class="foo toclevel4"><a href="#
|
1162
|
-
<div class="foo toclevel4"><a href="#
|
1163
|
-
<div class="foo toclevel4"><a href="#
|
1164
|
-
<div class="foo
|
1165
|
-
<div class="foo toclevel4"><a href="#
|
1166
|
-
<div class="foo toclevel4"><a href="#
|
1167
|
-
<div class="foo toclevel4"><a href="#
|
1168
|
-
<div class="foo
|
1169
|
-
<div class="foo toclevel4"><a href="#
|
1170
|
-
<div class="foo toclevel4"><a href="#
|
1171
|
-
<div class="foo toclevel4"><a href="#
|
1172
|
-
<div class="foo toclevel4"><a href="#
|
1173
|
-
<div class="foo toclevel4"><a href="#
|
1174
|
-
<div class="foo toclevel4"><a href="#
|
1175
|
-
<div class="foo toclevel4"><a href="#
|
1176
|
-
<div class="foo toclevel4"><a href="#
|
1177
|
-
<div class="foo
|
1178
|
-
<div class="foo toclevel4"><a href="#
|
1179
|
-
<div class="foo toclevel4"><a href="#
|
1180
|
-
<div class="foo toclevel4"><a href="#
|
1181
|
-
<div class="foo toclevel3"><a href="#
|
1182
|
-
<div class="foo toclevel4"><a href="#
|
1183
|
-
<div class="foo
|
1184
|
-
<div class="foo toclevel4"><a href="#
|
1185
|
-
<div class="foo toclevel3"><a href="#
|
1186
|
-
<div class="foo toclevel4"><a href="#
|
1149
|
+
<div class="foo toclevel3"><a href="#_passenger_python_lt_filename_gt">6.3. passenger_python <filename></a></div>
|
1150
|
+
<div class="foo toclevel3"><a href="#PassengerAppRoot">6.4. passenger_app_root <path/to/root></a></div>
|
1151
|
+
<div class="foo toclevel3"><a href="#PassengerSpawnMethod">6.5. passenger_spawn_method <string></a></div>
|
1152
|
+
<div class="foo toclevel3"><a href="#PassengerRollingRestarts">6.6. passenger_rolling_restarts <on|off></a></div>
|
1153
|
+
<div class="foo toclevel3"><a href="#_passenger_resist_deployment_errors_lt_on_off_gt">6.7. passenger_resist_deployment_errors <on|off></a></div>
|
1154
|
+
<div class="foo toclevel3"><a href="#PassengerTempDir">6.8. passenger_temp_dir <directory></a></div>
|
1155
|
+
<div class="foo toclevel3"><a href="#_important_deployment_options">6.9. Important deployment options</a></div>
|
1156
|
+
<div class="foo toclevel4"><a href="#_passenger_enabled_lt_on_off_gt">6.9.1. passenger_enabled <on|off></a></div>
|
1157
|
+
<div class="foo toclevel4"><a href="#PassengerBaseURI">6.9.2. passenger_base_uri <uri></a></div>
|
1158
|
+
<div class="foo toclevel3"><a href="#_connection_handling_options">6.10. Connection handling options</a></div>
|
1159
|
+
<div class="foo toclevel4"><a href="#_passenger_ignore_client_abort_lt_on_off_gt">6.10.1. passenger_ignore_client_abort <on|off></a></div>
|
1160
|
+
<div class="foo toclevel4"><a href="#_passenger_set_cgi_param_lt_cgi_environment_name_gt_lt_value_gt">6.10.2. passenger_set_cgi_param <CGI environment name> <value></a></div>
|
1161
|
+
<div class="foo toclevel4"><a href="#_passenger_pass_header_lt_header_name_gt">6.10.3. passenger_pass_header <header name></a></div>
|
1162
|
+
<div class="foo toclevel4"><a href="#_passenger_buffer_response_lt_on_off_gt">6.10.4. passenger_buffer_response <on|off></a></div>
|
1163
|
+
<div class="foo toclevel4"><a href="#_passenger_buffer_size">6.10.5. passenger_buffer_size</a></div>
|
1164
|
+
<div class="foo toclevel4"><a href="#_passenger_buffers">6.10.6. passenger_buffers</a></div>
|
1165
|
+
<div class="foo toclevel4"><a href="#_passenger_busy_buffer_size">6.10.7. passenger_busy_buffer_size</a></div>
|
1166
|
+
<div class="foo toclevel3"><a href="#_security_options">6.11. Security options</a></div>
|
1167
|
+
<div class="foo toclevel4"><a href="#PassengerUserSwitching">6.11.1. passenger_user_switching <on|off></a></div>
|
1168
|
+
<div class="foo toclevel4"><a href="#_passenger_user_lt_username_gt">6.11.2. passenger_user <username></a></div>
|
1169
|
+
<div class="foo toclevel4"><a href="#_passenger_group_lt_group_name_gt">6.11.3. passenger_group <group name></a></div>
|
1170
|
+
<div class="foo toclevel4"><a href="#PassengerDefaultUser">6.11.4. passenger_default_user <username></a></div>
|
1171
|
+
<div class="foo toclevel4"><a href="#PassengerDefaultGroup">6.11.5. Passenger_default_group <group name></a></div>
|
1172
|
+
<div class="foo toclevel4"><a href="#_passenger_show_version_in_header_lt_on_off_gt">6.11.6. passenger_show_version_in_header <on|off></a></div>
|
1173
|
+
<div class="foo toclevel4"><a href="#_passenger_friendly_error_pages_lt_on_off_gt">6.11.7. passenger_friendly_error_pages <on|off></a></div>
|
1174
|
+
<div class="foo toclevel3"><a href="#_resource_control_and_optimization_options">6.12. Resource control and optimization options</a></div>
|
1175
|
+
<div class="foo toclevel4"><a href="#PassengerMaxPoolSize">6.12.1. passenger_max_pool_size <integer></a></div>
|
1176
|
+
<div class="foo toclevel4"><a href="#PassengerMinInstances">6.12.2. passenger_min_instances <integer></a></div>
|
1177
|
+
<div class="foo toclevel4"><a href="#_passenger_max_instances_lt_integer_gt">6.12.3. passenger_max_instances <integer></a></div>
|
1178
|
+
<div class="foo toclevel4"><a href="#_passenger_max_instances_per_app_lt_integer_gt">6.12.4. passenger_max_instances_per_app <integer></a></div>
|
1179
|
+
<div class="foo toclevel4"><a href="#PassengerPoolIdleTime">6.12.5. passenger_pool_idle_time <integer></a></div>
|
1180
|
+
<div class="foo toclevel4"><a href="#_passenger_max_preloader_idle_time_lt_integer_gt">6.12.6. passenger_max_preloader_idle_time <integer></a></div>
|
1181
|
+
<div class="foo toclevel4"><a href="#PassengerConcurrencyModel">6.12.7. passenger_concurrency_model <process|thread></a></div>
|
1182
|
+
<div class="foo toclevel4"><a href="#PassengerThreadCount">6.12.8. passenger_thread_count <number></a></div>
|
1183
|
+
<div class="foo toclevel4"><a href="#PassengerMaxRequests">6.12.9. passenger_max_requests <integer></a></div>
|
1184
|
+
<div class="foo toclevel4"><a href="#PassengerMaxRequestTime">6.12.10. passenger_max_request_time <seconds></a></div>
|
1185
|
+
<div class="foo toclevel4"><a href="#PassengerMemoryLimit">6.12.11. passenger_memory_limit <integer></a></div>
|
1186
|
+
<div class="foo toclevel4"><a href="#PassengerPreStart">6.12.12. passenger_pre_start <url></a></div>
|
1187
|
+
<div class="foo toclevel3"><a href="#_logging_and_debugging_options">6.13. Logging and debugging options</a></div>
|
1188
|
+
<div class="foo toclevel4"><a href="#_passenger_log_level_lt_integer_gt">6.13.1. passenger_log_level <integer></a></div>
|
1189
|
+
<div class="foo toclevel4"><a href="#_passenger_debug_log_file_lt_filename_gt">6.13.2. passenger_debug_log_file <filename></a></div>
|
1190
|
+
<div class="foo toclevel4"><a href="#_passenger_debugger_lt_on_off_gt">6.13.3. passenger_debugger <on|off></a></div>
|
1191
|
+
<div class="foo toclevel3"><a href="#_ruby_on_rails_specific_options">6.14. Ruby on Rails-specific options</a></div>
|
1192
|
+
<div class="foo toclevel4"><a href="#RailsEnv">6.14.1. rails_env <string></a></div>
|
1193
|
+
<div class="foo toclevel3"><a href="#_rack_and_rails_gt_3_specific_options">6.15. Rack and Rails >= 3 specific options</a></div>
|
1194
|
+
<div class="foo toclevel4"><a href="#RackEnv">6.15.1. rack_env <string></a></div>
|
1195
|
+
<div class="foo toclevel3"><a href="#_deprecated_options">6.16. Deprecated options</a></div>
|
1196
|
+
<div class="foo toclevel4"><a href="#_rails_spawn_method">6.16.1. rails_spawn_method</a></div>
|
1187
1197
|
<div class="foo toclevel2"><a href="#_analysis_and_system_maintenance">7. Analysis and system maintenance</a></div>
|
1188
1198
|
<div class="foo toclevel3"><a href="#_inspecting_memory_usage">7.1. Inspecting memory usage</a></div>
|
1189
1199
|
<div class="foo toclevel3"><a href="#_inspecting_phusion_passenger_8217_s_internal_status">7.2. Inspecting Phusion Passenger’s internal status</a></div>
|
@@ -1195,11 +1205,10 @@ using the command line.</p></div>
|
|
1195
1205
|
<div class="foo toclevel3"><a href="#reducing_memory_usage">8.2. Reducing memory consumption of Ruby on Rails applications by 33%</a></div>
|
1196
1206
|
<div class="foo toclevel3"><a href="#capistrano">8.3. Capistrano recipe</a></div>
|
1197
1207
|
<div class="foo toclevel3"><a href="#bundler_support">8.4. Bundler support</a></div>
|
1198
|
-
<div class="foo toclevel3"><a href="#
|
1199
|
-
<div class="foo toclevel3"><a href="#
|
1200
|
-
<div class="foo toclevel3"><a href="#
|
1201
|
-
<div class="foo toclevel3"><a href="#
|
1202
|
-
<div class="foo toclevel3"><a href="#_out_of_band_garbage_work_and_out_of_band_garbage_collection">8.9. Out-of-Band Garbage Work and Out-of-Band Garbage Collection</a></div>
|
1208
|
+
<div class="foo toclevel3"><a href="#_installing_multiple_ruby_on_rails_versions">8.5. Installing multiple Ruby on Rails versions</a></div>
|
1209
|
+
<div class="foo toclevel3"><a href="#_making_the_application_restart_after_each_request">8.6. Making the application restart after each request</a></div>
|
1210
|
+
<div class="foo toclevel3"><a href="#sub_uri_deployment_uri_fix">8.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</a></div>
|
1211
|
+
<div class="foo toclevel3"><a href="#_out_of_band_garbage_work_and_out_of_band_garbage_collection">8.8. Out-of-Band Garbage Work and Out-of-Band Garbage Collection</a></div>
|
1203
1212
|
<div class="foo toclevel2"><a href="#_under_the_hood">9. Under the hood</a></div>
|
1204
1213
|
<div class="foo toclevel3"><a href="#_page_caching_support">9.1. Page caching support</a></div>
|
1205
1214
|
<div class="foo toclevel3"><a href="#application_detection">9.2. How Phusion Passenger detects whether a virtual host is a web application</a></div>
|
@@ -1231,7 +1240,8 @@ using the command line.</p></div>
|
|
1231
1240
|
words: practically any operating system on earth, except Microsoft Windows.</p></div>
|
1232
1241
|
<div class="paragraph"><p>Phusion Passenger is confirmed on a large number of operating systems and Linux
|
1233
1242
|
distributions, including, but not limited to, Ubuntu, Debian, CentOS/Fedora/RHEL,
|
1234
|
-
Gentoo, Mac OS X, FreeBSD and Solaris.
|
1243
|
+
Gentoo, Mac OS X, FreeBSD and Solaris. OpenBSD is supported since version 5.2.
|
1244
|
+
Both 32-bit and 64-bit platforms are supported.</p></div>
|
1235
1245
|
<div class="paragraph"><p>Please
|
1236
1246
|
<a href="http://code.google.com/p/phusion-passenger/issues/list">report a bug</a>
|
1237
1247
|
or
|
@@ -1263,6 +1273,11 @@ Email <a href="mailto:support@phusion.nl">support@phusion.nl</a> if you are a <a
|
|
1263
1273
|
<a href="https://www.phusionpassenger.com/commercial_support">Commercial support contracts</a> are also available.
|
1264
1274
|
</p>
|
1265
1275
|
</li>
|
1276
|
+
<li>
|
1277
|
+
<p>
|
1278
|
+
Report security vulnerabilities to <a href="mailto:support@phusion.nl">support@phusion.nl</a>. We will do our best to respond to you as quickly as we can, so please do not disclose the vulnerability until then.
|
1279
|
+
</p>
|
1280
|
+
</li>
|
1266
1281
|
</ul></div>
|
1267
1282
|
<div class="paragraph"><p>Please consult <a href="https://www.phusionpassenger.com/support">the Phusion Passenger website</a> for a full list of support resources.</p></div>
|
1268
1283
|
</div>
|
@@ -1271,6 +1286,8 @@ Email <a href="mailto:support@phusion.nl">support@phusion.nl</a> if you are a <a
|
|
1271
1286
|
<div class="sect1">
|
1272
1287
|
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installation"></span><h2 data-comment-topic="installing-phusion-passenger-hn03ac" data-anchor="_installation">2. Installation</h2>
|
1273
1288
|
<div class="sectionbody">
|
1289
|
+
<div class="sect2">
|
1290
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_synopsis"></span><h3 data-comment-topic="synopsis-1uu3sqp" data-anchor="_synopsis">2.1. Synopsis</h3>
|
1274
1291
|
<div class="paragraph"><p>The Phusion Passenger installation process consists of two steps:</p></div>
|
1275
1292
|
<div class="olist arabic"><ol class="arabic">
|
1276
1293
|
<li>
|
@@ -1284,11 +1301,13 @@ The <strong>integration step</strong>, where you configure Phusion Passenger so
|
|
1284
1301
|
</p>
|
1285
1302
|
</li>
|
1286
1303
|
</ol></div>
|
1287
|
-
<div class="paragraph"><p>Because Phusion Passenger is designed to run in a wide variety of operating systems and configurations, both steps can be done in multiple ways. Most users will be satisfied with the generic installation instructions which covers both steps
|
1304
|
+
<div class="paragraph"><p>Because Phusion Passenger is designed to run in a wide variety of operating systems and configurations, both steps can be done in multiple ways. Most users — especially first-time users — will be satisfied with the <em>generic installation instructions</em> which covers both steps. However some users may prefer <em>OS-specific installation instructions</em>, which allow Phusion Passenger to better integrate into the operating system. Better integration is characterized by following OS-specific conventions.</p></div>
|
1288
1305
|
<div class="paragraph"><p>If you are not familiar with system administration and do not understand all the choices, then we recommend you to go with the <a href="#rubygems_generic_install">RubyGems generic installation method</a> (if you’re a Ruby user) or the <a href="#tarball_generic_install">tarball generic installation method</a> (if you’re not a Ruby user).</p></div>
|
1289
1306
|
<div class="paragraph"><p>The steps for upgrading or downgrading Phusion Passenger is almost the same as the steps for installing. All the installation guides in this section will also teach you how to upgrade and downgrade.</p></div>
|
1307
|
+
</div>
|
1290
1308
|
<div class="sect2">
|
1291
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="rubygems_generic_install"></span><h3 data-comment-topic="generic-installation-upgrade-and-downgrade-method-via-rubygems-76uol7" data-anchor="rubygems_generic_install">2.
|
1309
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="rubygems_generic_install"></span><h3 data-comment-topic="generic-installation-upgrade-and-downgrade-method-via-rubygems-76uol7" data-anchor="rubygems_generic_install">2.2. Generic installation, upgrade and downgrade method: via RubyGems</h3>
|
1310
|
+
<div class="paragraph"><p>RubyGems is only used as a method to obtain the Phusion Passenger files, so in case you have multiple Ruby versions it does not matter which Ruby’s RubyGems you use for installation. Once installed, Phusion Passenger can work with all other Ruby versions on your system.</p></div>
|
1292
1311
|
<span class="anchor_helper" id="is_ruby_home_or_system_wide_installed"></span><h4 class="float" data-anchor="is_ruby_home_or_system_wide_installed">Step 1: figuring out whether your Ruby is installed the home directory or system-wide</h4>
|
1293
1312
|
<div class="paragraph"><p>Ruby may either be installed in the home directory, or system-wide. If it’s installed system-wide then we will want to install gems system-wide as well, so you need to switch to a root prompt first. If Ruby is installed in the home directory then we will want to install gems to the home directory as well, as a normal user.</p></div>
|
1294
1313
|
<div class="paragraph"><p>To find out which case applies, run the following command to find out where the <span class="monospaced">ruby</span> command is:</p></div>
|
@@ -1356,7 +1375,7 @@ Is <em>sudo</em> not installed on your system? Run <span class="monospaced">su -
|
|
1356
1375
|
</div>
|
1357
1376
|
</div>
|
1358
1377
|
<span class="anchor_helper" id="add_rubygems_bin_dir_to_path"></span><h4 class="float" data-anchor="add_rubygems_bin_dir_to_path">Step 3: add the RubyGems bin directory to your $PATH</h4>
|
1359
|
-
<div class="paragraph"><p>If you all the following are applicable to you:</p></div>
|
1378
|
+
<div class="paragraph"><p>If you all of the following are applicable to you:</p></div>
|
1360
1379
|
<div class="ulist"><ul>
|
1361
1380
|
<li>
|
1362
1381
|
<p>
|
@@ -1431,11 +1450,12 @@ If you installed the existing Nginx through YUM, run <span class="monospaced">yu
|
|
1431
1450
|
<pre>passenger-memory-stats</pre>
|
1432
1451
|
</div>
|
1433
1452
|
</div>
|
1434
|
-
<div class="paragraph"><p>You should see the web server processes as well as a number of Phusion Passenger processes (e.g. PassengerWatchdog, PassengerHelperAgent). Congratulations, Phusion Passenger is now installed and running
|
1453
|
+
<div class="paragraph"><p>You should see the web server processes as well as a number of Phusion Passenger processes (e.g. PassengerWatchdog, PassengerHelperAgent). Congratulations, Phusion Passenger is now installed and running!
|
1454
|
+
At this point you may be interested in <a href="#nginx_init_script">creating an Nginx init script</a>.</p></div>
|
1435
1455
|
<div class="paragraph"><p>If the output is not as expected, then please refer to the <a href="#troubleshooting">Troubleshooting</a> section.</p></div>
|
1436
1456
|
</div>
|
1437
1457
|
<div class="sect2">
|
1438
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="tarball_generic_install"></span><h3 data-comment-topic="generic-installation-upgrade-and-downgrade-method-via-tarball-2gkx43" data-anchor="tarball_generic_install">2.
|
1458
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="tarball_generic_install"></span><h3 data-comment-topic="generic-installation-upgrade-and-downgrade-method-via-tarball-2gkx43" data-anchor="tarball_generic_install">2.3. Generic installation, upgrade and downgrade method: via tarball</h3>
|
1439
1459
|
<span class="anchor_helper" id="_step_1_download_and_extract_the_tarball"></span><h4 class="float" data-anchor="_step_1_download_and_extract_the_tarball">Step 1: download and extract the tarball</h4>
|
1440
1460
|
<div class="paragraph"><p>Download the open source Phusion Passenger tarball from <a href="https://www.phusionpassenger.com/download#open_source">the Phusion Passenger website</a>. If you want a specific version, please refer to the release archive on <a href="http://rubyforge.org/frs/?group_id=5873&release_id=46919">RubyForge</a>.</p></div>
|
1441
1461
|
<div class="paragraph"><p>If you a <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> customer, download the Phusion Passenger Enterprise tarball from the <a href="https://www.phusionpassenger.com/orders">Customer Area</a>. Also be sure to download the <strong>license key</strong> and save it as <em>/etc/passenger-enterprise-license</em>.</p></div>
|
@@ -1508,7 +1528,7 @@ sudo apt-get install ruby rake</pre>
|
|
1508
1528
|
sudo apt-get update</pre>
|
1509
1529
|
</div>
|
1510
1530
|
</div>
|
1511
|
-
<div class="paragraph"><p>If you’re on the older Ubuntu 8.04 Hardy release, the <
|
1531
|
+
<div class="paragraph"><p>If you’re on the older Ubuntu 8.04 Hardy release, the <span class="monospaced">apt-add-repository</span> command isn’t available so you have to install the repository and the key by hand:</p></div>
|
1512
1532
|
<div class="listingblock">
|
1513
1533
|
<div class="content monospaced">
|
1514
1534
|
<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger.list'
|
@@ -1534,32 +1554,97 @@ Note that the <span class="monospaced">passenger-install-nginx-module</span> com
|
|
1534
1554
|
<div class="paragraph"><p>Please refer to <a href="#verify_passenger_running">this section</a>. Note that all Phusion Passenger administration scripts are located inside the <em>bin</em> subdirectory of the Phusion Passenger source directory, so you would have to run something like <em>/opt/passenger/passenger-x.x.x/bin/passenger-memory-stats</em>.</p></div>
|
1535
1555
|
</div>
|
1536
1556
|
<div class="sect2">
|
1537
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="
|
1538
|
-
<div class="paragraph"><p>John Leach from Brightbox has kindly provided
|
1539
|
-
<div class="paragraph"><p>
|
1557
|
+
<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_debian_6_or_ubuntu"></span><h3 data-comment-topic="installing-or-upgrading-on-ubuntu-fw5fvp" data-anchor="_installing_or_upgrading_on_debian_6_or_ubuntu">2.4. Installing or upgrading on Debian 6 or Ubuntu</h3>
|
1558
|
+
<div class="paragraph"><p>John Leach from Brightbox has kindly provided Ubuntu packages for Phusion Passenger. The Ubuntu Lucid packages are compatible with Debian 6. The packages are available from the <a href="http://wiki.brightbox.co.uk/docs:phusion-passenger">Brightbox repository</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>
|
1559
|
+
<div class="paragraph"><p>If you use these packages to install Phusion Passenger then you do not need to run <span class="monospaced">passenger-install-apache2-module</span> or <span class="monospaced">passenger-install-nginx-module</span>. These packages contain all the binaries that you need.</p></div>
|
1560
|
+
<div class="paragraph">
|
1561
|
+
<div class="title">Apache</div>
|
1562
|
+
<p>On Ubuntu versions newer than 8.04 Hardy, register the Brightbox Apache PPA as follows:</p>
|
1563
|
+
</div>
|
1564
|
+
<div class="listingblock">
|
1565
|
+
<div class="content monospaced">
|
1566
|
+
<pre>sudo apt-add-repository ppa:brightbox/passenger
|
1567
|
+
sudo apt-get update</pre>
|
1568
|
+
</div>
|
1569
|
+
</div>
|
1570
|
+
<div class="paragraph"><p>On Ubuntu 8.04 Hardy and on Debian, the <span class="monospaced">apt-add-repository</span> command isn’t available so you have to install the repository and the key by hand.</p></div>
|
1571
|
+
<div class="paragraph"><p>Debian 6:</p></div>
|
1540
1572
|
<div class="listingblock">
|
1541
1573
|
<div class="content monospaced">
|
1542
|
-
<pre>deb http://
|
1574
|
+
<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger/ubuntu lucid main" > /etc/apt/sources.list.d/brightbox-passenger.list'
|
1575
|
+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
|
1576
|
+
sudo apt-get update</pre>
|
1543
1577
|
</div>
|
1544
1578
|
</div>
|
1545
|
-
<div class="paragraph"><p>
|
1546
|
-
<div class="
|
1579
|
+
<div class="paragraph"><p>Ubuntu 8.04 Hardy:</p></div>
|
1580
|
+
<div class="listingblock">
|
1581
|
+
<div class="content monospaced">
|
1582
|
+
<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger.list'
|
1583
|
+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
|
1584
|
+
sudo apt-get update</pre>
|
1585
|
+
</div>
|
1586
|
+
</div>
|
1587
|
+
<div class="paragraph"><p>You can proceed with installing Phusion Passenger by running:</p></div>
|
1547
1588
|
<div class="listingblock">
|
1548
1589
|
<div class="content monospaced">
|
1549
1590
|
<pre>sudo apt-get install libapache2-mod-passenger</pre>
|
1550
1591
|
</div>
|
1551
1592
|
</div>
|
1552
|
-
<div class="paragraph"><p>
|
1593
|
+
<div class="paragraph"><p>The Apache package provides configuration snippets for you, so you don’t need to modify any Apache configuration to get it to load Phusion Passenger.</p></div>
|
1594
|
+
<div class="paragraph">
|
1595
|
+
<div class="title">Nginx</div>
|
1596
|
+
<p>On Ubuntu versions newer than 8.04 Hardy, register the Brightbox Apache PPA as follows:</p>
|
1597
|
+
</div>
|
1553
1598
|
<div class="listingblock">
|
1554
1599
|
<div class="content monospaced">
|
1555
|
-
<pre>sudo apt-
|
1600
|
+
<pre>sudo apt-add-repository ppa:brightbox/passenger-nginx
|
1601
|
+
sudo apt-get update</pre>
|
1556
1602
|
</div>
|
1557
1603
|
</div>
|
1558
|
-
<div class="paragraph"><p>
|
1604
|
+
<div class="paragraph"><p>On Ubuntu 8.04 Hardy and on Debian, the <span class="monospaced">apt-add-repository</span> command isn’t available so you have to install the repository and the key by hand.</p></div>
|
1605
|
+
<div class="paragraph"><p>Debian 6:</p></div>
|
1606
|
+
<div class="listingblock">
|
1607
|
+
<div class="content monospaced">
|
1608
|
+
<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-nginx/ubuntu lucid main" > /etc/apt/sources.list.d/brightbox-passenger-nginx.list'
|
1609
|
+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
|
1610
|
+
sudo apt-get update</pre>
|
1611
|
+
</div>
|
1612
|
+
</div>
|
1613
|
+
<div class="paragraph"><p>Ubuntu 8.04 Hardy:</p></div>
|
1614
|
+
<div class="listingblock">
|
1615
|
+
<div class="content monospaced">
|
1616
|
+
<pre>sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger-nginx.list'
|
1617
|
+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
|
1618
|
+
sudo apt-get update</pre>
|
1619
|
+
</div>
|
1620
|
+
</div>
|
1621
|
+
<div class="paragraph"><p>Then:</p></div>
|
1622
|
+
<div class="listingblock">
|
1623
|
+
<div class="content monospaced">
|
1624
|
+
<pre>sudo apt-get install nginx-full</pre>
|
1625
|
+
</div>
|
1626
|
+
</div>
|
1627
|
+
<div class="paragraph"><p>You’ll then need to enable the Phusion Passenger module in Nginx by creating the following configuration file:</p></div>
|
1628
|
+
<div class="listingblock">
|
1629
|
+
<div class="content monospaced">
|
1630
|
+
<pre>sudo sh -c 'echo "passenger_root /usr/lib/phusion-passenger;" > /etc/nginx/conf.d/passenger.conf'</pre>
|
1631
|
+
</div>
|
1632
|
+
</div>
|
1633
|
+
<div class="paragraph"><p>Then restart Nginx to apply the changes:</p></div>
|
1634
|
+
<div class="listingblock">
|
1635
|
+
<div class="content monospaced">
|
1636
|
+
<pre>sudo /etc/init.d/nginx restart</pre>
|
1637
|
+
</div>
|
1638
|
+
</div>
|
1639
|
+
<div class="paragraph">
|
1640
|
+
<div class="title">Standalone</div>
|
1641
|
+
<p>Unfortunately, no packages are provided for Phusion Passenger Standalone.</p>
|
1642
|
+
</div>
|
1559
1643
|
</div>
|
1560
1644
|
<div class="sect2">
|
1561
|
-
<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.
|
1645
|
+
<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>
|
1562
1646
|
<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
|
+
<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>
|
1563
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>
|
1564
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>
|
1565
1650
|
<div class="paragraph"><p>Fedora Core 15:</p></div>
|
@@ -1591,13 +1676,13 @@ Note that the <span class="monospaced">passenger-install-nginx-module</span> com
|
|
1591
1676
|
<div class="paragraph"><p>Phusion Passenger for Apache:</p></div>
|
1592
1677
|
<div class="listingblock">
|
1593
1678
|
<div class="content monospaced">
|
1594
|
-
<pre>yum install
|
1679
|
+
<pre>yum install mod_passenger</pre>
|
1595
1680
|
</div>
|
1596
1681
|
</div>
|
1597
1682
|
<div class="paragraph"><p>Phusion Passenger for Nginx:</p></div>
|
1598
1683
|
<div class="listingblock">
|
1599
1684
|
<div class="content monospaced">
|
1600
|
-
<pre>yum install
|
1685
|
+
<pre>yum install nginx-passenger</pre>
|
1601
1686
|
</div>
|
1602
1687
|
</div>
|
1603
1688
|
<div class="paragraph"><p>Phusion Passenger Standalone:</p></div>
|
@@ -1610,7 +1695,7 @@ Note that the <span class="monospaced">passenger-install-nginx-module</span> com
|
|
1610
1695
|
<div class="paragraph"><p>There are instructions for building your own packages and Yum repositories in the <a href="https://github.com/FooBarWidget/passenger/tree/master/rpm#readme">rpm directory ReadMe</a> within the <a href="https://github.com/FooBarWidget/passenger">GitHub repository</a>.</p></div>
|
1611
1696
|
</div>
|
1612
1697
|
<div class="sect2">
|
1613
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_upgrading_from_open_source_to_enterprise"></span><h3 data-comment-topic="upgrading-from-open-source-to-enterprise-1a58c2b" data-anchor="_upgrading_from_open_source_to_enterprise">2.
|
1698
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_upgrading_from_open_source_to_enterprise"></span><h3 data-comment-topic="upgrading-from-open-source-to-enterprise-1a58c2b" data-anchor="_upgrading_from_open_source_to_enterprise">2.6. Upgrading from open source to Enterprise</h3>
|
1614
1699
|
<div class="paragraph"><p>Phusion Passenger comes in two variants: an open source version, as well as an <a href="https://www.phusionpassenger.com/enterprise">Enterprise version</a> which introduces a myriad of useful features that can improve stability and performance and efficiency.</p></div>
|
1615
1700
|
<div class="paragraph"><p>Customers who have bought Phusion Passenger Enterprise can upgrade their open source installation to Enterprise as follows:</p></div>
|
1616
1701
|
<div class="olist arabic"><ol class="arabic">
|
@@ -1628,11 +1713,134 @@ Install the Enterprise version by following one of the installation guides in th
|
|
1628
1713
|
<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>
|
1629
1714
|
</div>
|
1630
1715
|
<div class="sect2">
|
1631
|
-
<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.
|
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>
|
1632
1717
|
<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>
|
1633
1718
|
</div>
|
1634
1719
|
<div class="sect2">
|
1635
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="
|
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>
|
1721
|
+
<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>
|
1723
|
+
<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
|
+
<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
|
+
<div class="listingblock">
|
1726
|
+
<div class="content monospaced">
|
1727
|
+
<pre>export CC='ccache clang -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
|
1728
|
+
export CXX='ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'</pre>
|
1729
|
+
</div>
|
1730
|
+
</div>
|
1731
|
+
</div>
|
1732
|
+
<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>
|
1734
|
+
<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
|
+
<div class="dlist"><dl>
|
1736
|
+
<dt class="hdlist1">
|
1737
|
+
<span class="monospaced">EXTRA_PRE_CFLAGS</span>
|
1738
|
+
</dt>
|
1739
|
+
<dd>
|
1740
|
+
<p>
|
1741
|
+
These flags are injected into all C compiler invocations that involve compiling C or C++ source files. This includes compiler invocations that compile <strong>and</strong> link. The flags are injected at the beginning of the command string, even before <span class="monospaced">EXTRA_PRE_LDFLAGS</span>.
|
1742
|
+
</p>
|
1743
|
+
</dd>
|
1744
|
+
<dt class="hdlist1">
|
1745
|
+
<span class="monospaced">EXTRA_CFLAGS</span>
|
1746
|
+
</dt>
|
1747
|
+
<dd>
|
1748
|
+
<p>
|
1749
|
+
Similar to <span class="monospaced">EXTRA_PRE_CFLAGS</span>, but injected at the end of the command string, before <span class="monospaced">EXTRA_LDFLAGS</span>.
|
1750
|
+
</p>
|
1751
|
+
</dd>
|
1752
|
+
<dt class="hdlist1">
|
1753
|
+
<span class="monospaced">EXTRA_PRE_CXXFLAGS</span>
|
1754
|
+
</dt>
|
1755
|
+
<dd>
|
1756
|
+
<p>
|
1757
|
+
Similar to <span class="monospaced">EXTRA_PRE_CFLAGS</span>, but for C++ compiler invocations.
|
1758
|
+
</p>
|
1759
|
+
</dd>
|
1760
|
+
<dt class="hdlist1">
|
1761
|
+
<span class="monospaced">EXTRA_CXXFLAGS</span>
|
1762
|
+
</dt>
|
1763
|
+
<dd>
|
1764
|
+
<p>
|
1765
|
+
Similar to <span class="monospaced">EXTRA_CFLAGS</span>, but for C++ compiler invocations.
|
1766
|
+
</p>
|
1767
|
+
</dd>
|
1768
|
+
<dt class="hdlist1">
|
1769
|
+
<span class="monospaced">EXTRA_PRE_LDFLAGS</span>
|
1770
|
+
</dt>
|
1771
|
+
<dd>
|
1772
|
+
<p>
|
1773
|
+
These flags are injected into all C/C++ compiler invocations that involve linking. This includes compiler invocations that compile <strong>and</strong> link. The flags are injected at the beginning of the command string, but after <span class="monospaced">EXTRA_PRE_CFLAGS</span> and <span class="monospaced">EXTRA_PRE_CXXFLAGS</span>.
|
1774
|
+
</p>
|
1775
|
+
</dd>
|
1776
|
+
<dt class="hdlist1">
|
1777
|
+
<span class="monospaced">EXTRA_LDFLAGS</span>
|
1778
|
+
</dt>
|
1779
|
+
<dd>
|
1780
|
+
<p>
|
1781
|
+
Similar to <span class="monospaced">EXTRA_PRE_LDFLAGS</span>, but injected at the very end of the command string, even after <span class="monospaced">EXTRA_CFLAGS</span> and <span class="monospaced">EXTRA_CXXFLAGS</span>.
|
1782
|
+
</p>
|
1783
|
+
</dd>
|
1784
|
+
</dl></div>
|
1785
|
+
</div>
|
1786
|
+
<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>
|
1788
|
+
<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
|
+
<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
|
+
<div class="dlist"><dl>
|
1791
|
+
<dt class="hdlist1">
|
1792
|
+
<span class="monospaced">HTTPD</span>
|
1793
|
+
</dt>
|
1794
|
+
<dd>
|
1795
|
+
<p>
|
1796
|
+
The location of the <span class="monospaced">httpd</span> executable (the Apache server executable).
|
1797
|
+
</p>
|
1798
|
+
</dd>
|
1799
|
+
<dt class="hdlist1">
|
1800
|
+
<span class="monospaced">APXS2</span>
|
1801
|
+
</dt>
|
1802
|
+
<dd>
|
1803
|
+
<p>
|
1804
|
+
The location of the <span class="monospaced">apxs2</span> executable (the Apache module developer tool).
|
1805
|
+
</p>
|
1806
|
+
</dd>
|
1807
|
+
<dt class="hdlist1">
|
1808
|
+
<span class="monospaced">APR_CONFIG</span>
|
1809
|
+
</dt>
|
1810
|
+
<dd>
|
1811
|
+
<p>
|
1812
|
+
The location of the <span class="monospaced">apr-config</span> executable (the Apache Portable Runtime developer tool).
|
1813
|
+
</p>
|
1814
|
+
</dd>
|
1815
|
+
<dt class="hdlist1">
|
1816
|
+
<span class="monospaced">APU_CONFIG</span>
|
1817
|
+
</dt>
|
1818
|
+
<dd>
|
1819
|
+
<p>
|
1820
|
+
The location of the <span class="monospaced">apu-config</span> executable (the Apache Portable Runtime Utility developer tool).
|
1821
|
+
</p>
|
1822
|
+
</dd>
|
1823
|
+
<dt class="hdlist1">
|
1824
|
+
<span class="monospaced">MAKE</span>
|
1825
|
+
</dt>
|
1826
|
+
<dd>
|
1827
|
+
<p>
|
1828
|
+
The location of a <span class="monospaced">make</span> tool. It does not matter which implementation of <span class="monospaced">make</span> this is.
|
1829
|
+
</p>
|
1830
|
+
</dd>
|
1831
|
+
<dt class="hdlist1">
|
1832
|
+
<span class="monospaced">GMAKE</span>
|
1833
|
+
</dt>
|
1834
|
+
<dd>
|
1835
|
+
<p>
|
1836
|
+
The location of the GNU-compatible <span class="monospaced">make</span> tool.
|
1837
|
+
</p>
|
1838
|
+
</dd>
|
1839
|
+
</dl></div>
|
1840
|
+
</div>
|
1841
|
+
</div>
|
1842
|
+
<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>
|
1636
1844
|
<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>
|
1637
1845
|
<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>
|
1638
1846
|
<div class="listingblock">
|
@@ -1656,7 +1864,25 @@ line into your Nginx configuration file:</p></div>
|
|
1656
1864
|
<div class="paragraph"><p>After having done so, restart Nginx.</p></div>
|
1657
1865
|
</div>
|
1658
1866
|
<div class="sect2">
|
1659
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="
|
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>
|
1868
|
+
<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
|
+
<div class="paragraph"><p>If you prefer to use an init script then please refer to the following resources:</p></div>
|
1870
|
+
<div class="ulist"><ul>
|
1871
|
+
<li>
|
1872
|
+
<p>
|
1873
|
+
<a href="http://wiki.nginx.org/Nginx-init-ubuntu">Init script for Ubuntu</a>
|
1874
|
+
</p>
|
1875
|
+
</li>
|
1876
|
+
<li>
|
1877
|
+
<p>
|
1878
|
+
<a href="http://wiki.nginx.org/RedHatNginxInitScript">Init script for Red Hat, Fedora and CentOS</a>
|
1879
|
+
</p>
|
1880
|
+
</li>
|
1881
|
+
</ul></div>
|
1882
|
+
<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
|
+
</div>
|
1884
|
+
<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>
|
1660
1886
|
<div class="paragraph"><p>You can temporarily unload (disable) Phusion Passenger from the web server, without
|
1661
1887
|
uninstalling the Phusion Passenger files, so that the web server behaves as if Phusion
|
1662
1888
|
Passenger was never installed in the first place. This might be useful to you if -
|
@@ -1712,7 +1938,7 @@ http {
|
|
1712
1938
|
<div class="paragraph"><p>After you’ve done this, save the configuration file and restart the web server.</p></div>
|
1713
1939
|
</div>
|
1714
1940
|
<div class="sect2">
|
1715
|
-
<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.
|
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>
|
1716
1942
|
<div class="paragraph"><p>To uninstall Phusion Passenger, please first remove all Phusion Passenger
|
1717
1943
|
configuration directives from your web server configuration file(s). After you’ve
|
1718
1944
|
done this, you need to remove the Phusion Passenger files.</p></div>
|
@@ -1739,7 +1965,7 @@ If you installed Phusion Passenger through APT or YUM, then use them to uninstal
|
|
1739
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>
|
1740
1966
|
</div>
|
1741
1967
|
<div class="sect2">
|
1742
|
-
<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.
|
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>
|
1743
1969
|
<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>
|
1744
1970
|
<div class="paragraph"><p>First, move the directory to whereever you like:</p></div>
|
1745
1971
|
<div class="listingblock">
|
@@ -2211,6 +2437,10 @@ run Ramaze::Adapter::Base</pre>
|
|
2211
2437
|
<div class="content monospaced">
|
2212
2438
|
<pre>require 'rubygems'
|
2213
2439
|
require 'sinatra'
|
2440
|
+
|
2441
|
+
set :environment, ENV['RACK_ENV'].to_sym
|
2442
|
+
disable :run, :reload
|
2443
|
+
|
2214
2444
|
require 'app.rb'
|
2215
2445
|
|
2216
2446
|
run Sinatra::Application</pre>
|
@@ -2365,6 +2595,7 @@ this option as well. Please read
|
|
2365
2595
|
<div class="sect2">
|
2366
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 <filename></h3>
|
2367
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>
|
2368
2599
|
<div class="ulist"><ul>
|
2369
2600
|
<li>
|
2370
2601
|
<p>
|
@@ -2387,10 +2618,86 @@ In an <em>if</em> configuration scope.
|
|
2387
2618
|
</p>
|
2388
2619
|
</li>
|
2389
2620
|
</ul></div>
|
2390
|
-
<div class="paragraph"><p>
|
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>
|
2391
2624
|
</div>
|
2392
2625
|
<div class="sect2">
|
2393
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="
|
2626
|
+
<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 <filename></h3>
|
2627
|
+
<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>
|
2653
|
+
</div>
|
2654
|
+
<div class="sect2">
|
2655
|
+
<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 <path/to/root></h3>
|
2656
|
+
<div class="paragraph"><p><strong>Introduced in version 4.0.0.</strong>
|
2657
|
+
By default, Phusion Passenger assumes that the application’s root directory
|
2658
|
+
is the parent directory of the <em>public</em> directory. This option allows one to
|
2659
|
+
specify the application’s root independently from the Nginx <em>root</em>, which
|
2660
|
+
is useful if the <em>public</em> directory lives in a non-standard place.</p></div>
|
2661
|
+
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
2662
|
+
<div class="ulist"><ul>
|
2663
|
+
<li>
|
2664
|
+
<p>
|
2665
|
+
In the <em>http</em> configuration block.
|
2666
|
+
</p>
|
2667
|
+
</li>
|
2668
|
+
<li>
|
2669
|
+
<p>
|
2670
|
+
In a <em>server</em> configuration block.
|
2671
|
+
</p>
|
2672
|
+
</li>
|
2673
|
+
<li>
|
2674
|
+
<p>
|
2675
|
+
In a <em>location</em> configuration block.
|
2676
|
+
</p>
|
2677
|
+
</li>
|
2678
|
+
<li>
|
2679
|
+
<p>
|
2680
|
+
In an <em>if</em> configuration scope.
|
2681
|
+
</p>
|
2682
|
+
</li>
|
2683
|
+
</ul></div>
|
2684
|
+
<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
|
2685
|
+
<div class="paragraph"><p>Example:</p></div>
|
2686
|
+
<div class="listingblock">
|
2687
|
+
<div class="content monospaced">
|
2688
|
+
<pre>server {
|
2689
|
+
server_name test.host;
|
2690
|
+
root /var/rails/zena/sites/example.com/public;
|
2691
|
+
# normally Phusion Passenger would
|
2692
|
+
# have assumed that the application
|
2693
|
+
# root is "/var/rails/zena/sites/example.com"
|
2694
|
+
passenger_app_root /var/rails/zena;
|
2695
|
+
}</pre>
|
2696
|
+
</div>
|
2697
|
+
</div>
|
2698
|
+
</div>
|
2699
|
+
<div class="sect2">
|
2700
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerSpawnMethod"></span><h3 data-comment-topic="passenger-spawn-method-string--1sc6njl" data-anchor="PassengerSpawnMethod">6.5. passenger_spawn_method <string></h3>
|
2394
2701
|
<div class="admonitionblock">
|
2395
2702
|
<table><tr>
|
2396
2703
|
<td class="icon">
|
@@ -2483,7 +2790,7 @@ In an <em>if</em> configuration scope.
|
|
2483
2790
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>smart</em>.</p></div>
|
2484
2791
|
</div>
|
2485
2792
|
<div class="sect2">
|
2486
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerRollingRestarts"></span><h3 data-comment-topic="passenger-rolling-restarts" data-anchor="PassengerRollingRestarts">6.
|
2793
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerRollingRestarts"></span><h3 data-comment-topic="passenger-rolling-restarts" data-anchor="PassengerRollingRestarts">6.6. passenger_rolling_restarts <on|off></h3>
|
2487
2794
|
<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
|
2488
2795
|
<div class="paragraph"><p>Enables or disables support for rolling restarts. Normally when you
|
2489
2796
|
restart an application (by touching restart.txt), Phusion Passenger would
|
@@ -2556,7 +2863,7 @@ In an <em>if</em> configuration scope.
|
|
2556
2863
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
|
2557
2864
|
</div>
|
2558
2865
|
<div class="sect2">
|
2559
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_resist_deployment_errors_lt_on_off_gt"></span><h3 data-comment-topic="passenger-resist-deployment-errors-on-off--k9yf1" data-anchor="_passenger_resist_deployment_errors_lt_on_off_gt">6.
|
2866
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_resist_deployment_errors_lt_on_off_gt"></span><h3 data-comment-topic="passenger-resist-deployment-errors-on-off--k9yf1" data-anchor="_passenger_resist_deployment_errors_lt_on_off_gt">6.7. passenger_resist_deployment_errors <on|off></h3>
|
2560
2867
|
<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
|
2561
2868
|
<div class="paragraph"><p>Enables or disables resistance against deployment errors.</p></div>
|
2562
2869
|
<div class="paragraph"><p>Suppose you’ve upgraded your application and you’ve issues a command to restart it (by touching restart.txt), but the application code contains an error that prevents Phusion Passenger from successfully spawning a process (e.g. a syntax error). Phusion Passenger would normally display an error message in response to this.</p></div>
|
@@ -2606,9 +2913,37 @@ In an <em>if</em> configuration scope.
|
|
2606
2913
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
|
2607
2914
|
</div>
|
2608
2915
|
<div class="sect2">
|
2609
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="
|
2916
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerTempDir"></span><h3 data-comment-topic="passenger-temp-dir-directory--1t3opri" data-anchor="PassengerTempDir">6.8. passenger_temp_dir <directory></h3>
|
2917
|
+
<div class="paragraph"><p>Specifies the directory that Phusion Passenger should use for storing temporary
|
2918
|
+
files. This includes things such as Unix socket files.</p></div>
|
2919
|
+
<div class="paragraph"><p>This option may only be specified in the <em>http</em> configuration block. The
|
2920
|
+
default temp directory that Phusion Passenger uses is <em>/tmp</em>.</p></div>
|
2921
|
+
<div class="paragraph"><p>This option is especially useful if Nginx is not allowed to write to /tmp
|
2922
|
+
(which is the case on some systems with strict SELinux policies) or if the
|
2923
|
+
partition that /tmp lives on doesn’t have enough disk space.</p></div>
|
2924
|
+
<div class="paragraph">
|
2925
|
+
<div class="title">Command line tools</div>
|
2926
|
+
<p>Some Phusion Passenger command line administration tools, such as
|
2927
|
+
<span class="monospaced">passenger-status</span>, must know what Phusion Passenger’s temp directory is
|
2928
|
+
in order to function properly. You can pass the directory through the
|
2929
|
+
<span class="monospaced">PASSENGER_TMPDIR</span> environment variable, or the <span class="monospaced">TMPDIR</span> environment variable
|
2930
|
+
(the former will be used if both are specified).</p>
|
2931
|
+
</div>
|
2932
|
+
<div class="paragraph"><p>For example, if you set <em>passenger_temp_dir</em> to <em>/my_temp_dir</em>, then invoke
|
2933
|
+
<span class="monospaced">passenger-status</span> after you’ve set the <span class="monospaced">PASSENGER_TMPDIR</span> or <span class="monospaced">TMPDIR</span>
|
2934
|
+
environment variable, like this:</p></div>
|
2935
|
+
<div class="listingblock">
|
2936
|
+
<div class="content monospaced">
|
2937
|
+
<pre>export PASSENGER_TMPDIR=/my_temp-dir
|
2938
|
+
sudo -E passenger-status
|
2939
|
+
# The -E option tells 'sudo' to preserve environment variables.</pre>
|
2940
|
+
</div>
|
2941
|
+
</div>
|
2942
|
+
</div>
|
2943
|
+
<div class="sect2">
|
2944
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_important_deployment_options"></span><h3 data-comment-topic="important-deployment-options-av567" data-anchor="_important_deployment_options">6.9. Important deployment options</h3>
|
2610
2945
|
<div class="sect3">
|
2611
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_enabled_lt_on_off_gt"></span><h4 data-comment-topic="passenger-enabled-on-off--1rpb2t7" data-anchor="_passenger_enabled_lt_on_off_gt">6.
|
2946
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_enabled_lt_on_off_gt"></span><h4 data-comment-topic="passenger-enabled-on-off--1rpb2t7" data-anchor="_passenger_enabled_lt_on_off_gt">6.9.1. passenger_enabled <on|off></h4>
|
2612
2947
|
<div class="paragraph"><p>This option may be specified in the <em>http</em> configuration block, a
|
2613
2948
|
<em>server</em> configuration block, a <em>location</em> configuration block or
|
2614
2949
|
an <em>if</em> configuration scope, to enable or disable Phusion Passenger
|
@@ -2620,7 +2955,7 @@ and <a href="#deploying_a_rack_app">Deploying a Rack-based Ruby application</a>
|
|
2620
2955
|
for examples.</p></div>
|
2621
2956
|
</div>
|
2622
2957
|
<div class="sect3">
|
2623
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerBaseURI"></span><h4 data-comment-topic="passenger-base-uri-uri--1xtuo50" data-anchor="PassengerBaseURI">6.
|
2958
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerBaseURI"></span><h4 data-comment-topic="passenger-base-uri-uri--1xtuo50" data-anchor="PassengerBaseURI">6.9.2. passenger_base_uri <uri></h4>
|
2624
2959
|
<div class="paragraph"><p>Used to specify that the given URI is an distinct application that should
|
2625
2960
|
be served by Phusion Passenger. This option can be used for both Rails and
|
2626
2961
|
Rack applications. See <a href="#deploying_rails_to_sub_uri">Deploying Rails to a sub URI</a>
|
@@ -2653,9 +2988,9 @@ In an <em>if</em> configuration scope.
|
|
2653
2988
|
</div>
|
2654
2989
|
</div>
|
2655
2990
|
<div class="sect2">
|
2656
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_connection_handling_options"></span><h3 data-comment-topic="connection-handling-options-8jgq90" data-anchor="_connection_handling_options">6.
|
2991
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_connection_handling_options"></span><h3 data-comment-topic="connection-handling-options-8jgq90" data-anchor="_connection_handling_options">6.10. Connection handling options</h3>
|
2657
2992
|
<div class="sect3">
|
2658
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_ignore_client_abort_lt_on_off_gt"></span><h4 data-comment-topic="passenger-ignore-client-abort" data-anchor="_passenger_ignore_client_abort_lt_on_off_gt">6.
|
2993
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_ignore_client_abort_lt_on_off_gt"></span><h4 data-comment-topic="passenger-ignore-client-abort" data-anchor="_passenger_ignore_client_abort_lt_on_off_gt">6.10.1. passenger_ignore_client_abort <on|off></h4>
|
2659
2994
|
<div class="paragraph"><p>Normally, when the HTTP client aborts the connection (e.g. when the user clicked on "Stop"
|
2660
2995
|
in the browser), the connection with the application process will be closed too. If the
|
2661
2996
|
application process continues to send its response, then that will result in EPIPE errors
|
@@ -2691,7 +3026,7 @@ In an <em>if</em> configuration scope.
|
|
2691
3026
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
|
2692
3027
|
</div>
|
2693
3028
|
<div class="sect3">
|
2694
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_set_cgi_param_lt_cgi_environment_name_gt_lt_value_gt"></span><h4 data-comment-topic="passenger-set-cgi-param-cgi-environment-name-value--rx9gc0" data-anchor="_passenger_set_cgi_param_lt_cgi_environment_name_gt_lt_value_gt">6.
|
3029
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_set_cgi_param_lt_cgi_environment_name_gt_lt_value_gt"></span><h4 data-comment-topic="passenger-set-cgi-param-cgi-environment-name-value--rx9gc0" data-anchor="_passenger_set_cgi_param_lt_cgi_environment_name_gt_lt_value_gt">6.10.2. passenger_set_cgi_param <CGI environment name> <value></h4>
|
2695
3030
|
<div class="paragraph"><p>Allows one to define additional CGI environment variables to pass to the backend
|
2696
3031
|
application. This is equivalent to ngx_http_fastcgi_module’s <em>fastcgi_param</em>
|
2697
3032
|
directive, and is comparable to ngx_http_proxy_module’s <em>proxy_set_header</em> option.
|
@@ -2742,7 +3077,7 @@ In an <em>if</em> configuration scope.
|
|
2742
3077
|
</ul></div>
|
2743
3078
|
</div>
|
2744
3079
|
<div class="sect3">
|
2745
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_pass_header_lt_header_name_gt"></span><h4 data-comment-topic="passenger-pass-header-header-name--1cg31je" data-anchor="_passenger_pass_header_lt_header_name_gt">6.
|
3080
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_pass_header_lt_header_name_gt"></span><h4 data-comment-topic="passenger-pass-header-header-name--1cg31je" data-anchor="_passenger_pass_header_lt_header_name_gt">6.10.3. passenger_pass_header <header name></h4>
|
2746
3081
|
<div class="paragraph"><p>Some headers generated by backend applications are not forwarded to the HTTP client,
|
2747
3082
|
e.g. <em>X-Accel-Redirect</em> which is directly processed by Nginx and then discarded from
|
2748
3083
|
the final response. This directive allows one to force Nginx to pass those headers
|
@@ -2780,7 +3115,7 @@ In an <em>if</em> configuration scope.
|
|
2780
3115
|
</ul></div>
|
2781
3116
|
</div>
|
2782
3117
|
<div class="sect3">
|
2783
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_buffer_response_lt_on_off_gt"></span><h4 data-comment-topic="passenger-buffer-response" data-anchor="_passenger_buffer_response_lt_on_off_gt">6.
|
3118
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_buffer_response_lt_on_off_gt"></span><h4 data-comment-topic="passenger-buffer-response" data-anchor="_passenger_buffer_response_lt_on_off_gt">6.10.4. passenger_buffer_response <on|off></h4>
|
2784
3119
|
<div class="paragraph"><p>When turned on, application-generated responses are buffered by Nginx. Buffering will
|
2785
3120
|
happen in memory and also on disk if the response is larger than a certain threshold.</p></div>
|
2786
3121
|
<div class="paragraph"><p>Before we proceed with explaining this configuration option, we want to state the following to avoid confusion. If you use Phusion Passenger for Nginx, there are in fact two response buffering systems active:</p></div>
|
@@ -2869,27 +3204,27 @@ In an <em>if</em> configuration scope.
|
|
2869
3204
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
|
2870
3205
|
</div>
|
2871
3206
|
<div class="sect3">
|
2872
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_buffer_size"></span><h4 data-comment-topic="passenger-buffer-size-1jfkq87" data-anchor="_passenger_buffer_size">6.
|
3207
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_buffer_size"></span><h4 data-comment-topic="passenger-buffer-size-1jfkq87" data-anchor="_passenger_buffer_size">6.10.5. passenger_buffer_size</h4>
|
2873
3208
|
</div>
|
2874
3209
|
<div class="sect3">
|
2875
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_buffers"></span><h4 data-comment-topic="passenger-busy-buffers" data-anchor="_passenger_buffers">6.
|
3210
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_buffers"></span><h4 data-comment-topic="passenger-busy-buffers" data-anchor="_passenger_buffers">6.10.6. passenger_buffers</h4>
|
2876
3211
|
</div>
|
2877
3212
|
<div class="sect3">
|
2878
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_busy_buffer_size"></span><h4 data-comment-topic="passenger-busy-buffer-size-124sj61" data-anchor="_passenger_busy_buffer_size">6.
|
3213
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_busy_buffer_size"></span><h4 data-comment-topic="passenger-busy-buffer-size-124sj61" data-anchor="_passenger_busy_buffer_size">6.10.7. passenger_busy_buffer_size</h4>
|
2879
3214
|
<div class="paragraph"><p>These options have the same effect as proxy_module’s similarly named options.
|
2880
3215
|
They can be used to modify the maximum allowed HTTP header size.</p></div>
|
2881
3216
|
</div>
|
2882
3217
|
</div>
|
2883
3218
|
<div class="sect2">
|
2884
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_security_options"></span><h3 data-comment-topic="security-options-1bv93g4" data-anchor="_security_options">6.
|
3219
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_security_options"></span><h3 data-comment-topic="security-options-1bv93g4" data-anchor="_security_options">6.11. Security options</h3>
|
2885
3220
|
<div class="sect3">
|
2886
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerUserSwitching"></span><h4 data-comment-topic="passenger-user-switching-on-off--1p37u3l" data-anchor="PassengerUserSwitching">6.
|
3221
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerUserSwitching"></span><h4 data-comment-topic="passenger-user-switching-on-off--1p37u3l" data-anchor="PassengerUserSwitching">6.11.1. passenger_user_switching <on|off></h4>
|
2887
3222
|
<div class="paragraph"><p>Whether to enable <a href="#user_switching">user switching support</a>.</p></div>
|
2888
3223
|
<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
|
2889
3224
|
The default value is <em>on</em>.</p></div>
|
2890
3225
|
</div>
|
2891
3226
|
<div class="sect3">
|
2892
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_user_lt_username_gt"></span><h4 data-comment-topic="passenger-user-username--b06ur7" data-anchor="_passenger_user_lt_username_gt">6.
|
3227
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_user_lt_username_gt"></span><h4 data-comment-topic="passenger-user-username--b06ur7" data-anchor="_passenger_user_lt_username_gt">6.11.2. passenger_user <username></h4>
|
2893
3228
|
<div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
|
2894
3229
|
by default run the web application as the owner of the file <em>config/environment.rb</em>
|
2895
3230
|
(for Rails apps) or <em>config.ru</em> (for Rack apps). This option allows you to override
|
@@ -2921,7 +3256,7 @@ In an <em>if</em> configuration scope.
|
|
2921
3256
|
<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
|
2922
3257
|
</div>
|
2923
3258
|
<div class="sect3">
|
2924
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_group_lt_group_name_gt"></span><h4 data-comment-topic="passenger-user-group-name--1fco4j7" data-anchor="_passenger_group_lt_group_name_gt">6.
|
3259
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_group_lt_group_name_gt"></span><h4 data-comment-topic="passenger-user-group-name--1fco4j7" data-anchor="_passenger_group_lt_group_name_gt">6.11.3. passenger_group <group name></h4>
|
2925
3260
|
<div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
|
2926
3261
|
by default run the web application as the primary group of the owner of the file
|
2927
3262
|
<em>config/environment.rb</em> (for Rails apps) or <em>config.ru</em> (for Rack apps). This option
|
@@ -2955,7 +3290,7 @@ In an <em>if</em> configuration scope.
|
|
2955
3290
|
<div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
|
2956
3291
|
</div>
|
2957
3292
|
<div class="sect3">
|
2958
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerDefaultUser"></span><h4 data-comment-topic="passenger-default-user-username--1h6cdmf" data-anchor="PassengerDefaultUser">6.
|
3293
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerDefaultUser"></span><h4 data-comment-topic="passenger-default-user-username--1h6cdmf" data-anchor="PassengerDefaultUser">6.11.4. passenger_default_user <username></h4>
|
2959
3294
|
<div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
|
2960
3295
|
This configuration option allows one to specify the user that applications must
|
2961
3296
|
run as, if user switching fails or is disabled.</p></div>
|
@@ -2963,7 +3298,7 @@ run as, if user switching fails or is disabled.</p></div>
|
|
2963
3298
|
The default value is <em>nobody</em>.</p></div>
|
2964
3299
|
</div>
|
2965
3300
|
<div class="sect3">
|
2966
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerDefaultGroup"></span><h4 data-comment-topic="passenger-default-group-group-name--1qxn2qa" data-anchor="PassengerDefaultGroup">6.
|
3301
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerDefaultGroup"></span><h4 data-comment-topic="passenger-default-group-group-name--1qxn2qa" data-anchor="PassengerDefaultGroup">6.11.5. Passenger_default_group <group name></h4>
|
2967
3302
|
<div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
|
2968
3303
|
This configuration option allows one to specify the group that applications must
|
2969
3304
|
run as, if user switching fails or is disabled.</p></div>
|
@@ -2972,7 +3307,48 @@ The default value is the primary group of the user specifified by
|
|
2972
3307
|
<a href="#PassengerDefaultUser">passenger_default_user</a>.</p></div>
|
2973
3308
|
</div>
|
2974
3309
|
<div class="sect3">
|
2975
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="
|
3310
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_show_version_in_header_lt_on_off_gt"></span><h4 data-comment-topic="passenger-show-version-in-header-on-off--2h49av" data-anchor="_passenger_show_version_in_header_lt_on_off_gt">6.11.6. passenger_show_version_in_header <on|off></h4>
|
3311
|
+
<div class="paragraph"><p>When turned on, Phusion Passenger will output its version number in the <span class="monospaced">Server</span> and <span class="monospaced">X-Powered-By</span> header in all Phusion Passenger-served requests:</p></div>
|
3312
|
+
<div class="listingblock">
|
3313
|
+
<div class="content monospaced">
|
3314
|
+
<pre>Server: nginx/1.3.11 + Phusion Passenger 4.0.0
|
3315
|
+
X-Powered-By: Phusion Passenger 4.0.0</pre>
|
3316
|
+
</div>
|
3317
|
+
</div>
|
3318
|
+
<div class="paragraph"><p>When turned off, the version number will be hidden:</p></div>
|
3319
|
+
<div class="listingblock">
|
3320
|
+
<div class="content monospaced">
|
3321
|
+
<pre>Server: nginx/1.3.11 + Phusion Passenger
|
3322
|
+
X-Powered-By: Phusion Passenger</pre>
|
3323
|
+
</div>
|
3324
|
+
</div>
|
3325
|
+
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
3326
|
+
<div class="ulist"><ul>
|
3327
|
+
<li>
|
3328
|
+
<p>
|
3329
|
+
In the <em>http</em> configuration block.
|
3330
|
+
</p>
|
3331
|
+
</li>
|
3332
|
+
<li>
|
3333
|
+
<p>
|
3334
|
+
In a <em>server</em> configuration block.
|
3335
|
+
</p>
|
3336
|
+
</li>
|
3337
|
+
<li>
|
3338
|
+
<p>
|
3339
|
+
In a <em>location</em> configuration block.
|
3340
|
+
</p>
|
3341
|
+
</li>
|
3342
|
+
<li>
|
3343
|
+
<p>
|
3344
|
+
In an <em>if</em> configuration scope.
|
3345
|
+
</p>
|
3346
|
+
</li>
|
3347
|
+
</ul></div>
|
3348
|
+
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>on</em>.</p></div>
|
3349
|
+
</div>
|
3350
|
+
<div class="sect3">
|
3351
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_friendly_error_pages_lt_on_off_gt"></span><h4 data-comment-topic="passenger-friendly-error-pages-on-off--1ti1a0e" data-anchor="_passenger_friendly_error_pages_lt_on_off_gt">6.11.7. passenger_friendly_error_pages <on|off></h4>
|
2976
3352
|
<div class="paragraph"><p>Phusion Passenger can display friendly error pages whenever an application fails
|
2977
3353
|
to start. This friendly error page presents the startup error message, some
|
2978
3354
|
suggestions for solving the problem, and a backtrace. This feature is very useful
|
@@ -3007,9 +3383,9 @@ In an <em>if</em> configuration scope.
|
|
3007
3383
|
</div>
|
3008
3384
|
</div>
|
3009
3385
|
<div class="sect2">
|
3010
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_resource_control_and_optimization_options"></span><h3 data-comment-topic="resource-control-and-optimization-options-xd7evs" data-anchor="_resource_control_and_optimization_options">6.
|
3386
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_resource_control_and_optimization_options"></span><h3 data-comment-topic="resource-control-and-optimization-options-xd7evs" data-anchor="_resource_control_and_optimization_options">6.12. Resource control and optimization options</h3>
|
3011
3387
|
<div class="sect3">
|
3012
|
-
<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.
|
3388
|
+
<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 <integer></h4>
|
3013
3389
|
<div class="paragraph"><p>The maximum number of <a href="#application_process">application processes</a> that may
|
3014
3390
|
simultanously exist. A larger number results in higher memory usage,
|
3015
3391
|
but improved ability to handle concurrent HTTP clients.</p></div>
|
@@ -3023,7 +3399,7 @@ is also running other services such as MySQL, then we recommend a value of <em>2
|
|
3023
3399
|
(i.e. running out of memory) then you should lower this value. (Though if your
|
3024
3400
|
sites are really that popular, then you should strongly consider upgrading your
|
3025
3401
|
hardware or getting more servers.)</p></div>
|
3026
|
-
<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration
|
3402
|
+
<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.
|
3027
3403
|
The default value is <em>6</em>.</p></div>
|
3028
3404
|
<div class="admonitionblock">
|
3029
3405
|
<table><tr>
|
@@ -3036,7 +3412,7 @@ by about 33%, and it’s not hard to install.</td>
|
|
3036
3412
|
</div>
|
3037
3413
|
</div>
|
3038
3414
|
<div class="sect3">
|
3039
|
-
<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.
|
3415
|
+
<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 <integer></h4>
|
3040
3416
|
<div class="paragraph"><p>This specifies the minimum number of application processes that should exist for a
|
3041
3417
|
given application. You should set this option to a
|
3042
3418
|
non-zero value if you want to avoid potentially long startup times after a website
|
@@ -3111,7 +3487,7 @@ In an <em>if</em> configuration scope.
|
|
3111
3487
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1</em>.</p></div>
|
3112
3488
|
</div>
|
3113
3489
|
<div class="sect3">
|
3114
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_max_instances_lt_integer_gt"></span><h4 data-comment-topic="passenger-max-instances" data-anchor="_passenger_max_instances_lt_integer_gt">6.
|
3490
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_max_instances_lt_integer_gt"></span><h4 data-comment-topic="passenger-max-instances" data-anchor="_passenger_max_instances_lt_integer_gt">6.12.3. passenger_max_instances <integer></h4>
|
3115
3491
|
<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
|
3116
3492
|
<div class="paragraph"><p>The maximum number of application processes that may simultaneously exist
|
3117
3493
|
for an application. This helps to make sure that a single application
|
@@ -3162,7 +3538,7 @@ on the other hand will be free to spawn up to 10 processes if it gets a lot of t
|
|
3162
3538
|
</div>
|
3163
3539
|
</div>
|
3164
3540
|
<div class="sect3">
|
3165
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_max_instances_per_app_lt_integer_gt"></span><h4 data-comment-topic="passenger-max-instances-per-app-integer--1xhbbne" data-anchor="_passenger_max_instances_per_app_lt_integer_gt">6.
|
3541
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_max_instances_per_app_lt_integer_gt"></span><h4 data-comment-topic="passenger-max-instances-per-app-integer--1xhbbne" data-anchor="_passenger_max_instances_per_app_lt_integer_gt">6.12.4. passenger_max_instances_per_app <integer></h4>
|
3166
3542
|
<div class="paragraph"><p>The maximum number of application processes that may simultaneously exist
|
3167
3543
|
for a single application. This helps to make sure that a single application
|
3168
3544
|
will not occupy all available slots in the application pool.</p></div>
|
@@ -3174,7 +3550,7 @@ will be enforced.</p></div>
|
|
3174
3550
|
The default value is <em>0</em>.</p></div>
|
3175
3551
|
</div>
|
3176
3552
|
<div class="sect3">
|
3177
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerPoolIdleTime"></span><h4 data-comment-topic="passenger-pool-idle-time-integer--xcw65o" data-anchor="PassengerPoolIdleTime">6.
|
3553
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerPoolIdleTime"></span><h4 data-comment-topic="passenger-pool-idle-time-integer--xcw65o" data-anchor="PassengerPoolIdleTime">6.12.5. passenger_pool_idle_time <integer></h4>
|
3178
3554
|
<div class="paragraph"><p>The maximum number of seconds that an application process may be idle. That is,
|
3179
3555
|
if an application process hasn’t received any traffic after the given number of
|
3180
3556
|
seconds, then it will be shutdown in order to conserve memory.</p></div>
|
@@ -3196,7 +3572,7 @@ applications, each which must be available at all times.</p></div>
|
|
3196
3572
|
The default value is <em>300</em>.</p></div>
|
3197
3573
|
</div>
|
3198
3574
|
<div class="sect3">
|
3199
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_max_preloader_idle_time_lt_integer_gt"></span><h4 data-comment-topic="rails-app-spawner-idle-time-integer--1xjqe4b" data-anchor="_passenger_max_preloader_idle_time_lt_integer_gt">6.
|
3575
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_max_preloader_idle_time_lt_integer_gt"></span><h4 data-comment-topic="rails-app-spawner-idle-time-integer--1xjqe4b" data-anchor="_passenger_max_preloader_idle_time_lt_integer_gt">6.12.6. passenger_max_preloader_idle_time <integer></h4>
|
3200
3576
|
<div class="paragraph"><p>The ApplicationSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
|
3201
3577
|
Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
|
3202
3578
|
anything for a given period.</p></div>
|
@@ -3235,7 +3611,7 @@ In an <em>if</em> configuration scope.
|
|
3235
3611
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>300</em> (5 minutes).</p></div>
|
3236
3612
|
</div>
|
3237
3613
|
<div class="sect3">
|
3238
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerConcurrencyModel"></span><h4 data-comment-topic="passenger-concurrency-model-process-thread--brcvkk" data-anchor="PassengerConcurrencyModel">6.
|
3614
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerConcurrencyModel"></span><h4 data-comment-topic="passenger-concurrency-model-process-thread--brcvkk" data-anchor="PassengerConcurrencyModel">6.12.7. passenger_concurrency_model <process|thread></h4>
|
3239
3615
|
<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 4.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
|
3240
3616
|
<div class="paragraph"><p>Specifies the I/O concurrency model that should be used for application processes. Phusion Passenger supports two concurrency models:</p></div>
|
3241
3617
|
<div class="ulist"><ul>
|
@@ -3276,7 +3652,7 @@ In an <em>if</em> configuration scope.
|
|
3276
3652
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>process</em>.</p></div>
|
3277
3653
|
</div>
|
3278
3654
|
<div class="sect3">
|
3279
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerThreadCount"></span><h4 data-comment-topic="passenger-thread-count-number--1kd6ffy" data-anchor="PassengerThreadCount">6.
|
3655
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerThreadCount"></span><h4 data-comment-topic="passenger-thread-count-number--1kd6ffy" data-anchor="PassengerThreadCount">6.12.8. passenger_thread_count <number></h4>
|
3280
3656
|
<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 4.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
|
3281
3657
|
<div class="paragraph"><p>Specifies the number of threads that Phusion Passenger should spawn per application process. This option only has effect if <a href="#PassengerConcurrencyModel">passenger_concurrency_model</a> is <em>thread</em>.</p></div>
|
3282
3658
|
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
@@ -3305,7 +3681,7 @@ In an <em>if</em> configuration scope.
|
|
3305
3681
|
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1</em>.</p></div>
|
3306
3682
|
</div>
|
3307
3683
|
<div class="sect3">
|
3308
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMaxRequests"></span><h4 data-comment-topic="passenger-max-requests-integer--sgzint" data-anchor="PassengerMaxRequests">6.
|
3684
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMaxRequests"></span><h4 data-comment-topic="passenger-max-requests-integer--sgzint" data-anchor="PassengerMaxRequests">6.12.9. passenger_max_requests <integer></h4>
|
3309
3685
|
<div class="paragraph"><p>The maximum number of requests an application process will process. After
|
3310
3686
|
serving that many requests, the application process will be shut down and
|
3311
3687
|
Phusion Passenger will restart it. A value of 0 means that there is no maximum:
|
@@ -3353,7 +3729,7 @@ measure to avoid memory leaks.</p></div>
|
|
3353
3729
|
</div>
|
3354
3730
|
</div>
|
3355
3731
|
<div class="sect3">
|
3356
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMaxRequestTime"></span><h4 data-comment-topic="passenger-max-request-time-seconds--1htog2g" data-anchor="PassengerMaxRequestTime">6.
|
3732
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMaxRequestTime"></span><h4 data-comment-topic="passenger-max-request-time-seconds--1htog2g" data-anchor="PassengerMaxRequestTime">6.12.10. passenger_max_request_time <seconds></h4>
|
3357
3733
|
<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
|
3358
3734
|
<div class="paragraph"><p>The maximum amount of time, in seconds, that an application process may take
|
3359
3735
|
to process a request. If the request takes longer than this amount of time,
|
@@ -3424,7 +3800,7 @@ measure to avoid freezing applications.</p></div>
|
|
3424
3800
|
</div>
|
3425
3801
|
</div>
|
3426
3802
|
<div class="sect3">
|
3427
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMemoryLimit"></span><h4 data-comment-topic="passenger-memory-limit-integer--1ry7dwx" data-anchor="PassengerMemoryLimit">6.
|
3803
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMemoryLimit"></span><h4 data-comment-topic="passenger-memory-limit-integer--1ry7dwx" data-anchor="PassengerMemoryLimit">6.12.11. passenger_memory_limit <integer></h4>
|
3428
3804
|
<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
|
3429
3805
|
<div class="paragraph"><p>The maximum amount of memory that an application process may use, in megabytes.
|
3430
3806
|
Once an application process has surpassed its memory limit, it will process
|
@@ -3456,7 +3832,7 @@ In an <em>if</em> configuration scope.
|
|
3456
3832
|
</p>
|
3457
3833
|
</li>
|
3458
3834
|
</ul></div>
|
3459
|
-
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>
|
3835
|
+
<div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
|
3460
3836
|
<div class="admonitionblock">
|
3461
3837
|
<table><tr>
|
3462
3838
|
<td class="icon">
|
@@ -3464,33 +3840,12 @@ In an <em>if</em> configuration scope.
|
|
3464
3840
|
</td>
|
3465
3841
|
<td class="content">
|
3466
3842
|
<div class="title">A word about permissions</div>
|
3467
|
-
<div class="paragraph"><p>The <a href="#PassengerMemoryLimit">passenger_memory_limit</a> directive
|
3468
|
-
|
3469
|
-
|
3470
|
-
|
3471
|
-
|
3472
|
-
|
3473
|
-
this directive and your <span class="monospaced">/proc</span> permissions are too tight, then please consider
|
3474
|
-
untightening the permissions.</p></div>
|
3475
|
-
</td>
|
3476
|
-
</tr></table>
|
3477
|
-
</div>
|
3478
|
-
<div class="admonitionblock">
|
3479
|
-
<table><tr>
|
3480
|
-
<td class="icon">
|
3481
|
-
<img src="./images/icons/tip.png" alt="Tip">
|
3482
|
-
</td>
|
3483
|
-
<td class="content">
|
3484
|
-
<div class="title">FreeBSD and <span class="monospaced">/proc</span>
|
3485
|
-
</div>
|
3486
|
-
<div class="paragraph"><p>On many FreeBSD systems, <span class="monospaced">/proc</span> is not mounted by default. <span class="monospaced">/proc</span> <strong>must</strong> be
|
3487
|
-
mounted in order for <a href="#PassengerMemoryLimit">passenger_memory_limit</a> to work.</p></div>
|
3488
|
-
<div class="paragraph"><p>It is also advised that you mount <span class="monospaced">/proc</span> with the <span class="monospaced">linprocfs</span> filesystem type
|
3489
|
-
instead of the regular FreeBSD <span class="monospaced">proc</span> filesystem type. The <span class="monospaced">linprocfs</span> filesystem
|
3490
|
-
type allows Phusion Passenger to read memory information from <span class="monospaced">/proc</span> directly,
|
3491
|
-
which is very fast. If you mount <span class="monospaced">/proc</span> with a different filesystem type, then
|
3492
|
-
Phusion Passenger must resort to querying memory information from the <span class="monospaced">ps</span> command,
|
3493
|
-
which is a lot slower.</p></div>
|
3843
|
+
<div class="paragraph"><p>The <a href="#PassengerMemoryLimit">passenger_memory_limit</a> directive uses the
|
3844
|
+
<span class="monospaced">ps</span> command to query memory usage information. On Linux, it further
|
3845
|
+
queries <span class="monospaced">/proc</span> to obtain additional memory usage information that’s
|
3846
|
+
not obtainable through <span class="monospaced">ps</span>. You should ensure that the <span class="monospaced">ps</span> works
|
3847
|
+
correctly and that the <span class="monospaced">/proc</span> filesystem is accessible by the
|
3848
|
+
<span class="monospaced">PassengerHelperAgent</span> process.</p></div>
|
3494
3849
|
</td>
|
3495
3850
|
</tr></table>
|
3496
3851
|
</div>
|
@@ -3510,7 +3865,7 @@ measure to avoid memory leaks.</p></div>
|
|
3510
3865
|
</div>
|
3511
3866
|
</div>
|
3512
3867
|
<div class="sect3">
|
3513
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerPreStart"></span><h4 data-comment-topic="passenger-pre-start-url--npldeb" data-anchor="PassengerPreStart">6.
|
3868
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerPreStart"></span><h4 data-comment-topic="passenger-pre-start-url--npldeb" data-anchor="PassengerPreStart">6.12.12. passenger_pre_start <url></h4>
|
3514
3869
|
<div class="paragraph"><p>By default, Phusion Passenger does not start any application processes until said
|
3515
3870
|
web application is first accessed. The result is that the first visitor of said
|
3516
3871
|
web application might experience a small delay as Phusion Passenger is starting
|
@@ -3725,9 +4080,9 @@ the request ending up at a different web server in the cluster.</p></div>
|
|
3725
4080
|
</div>
|
3726
4081
|
</div>
|
3727
4082
|
<div class="sect2">
|
3728
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_logging_and_debugging_options"></span><h3 data-comment-topic="logging-and-debugging-options-14e91ni" data-anchor="_logging_and_debugging_options">6.
|
4083
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_logging_and_debugging_options"></span><h3 data-comment-topic="logging-and-debugging-options-14e91ni" data-anchor="_logging_and_debugging_options">6.13. Logging and debugging options</h3>
|
3729
4084
|
<div class="sect3">
|
3730
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_log_level_lt_integer_gt"></span><h4 data-comment-topic="passenger-log-level-integer--17snhon" data-anchor="_passenger_log_level_lt_integer_gt">6.
|
4085
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_log_level_lt_integer_gt"></span><h4 data-comment-topic="passenger-log-level-integer--17snhon" data-anchor="_passenger_log_level_lt_integer_gt">6.13.1. passenger_log_level <integer></h4>
|
3731
4086
|
<div class="paragraph"><p>This option allows one to specify how much information Phusion Passenger should
|
3732
4087
|
write to the Nginx error log file. A higher log level value means that more
|
3733
4088
|
information will be logged.</p></div>
|
@@ -3760,14 +4115,14 @@ information will be logged.</p></div>
|
|
3760
4115
|
The default is <em>0</em>.</p></div>
|
3761
4116
|
</div>
|
3762
4117
|
<div class="sect3">
|
3763
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_debug_log_file_lt_filename_gt"></span><h4 data-comment-topic="passenger-debug-log-file-filename--21ubaj" data-anchor="_passenger_debug_log_file_lt_filename_gt">6.
|
4118
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_debug_log_file_lt_filename_gt"></span><h4 data-comment-topic="passenger-debug-log-file-filename--21ubaj" data-anchor="_passenger_debug_log_file_lt_filename_gt">6.13.2. passenger_debug_log_file <filename></h4>
|
3764
4119
|
<div class="paragraph"><p>By default Phusion Passenger debugging and error messages are written to the global
|
3765
4120
|
web server error log. This option allows one to specify the file that debugging and
|
3766
4121
|
error messages should be written to instead.</p></div>
|
3767
4122
|
<div class="paragraph"><p>This option may only occur once, in the <em>http</em> configuration block.</p></div>
|
3768
4123
|
</div>
|
3769
4124
|
<div class="sect3">
|
3770
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_debugger_lt_on_off_gt"></span><h4 data-comment-topic="passenger-debugger-on-off--1wkuq85" data-anchor="_passenger_debugger_lt_on_off_gt">6.
|
4125
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passenger_debugger_lt_on_off_gt"></span><h4 data-comment-topic="passenger-debugger-on-off--1wkuq85" data-anchor="_passenger_debugger_lt_on_off_gt">6.13.3. passenger_debugger <on|off></h4>
|
3771
4126
|
<div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
|
3772
4127
|
<div class="paragraph"><p>Turns support for application debugging on or off. In case of Ruby applications,
|
3773
4128
|
turning this option on will cause them to load the <span class="monospaced">ruby-debug</span> gem (when on Ruby 1.8)
|
@@ -3807,9 +4162,9 @@ In an <em>if</em> configuration scope.
|
|
3807
4162
|
</div>
|
3808
4163
|
</div>
|
3809
4164
|
<div class="sect2">
|
3810
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_ruby_on_rails_specific_options"></span><h3 data-comment-topic="ruby-on-rails-specific-options-12vfokt" data-anchor="_ruby_on_rails_specific_options">6.
|
4165
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_ruby_on_rails_specific_options"></span><h3 data-comment-topic="ruby-on-rails-specific-options-12vfokt" data-anchor="_ruby_on_rails_specific_options">6.14. Ruby on Rails-specific options</h3>
|
3811
4166
|
<div class="sect3">
|
3812
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="RailsEnv"></span><h4 data-comment-topic="rails-env-string--jlh7v9" data-anchor="RailsEnv">6.
|
4167
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="RailsEnv"></span><h4 data-comment-topic="rails-env-string--jlh7v9" data-anchor="RailsEnv">6.14.1. rails_env <string></h4>
|
3813
4168
|
<div class="paragraph"><p>This option allows one to specify the default <span class="monospaced">RAILS_ENV</span> value.</p></div>
|
3814
4169
|
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
3815
4170
|
<div class="ulist"><ul>
|
@@ -3838,9 +4193,9 @@ In an <em>if</em> configuration scope.
|
|
3838
4193
|
</div>
|
3839
4194
|
</div>
|
3840
4195
|
<div class="sect2">
|
3841
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_rack_and_rails_gt_3_specific_options"></span><h3 data-comment-topic="rack-specific-options-13yvdxs" data-anchor="_rack_and_rails_gt_3_specific_options">6.
|
4196
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_rack_and_rails_gt_3_specific_options"></span><h3 data-comment-topic="rack-specific-options-13yvdxs" data-anchor="_rack_and_rails_gt_3_specific_options">6.15. Rack and Rails >= 3 specific options</h3>
|
3842
4197
|
<div class="sect3">
|
3843
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="RackEnv"></span><h4 data-comment-topic="rack-env-string--tqmrt0" data-anchor="RackEnv">6.
|
4198
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="RackEnv"></span><h4 data-comment-topic="rack-env-string--tqmrt0" data-anchor="RackEnv">6.15.1. rack_env <string></h4>
|
3844
4199
|
<div class="paragraph"><p>This option allows one to specify the default <span class="monospaced">RACK_ENV</span> value.</p></div>
|
3845
4200
|
<div class="paragraph"><p>This option may occur in the following places:</p></div>
|
3846
4201
|
<div class="ulist"><ul>
|
@@ -3869,11 +4224,11 @@ In an <em>if</em> configuration scope.
|
|
3869
4224
|
</div>
|
3870
4225
|
</div>
|
3871
4226
|
<div class="sect2">
|
3872
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deprecated_options"></span><h3 data-comment-topic="deprecated-options-1dtzo0g" data-anchor="_deprecated_options">6.
|
4227
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deprecated_options"></span><h3 data-comment-topic="deprecated-options-1dtzo0g" data-anchor="_deprecated_options">6.16. Deprecated options</h3>
|
3873
4228
|
<div class="paragraph"><p>The following options have been deprecated, but are still supported for backwards
|
3874
4229
|
compatibility reasons.</p></div>
|
3875
4230
|
<div class="sect3">
|
3876
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_rails_spawn_method"></span><h4 data-comment-topic="rails-spawn-method-17vdnpt" data-anchor="_rails_spawn_method">6.
|
4231
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_rails_spawn_method"></span><h4 data-comment-topic="rails-spawn-method-17vdnpt" data-anchor="_rails_spawn_method">6.16.1. rails_spawn_method</h4>
|
3877
4232
|
<div class="paragraph"><p>Deprecated in favor of <a href="#PassengerSpawnMethod">passenger_spawn_method</a>.</p></div>
|
3878
4233
|
</div>
|
3879
4234
|
</div>
|
@@ -4052,22 +4407,7 @@ sessions compared to the others, then there might be a problem:</p></div>
|
|
4052
4407
|
+---- "spike"</pre>
|
4053
4408
|
</div>
|
4054
4409
|
</div>
|
4055
|
-
<div class="paragraph"><p>
|
4056
|
-
<div class="olist arabic"><ol class="arabic">
|
4057
|
-
<li>
|
4058
|
-
<p>
|
4059
|
-
Your application is busy processing a request that takes a very long time.
|
4060
|
-
If this is the case, then you might want to turn
|
4061
|
-
<a href="#PassengerUseGlobalQueue">global queuing</a> on.
|
4062
|
-
</p>
|
4063
|
-
</li>
|
4064
|
-
<li>
|
4065
|
-
<p>
|
4066
|
-
Your application is frozen, i.e. has stopped responding. See
|
4067
|
-
<a href="#debugging_frozen">Debugging frozen applications</a> for tips.
|
4068
|
-
</p>
|
4069
|
-
</li>
|
4070
|
-
</ol></div>
|
4410
|
+
<div class="paragraph"><p>The most likely reason why a spike occurs is because your application is frozen, i.e. it has stopped responding. See <a href="#debugging_frozen">Debugging frozen applications</a> for tips.</p></div>
|
4071
4411
|
</div>
|
4072
4412
|
<div class="sect2">
|
4073
4413
|
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="debugging_frozen"></span><h3 data-comment-topic="debugging-frozen-applications-qoctl8" data-anchor="debugging_frozen">7.3. Debugging frozen applications</h3>
|
@@ -4283,48 +4623,7 @@ the application startup file. In this file you can do whatever you need to setup
|
|
4283
4623
|
or a similar system.</p></div>
|
4284
4624
|
</div>
|
4285
4625
|
<div class="sect2">
|
4286
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="
|
4287
|
-
<div class="paragraph"><p>It is possible to relocate the Phusion Passenger files to a different directory. It
|
4288
|
-
involves two steps:</p></div>
|
4289
|
-
<div class="olist arabic"><ol class="arabic">
|
4290
|
-
<li>
|
4291
|
-
<p>
|
4292
|
-
Moving the directory.
|
4293
|
-
</p>
|
4294
|
-
</li>
|
4295
|
-
<li>
|
4296
|
-
<p>
|
4297
|
-
Updating the “PassengerRoot” configuration option in Apache.
|
4298
|
-
</p>
|
4299
|
-
</li>
|
4300
|
-
</ol></div>
|
4301
|
-
<div class="paragraph"><p>For example, if Phusion Passenger is located in <em>/opt/passenger/</em>, and you’d like to
|
4302
|
-
move it to <em>/usr/local/passenger/</em>, then do this:</p></div>
|
4303
|
-
<div class="olist arabic"><ol class="arabic">
|
4304
|
-
<li>
|
4305
|
-
<p>
|
4306
|
-
Run the following command:
|
4307
|
-
</p>
|
4308
|
-
<div class="listingblock">
|
4309
|
-
<div class="content monospaced">
|
4310
|
-
<pre>mv /opt/passenger /usr/local/passenger</pre>
|
4311
|
-
</div>
|
4312
|
-
</div>
|
4313
|
-
</li>
|
4314
|
-
<li>
|
4315
|
-
<p>
|
4316
|
-
Edit your Apache configuration file, and set:
|
4317
|
-
</p>
|
4318
|
-
<div class="listingblock">
|
4319
|
-
<div class="content monospaced">
|
4320
|
-
<pre>PassengerRoot /usr/local/passenger</pre>
|
4321
|
-
</div>
|
4322
|
-
</div>
|
4323
|
-
</li>
|
4324
|
-
</ol></div>
|
4325
|
-
</div>
|
4326
|
-
<div class="sect2">
|
4327
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_multiple_ruby_on_rails_versions"></span><h3 data-comment-topic="installing-multiple-ruby-on-rails-versions-1bp1fff" data-anchor="_installing_multiple_ruby_on_rails_versions">8.6. Installing multiple Ruby on Rails versions</h3>
|
4626
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_multiple_ruby_on_rails_versions"></span><h3 data-comment-topic="installing-multiple-ruby-on-rails-versions-1bp1fff" data-anchor="_installing_multiple_ruby_on_rails_versions">8.5. Installing multiple Ruby on Rails versions</h3>
|
4328
4627
|
<div class="paragraph"><p>Each Ruby on Rails applications that are going to be deployed may require a
|
4329
4628
|
specific Ruby on Rails version. You can install a specific version with
|
4330
4629
|
this command:</p></div>
|
@@ -4338,7 +4637,7 @@ this command:</p></div>
|
|
4338
4637
|
other. Phusion Passenger will automatically make use of the correct version.</p></div>
|
4339
4638
|
</div>
|
4340
4639
|
<div class="sect2">
|
4341
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_making_the_application_restart_after_each_request"></span><h3 data-comment-topic="making-the-application-restart-after-each-request-vimy48" data-anchor="_making_the_application_restart_after_each_request">8.
|
4640
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_making_the_application_restart_after_each_request"></span><h3 data-comment-topic="making-the-application-restart-after-each-request-vimy48" data-anchor="_making_the_application_restart_after_each_request">8.6. Making the application restart after each request</h3>
|
4342
4641
|
<div class="paragraph"><p>In some situations it might be desirable to restart the web application after
|
4343
4642
|
each request, for example when developing a non-Rails application that doesn’t
|
4344
4643
|
support code reloading, or when developing a web framework.</p></div>
|
@@ -4361,7 +4660,7 @@ does not support code reloading.</td>
|
|
4361
4660
|
</div>
|
4362
4661
|
</div>
|
4363
4662
|
<div class="sect2">
|
4364
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="sub_uri_deployment_uri_fix"></span><h3 data-comment-topic="how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-11mzwt6" data-anchor="sub_uri_deployment_uri_fix">8.
|
4663
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="sub_uri_deployment_uri_fix"></span><h3 data-comment-topic="how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-11mzwt6" data-anchor="sub_uri_deployment_uri_fix">8.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</h3>
|
4365
4664
|
<div class="paragraph"><p>Some people experience broken images and other broken static assets when they
|
4366
4665
|
deploy their application to a sub-URI (i.e. <em>http://mysite.com/railsapp/</em>).
|
4367
4666
|
The reason for this usually is that you used a
|
@@ -4399,7 +4698,7 @@ please refer to
|
|
4399
4698
|
<a href="http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html">the Rails API docs</a>.</p></div>
|
4400
4699
|
</div>
|
4401
4700
|
<div class="sect2">
|
4402
|
-
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_out_of_band_garbage_work_and_out_of_band_garbage_collection"></span><h3 data-comment-topic="out-of-band-garbage-work-and-out-of-band-garbage-collection-v89lu2" data-anchor="_out_of_band_garbage_work_and_out_of_band_garbage_collection">8.
|
4701
|
+
<a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_out_of_band_garbage_work_and_out_of_band_garbage_collection"></span><h3 data-comment-topic="out-of-band-garbage-work-and-out-of-band-garbage-collection-v89lu2" data-anchor="_out_of_band_garbage_work_and_out_of_band_garbage_collection">8.8. Out-of-Band Garbage Work and Out-of-Band Garbage Collection</h3>
|
4403
4702
|
<div class="paragraph"><p><strong>Available since Phusion Passenger 4.0.0.</strong></p></div>
|
4404
4703
|
<div class="paragraph"><p><strong>At this time, this feature is only available on Ruby.</strong></p></div>
|
4405
4704
|
<div class="paragraph"><p>The Out-of-Band Work feature allows you to run arbitrary long-running tasks outside normal request cycles. This works by letting current requests to the process finish, then telling the process to perform the out-of-band work, then resuming passing requests to the process after said work is finished.</p></div>
|
@@ -4953,7 +5252,7 @@ has no effect.</p></div>
|
|
4953
5252
|
<div id="footnotes"><hr></div>
|
4954
5253
|
<div id="footer">
|
4955
5254
|
<div id="footer-text">
|
4956
|
-
Last updated 2013-
|
5255
|
+
Last updated 2013-03-03 11:14:55 CET
|
4957
5256
|
</div>
|
4958
5257
|
</div>
|
4959
5258
|
<script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */
|