passenger 4.0.21 → 4.0.23
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.
- checksums.yaml +8 -8
- checksums.yaml.gz.asc +7 -7
- data.tar.gz.asc +7 -7
- data/NEWS +15 -0
- data/Rakefile +4 -2
- data/bin/passenger-install-apache2-module +10 -0
- data/build/debian.rb +9 -3
- data/build/test_basics.rb +2 -1
- data/debian.template/rules.template +7 -0
- data/doc/Users guide Apache.idmap.txt +65 -59
- data/doc/Users guide Apache.txt +169 -164
- data/doc/Users guide Standalone.idmap.txt +20 -14
- data/doc/Users guide Standalone.txt +38 -17
- data/doc/Users guide.txt +6 -6
- data/doc/users_guide_snippets/deployment_basics.txt +37 -0
- data/doc/users_guide_snippets/installation.txt +45 -26
- data/doc/users_guide_snippets/tips.txt +2 -2
- data/ext/boost/atomic/atomic.hpp +1 -1
- data/ext/common/ApplicationPool2/AppTypes.h +1 -1
- data/ext/common/ApplicationPool2/Spawner.h +17 -0
- data/ext/common/Constants.h +1 -1
- data/ext/common/Utils/Dechunker.h +12 -2
- data/ext/common/Utils/ProcessMetricsCollector.h +4 -2
- data/ext/common/Utils/VariantMap.h +21 -2
- data/ext/common/agents/HelperAgent/RequestHandler.cpp +8 -0
- data/ext/common/agents/HelperAgent/RequestHandler.h +13 -2
- data/ext/common/agents/Watchdog/Main.cpp +91 -2
- data/ext/ruby/extconf.rb +9 -0
- data/helper-scripts/meteor-loader.rb +10 -1
- data/lib/phusion_passenger.rb +1 -1
- data/lib/phusion_passenger/console_text_template.rb +4 -2
- data/lib/phusion_passenger/platform_info.rb +1 -1
- data/lib/phusion_passenger/platform_info/apache_detector.rb +17 -22
- data/test/cxx/DechunkerTest.cpp +34 -0
- data/test/cxx/ProcessMetricsCollectorTest.cpp +5 -3
- data/test/cxx/RequestHandlerTest.cpp +27 -0
- data/test/stub/wsgi/passenger_wsgi.py +16 -0
- metadata +3 -2
- metadata.gz.asc +7 -7
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGM1OGIyZTU2ZWU3Nzk3NzQ1MDE0NDhiMWNkMDE0ZGEyNGE3NTRiNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTNhZjE4ZGYzYTFiZjlmMDY4ZDI5ZjE0YzYxMjBiMzI3ZWU3MjlmMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzhhZjIxMTk3NGM2NGQ2ODQ3YjQ2ZjUyZWIyYTYzNTRlOTUzZmI0ZmZhMjFi
|
10
|
+
YWU4MWM3MjBiZTJhZmU0MDVmZmRlMjk4ZTE1YTdmNTNjMmMxY2M2YTQ3ODU3
|
11
|
+
YmRlNmY1YWVmZjBlZDM3Y2Y1MmFhZGI1OTdiYzM3NWY2NGE4MTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Zjg0MzEyYWI0MmZmM2NkZmQ3YTQwODUzYjMwNzNkNTNiZDgzOWJlYzRmMGUx
|
14
|
+
NDkzMDc3Y2Q2MGQwZDg1OWJiNjkwZWZhNjI4MDA2NWVjYmMwYTZiMTNlOWZm
|
15
|
+
MWQ4Y2FkZTI3YjNkMjYzNTU4ZWZjMTg0Yzg2M2YwNmM3YTBlOWE=
|
checksums.yaml.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABAgAGBQJSc3lAAAoJECrHRaUKISqM+OsH/R3TcXty3r868CLzNEfuzuwR
|
6
|
+
KqIdzXfVVufVyQDx8us9fKHCWMJEGQ7Ae3IhONjfWz2AFOn9kPxj+WMfsucYKPg8
|
7
|
+
d6cCFDDE54O6tIRDV0R+MztEOCk+Y2QpjyDBMGUycgnwTIm875zjrlp4hgUMjla+
|
8
|
+
Wp1OVjfK/wrmJs31GgfxCUTKDusn+WDXcZK7M573MpFbUTlk0um76ZIfdDVFSipm
|
9
|
+
t6+8qlfqDdNKzHA+bT4zBEWvvQvjXkmY5fsFtqWb/ATELDi77WwS8gG6JnsgiZUF
|
10
|
+
hrM6VGWNH2cJLL5WJwEEqPzOWrJfiBBHvP0YOuR9ogP9ecogUHfAwgN3wRNkBmI=
|
11
|
+
=hpad
|
12
12
|
-----END PGP SIGNATURE-----
|
data.tar.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
5
|
+
iQEcBAABAgAGBQJSc3k/AAoJECrHRaUKISqM9I4IAI8VFAa5vgqAzoQjbV36YBCS
|
6
|
+
inElj7A0NH/bEOqcFNmu2B3kn4GVUn72/zldo/gbhCJWEVpwNYIwBGUjsc8gQjwY
|
7
|
+
6bXWtf8gjuHbu/z9ZSTacJBf9faLD0tRiYre9qBd4cWdh/tC85vC57nnHMcVwsE4
|
8
|
+
HGd1BBmVDD0dB3J+bOBclLFuQ1OCqXFa3uNtxZThqtNfwcohp4eslmBsGPvFRhsK
|
9
|
+
Di8lKSr/ATa/vXvbCsm2+v4ybREBWRZQyYChdo4FhPp6NxJT2f/CaOWEKwWphr9g
|
10
|
+
onhfcsC316G3ywJb4D+2yF6n3ZZIcQWPwLMqRsq6K704o/NRKC4xEAnYGI95nMI=
|
11
|
+
=//tM
|
12
12
|
-----END PGP SIGNATURE-----
|
data/NEWS
CHANGED
@@ -1,7 +1,22 @@
|
|
1
|
+
Release 4.0.23
|
2
|
+
--------------
|
3
|
+
|
4
|
+
* Fixed compilation problems on GCC 4.8.2 (e.g. Arch Linux 2013-10-27).
|
5
|
+
* Fixed a compatibility problem with Solaris /usr/ccs/bin/make: issue #999.
|
6
|
+
* Support for the Meteor Javascript framework has been open sourced.
|
7
|
+
|
8
|
+
|
9
|
+
Release 4.0.22
|
10
|
+
--------------
|
11
|
+
|
12
|
+
* [Enterprised] Fixed compilation problems on OS X Mavericks.
|
13
|
+
|
14
|
+
|
1
15
|
Release 4.0.21
|
2
16
|
--------------
|
3
17
|
|
4
18
|
* [Nginx] Upgraded the preferred Nginx version to 1.4.3.
|
19
|
+
* Node.js support has been open sourced.
|
5
20
|
* Prelimenary OS X Mavericks support.
|
6
21
|
* Work around an Apache packaging bug in CentOS 5.
|
7
22
|
* Various user friendliness improvements in the documentation and the
|
data/Rakefile
CHANGED
@@ -50,8 +50,10 @@ task :default do
|
|
50
50
|
end
|
51
51
|
|
52
52
|
desc "Remove compiled files"
|
53
|
-
task :clean
|
54
|
-
|
53
|
+
task :clean => 'clean:cache'
|
54
|
+
task 'common:clean' => 'clean:cache'
|
55
|
+
task 'clean:cache' do
|
56
|
+
sh "rm -rf #{OUTPUT_DIR}cache"
|
55
57
|
end
|
56
58
|
|
57
59
|
desc "Remove all generated files"
|
@@ -37,6 +37,7 @@ ENV["PATH"] += ":/usr/sbin:/sbin:/usr/local/sbin"
|
|
37
37
|
|
38
38
|
require 'optparse'
|
39
39
|
require 'stringio'
|
40
|
+
require 'phusion_passenger/constants'
|
40
41
|
require 'phusion_passenger/platform_info/ruby'
|
41
42
|
require 'phusion_passenger/platform_info/apache'
|
42
43
|
require 'phusion_passenger/platform_info/apache_detector'
|
@@ -132,6 +133,15 @@ private
|
|
132
133
|
detector.detect_all
|
133
134
|
detector.report
|
134
135
|
@apache2 = detector.result_for(PlatformInfo.apxs2)
|
136
|
+
if @apache2.nil?
|
137
|
+
# Yes this can happen (see https://groups.google.com/forum/#!topic/phusion-passenger/JcUJOBzILB4)
|
138
|
+
# but I have no idea how and why. I need people who can help me reproduce this.
|
139
|
+
# Until then, let's output an error.
|
140
|
+
raise "An internal error occurred. No information detected for #{PlatformInfo.apxs2} " +
|
141
|
+
"(@apache2 is nil). Please contact this program's authors for support, and please " +
|
142
|
+
"attach the full output of this installer, as well as the full output of the command " +
|
143
|
+
"'passenger-config --detect-apache2'."
|
144
|
+
end
|
135
145
|
if detector.results.size > 1
|
136
146
|
other_installs = detector.results - [@apache2]
|
137
147
|
render_template 'apache2/multiple_apache_installations_detected',
|
data/build/debian.rb
CHANGED
@@ -83,7 +83,8 @@ task 'debian:orig_tarball' => Packaging::PREGENERATED_FILES do
|
|
83
83
|
sh "mkdir -p #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}"
|
84
84
|
recursive_copy_files(DEBIAN_ORIG_TARBALL_FILES.call, "#{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}")
|
85
85
|
sh "cd #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION} && tar xzf #{local_nginx_tarball}"
|
86
|
-
sh "cd #{PKG_DIR} &&
|
86
|
+
sh "cd #{PKG_DIR} && find #{DEBIAN_NAME}_#{PACKAGE_VERSION} -print0 | xargs -0 touch -d '2013-10-27 00:00:00 UTC'"
|
87
|
+
sh "cd #{PKG_DIR} && tar -c #{DEBIAN_NAME}_#{PACKAGE_VERSION} | gzip --no-name --best > #{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz"
|
87
88
|
end
|
88
89
|
end
|
89
90
|
|
@@ -160,10 +161,15 @@ end
|
|
160
161
|
|
161
162
|
def create_debian_binary_package_task(distribution, arch)
|
162
163
|
task "debian:binary_package:#{distribution}_#{arch}" => 'debian:binary_packages:check' do
|
164
|
+
require 'shellwords'
|
163
165
|
base_name = "#{DEBIAN_NAME}_#{PACKAGE_VERSION}-1~#{distribution}1"
|
164
|
-
|
166
|
+
logfile = "#{PKG_DIR}/official/passenger_#{distribution}_#{arch}.log"
|
167
|
+
command = "cd #{PKG_DIR}/official && " +
|
165
168
|
"pbuilder-dist #{distribution} #{arch} build #{base_name}.dsc " +
|
166
|
-
"2>&1 |
|
169
|
+
"2>&1 | awk '{ print strftime(\"%Y-%m-%d %H:%M:%S -- \"), $0; fflush(); }'" +
|
170
|
+
" | tee #{logfile}"
|
171
|
+
sh "bash -c #{Shellwords.escape(command)}"
|
172
|
+
sh "echo Done >> #{logfile}"
|
167
173
|
end
|
168
174
|
end
|
169
175
|
|
data/build/test_basics.rb
CHANGED
@@ -51,7 +51,8 @@ task 'test:install_deps' do
|
|
51
51
|
|
52
52
|
if boolean_option('BASE_DEPS', default)
|
53
53
|
sh "#{gem_install} rails -v 2.3.15"
|
54
|
-
sh "#{gem_install}
|
54
|
+
sh "#{gem_install} mime-types -v 1.25"
|
55
|
+
sh "#{gem_install} bundler rspec daemon_controller json rack"
|
55
56
|
end
|
56
57
|
if boolean_option('DOCTOOLS', default)
|
57
58
|
sh "#{gem_install} mizuho bluecloth"
|
@@ -9,6 +9,13 @@
|
|
9
9
|
export USE_CCACHE=1
|
10
10
|
#endif
|
11
11
|
|
12
|
+
# Speed up ccache (reduce I/O) by lightly compressing things.
|
13
|
+
# Always set these variables because pbuilder uses ccache transparently.
|
14
|
+
CCACHE_COMPRESS=1
|
15
|
+
export CCACHE_COMPRESS
|
16
|
+
CCACHE_COMPRESS_LEVEL=3
|
17
|
+
export CCACHE_COMPRESS_LEVEL
|
18
|
+
|
12
19
|
%:
|
13
20
|
dh $@
|
14
21
|
|
@@ -122,123 +122,129 @@
|
|
122
122
|
|
123
123
|
6.2. PassengerDefaultRuby <filename> => passengerdefaultruby-and-passengerruby-7zblp8
|
124
124
|
|
125
|
-
6.3.
|
125
|
+
6.3. Deployment options => deployment-options-1unzrll
|
126
126
|
|
127
|
-
6.
|
127
|
+
6.3.1. PassengerEnabled <on|off> => passengerenabled-on-off--74rzth
|
128
128
|
|
129
|
-
6.
|
129
|
+
6.3.2. PassengerRuby <filename> => passengerruby-filename--1r3fv73
|
130
130
|
|
131
|
-
6.
|
131
|
+
6.3.3. PassengerPython <filename> => passengerpython-filename--1ssesv3
|
132
132
|
|
133
|
-
6.
|
133
|
+
6.3.4. PassengerAppRoot <path/to/root> => passengerapproot-path-to-root--uf24yd
|
134
134
|
|
135
|
-
6.
|
135
|
+
6.3.5. PassengerRestartDir <directory> => passengerrestartdir-directory--1fmhmv0
|
136
136
|
|
137
|
-
6.
|
137
|
+
6.3.6. PassengerRollingRestarts <on|off> => passengerrollingrestarts
|
138
138
|
|
139
|
-
6.
|
139
|
+
6.3.7. PassengerResistDeploymentErrors <on|off> => passengerresistdeploymenterrors
|
140
140
|
|
141
|
-
6.
|
141
|
+
6.4. Process spawning options => process-spawning-options-v2vscm
|
142
142
|
|
143
|
-
6.
|
143
|
+
6.4.1. PassengerSpawnMethod <string> => passengerspawnmethod-string--sodg2y
|
144
144
|
|
145
|
-
6.
|
145
|
+
6.4.2. PassengerLoadShellEnvvars <on|off> => passengerloadshellenvvars-on-off--1290yz1
|
146
146
|
|
147
|
-
6.
|
147
|
+
6.5. Security options => security-options-1pb75ho
|
148
148
|
|
149
|
-
6.
|
149
|
+
6.5.1. PassengerUserSwitching <on|off> => passengeruserswitching
|
150
150
|
|
151
|
-
6.
|
151
|
+
6.5.2. PassengerUser <username> => passengeruser
|
152
152
|
|
153
|
-
6.
|
153
|
+
6.5.3. PassengerGroup <group name> => passengergroup
|
154
154
|
|
155
|
-
6.
|
155
|
+
6.5.4. PassengerDefaultUser <username> => passengerdefaultuser
|
156
156
|
|
157
|
-
6.
|
157
|
+
6.5.5. PassengerDefaultGroup <group name> => passengerdefaultgroup
|
158
158
|
|
159
|
-
6.
|
159
|
+
6.5.6. PassengerFriendlyErrorPages <on|off> => passengerfriendlyerrorpages
|
160
160
|
|
161
|
-
6.
|
161
|
+
6.6. Resource control and optimization options => resource-control-and-optimization-options-zu2f7u
|
162
162
|
|
163
|
-
6.
|
163
|
+
6.6.1. PassengerMaxPoolSize <integer> => passengermaxpoolsize-integer--am64q8
|
164
164
|
|
165
|
-
6.
|
165
|
+
6.6.2. PassengerMinInstances <integer> => passengermininstances-integer--wegq6b
|
166
166
|
|
167
|
-
6.
|
167
|
+
6.6.3. PassengerMaxInstances <integer> => passengermaxinstances
|
168
168
|
|
169
|
-
6.
|
169
|
+
6.6.4. PassengerMaxInstancesPerApp <integer> => passengermaxinstancesperapp
|
170
170
|
|
171
|
-
6.
|
171
|
+
6.6.5. PassengerPoolIdleTime <integer> => passengerpoolidletime-integer--a3gunq
|
172
172
|
|
173
|
-
6.
|
173
|
+
6.6.6. PassengerMaxPreloaderIdleTime <integer> => railsappspawneridletime-integer--1awgog1
|
174
174
|
|
175
|
-
6.
|
175
|
+
6.6.7. PassengerStartTimeout <seconds> => passengerstarttimeout-seconds--ihnfku
|
176
176
|
|
177
|
-
6.
|
177
|
+
6.6.8. PassengerConcurrencyModel <process|thread> => passengerconcurrencymodel-process-thread--1eipofj
|
178
178
|
|
179
|
-
6.
|
179
|
+
6.6.9. PassengerThreadCount <number> => passengerthreadcount-number--10jl64a
|
180
180
|
|
181
|
-
6.
|
181
|
+
6.6.10. PassengerMaxRequests <integer> => passengermaxrequests-integer--17qkw9n
|
182
182
|
|
183
|
-
6.
|
183
|
+
6.6.11. PassengerMaxRequestTime <seconds> => passengermaxrequesttime-seconds--127v1i2
|
184
184
|
|
185
|
-
6.
|
185
|
+
6.6.12. PassengerMemoryLimit <integer> => passengermemorylimit-integer--18irza1
|
186
186
|
|
187
|
-
6.
|
187
|
+
6.6.13. PassengerStatThrottleRate <integer> => passengerstatthrottlerate-integer--1dcfda3
|
188
188
|
|
189
|
-
6.
|
189
|
+
6.6.14. PassengerPreStart <url> => passengerprestart-url--1utb57k
|
190
190
|
|
191
|
-
6.
|
191
|
+
6.6.15. PassengerHighPerformance <on|off> => passengerhighperformance-on-off--nvfa86
|
192
192
|
|
193
|
-
6.
|
193
|
+
6.7. Connection handling options => connection-handling-options-1k3zd1a
|
194
194
|
|
195
|
-
6.
|
195
|
+
6.7.1. PassengerBufferResponse <on|off> => passengerbufferresponse-on-off--1y7ilka
|
196
196
|
|
197
|
-
6.
|
197
|
+
6.7.2. PassengerMaxRequestQueueSize <number> => passenger-max-request-queue-size-number--1f1uocd
|
198
198
|
|
199
|
-
6.
|
199
|
+
6.8. Compatibility options => compatibility-options-8jve5a
|
200
200
|
|
201
|
-
6.
|
201
|
+
6.8.1. PassengerResolveSymlinksInDocumentRoot <on|off> => passengerresolvesymlinksindocumentroot-on-off--1r0qcp8
|
202
202
|
|
203
|
-
6.
|
203
|
+
6.8.2. PassengerAllowEncodedSlashes <on|off> => passengerallowencodedslashes-on-off--1y3s1ww
|
204
204
|
|
205
|
-
6.
|
205
|
+
6.9. Logging and debugging options => logging-and-debugging-options-el2cuc
|
206
206
|
|
207
|
-
6.
|
207
|
+
6.9.1. PassengerLogLevel <integer> => passengerloglevel-integer--s3kbil
|
208
208
|
|
209
|
-
6.
|
209
|
+
6.9.2. PassengerDebugLogFile <filename> => passengerdebuglogfile-filename--1wjm2j1
|
210
210
|
|
211
|
-
6.
|
211
|
+
6.9.3. PassengerDebugger <on|off> => passengerdebugger-on-off--19you7e
|
212
212
|
|
213
|
-
6.
|
213
|
+
6.10. Rack and Rails >= 3 specific options => rack-specific-options-wk9qzt
|
214
214
|
|
215
|
-
6.
|
215
|
+
6.10.1. RackBaseURI <uri> => rackbaseuri-uri--1to24pj
|
216
216
|
|
217
|
-
6.
|
217
|
+
6.10.2. RackEnv <string> => rackenv-string--vve9py
|
218
218
|
|
219
|
-
6.
|
219
|
+
6.11. Classic Ruby on Rails (⇐ 2.x)-specific options => ruby-on-rails-specific-options-1t10wfu
|
220
220
|
|
221
|
-
6.
|
221
|
+
6.11.1. RailsBaseURI <uri> => railsbaseuri-uri--1txrw3k
|
222
222
|
|
223
|
-
6.
|
223
|
+
6.11.2. RailsEnv <string> => railsenv-string--1b0xxvu
|
224
224
|
|
225
|
-
6.
|
225
|
+
6.12. Advanced options => advanced-options-1ab1jkq
|
226
226
|
|
227
|
-
6.
|
227
|
+
6.12.1. PassengerTempDir <directory> => passengertempdir-directory--68h2ng
|
228
228
|
|
229
|
-
6.
|
229
|
+
6.12.2. PassengerUploadBufferDir <directory> => passengeruploadbufferdir-directory--kdr8at
|
230
230
|
|
231
|
-
6.
|
231
|
+
6.13. Deprecated or removed options => deprecated-options-pm9m57
|
232
232
|
|
233
|
-
6.
|
233
|
+
6.13.1. RailsRuby => railsruby-ht09ei
|
234
234
|
|
235
|
-
6.
|
235
|
+
6.13.2. RailsUserSwitching => railsuserswitching-1npx8y4
|
236
236
|
|
237
|
-
6.
|
237
|
+
6.13.3. RailsDefaultUser => railsdefaultuser-19j7n3m
|
238
238
|
|
239
|
-
6.
|
239
|
+
6.13.4. RailsAllowModRewrite => railsallowmodrewrite-1vkziro
|
240
240
|
|
241
|
-
6.
|
241
|
+
6.13.5. RailsSpawnMethod => railsspawnmethod-1aljgpa
|
242
|
+
|
243
|
+
6.13.6. RailsAutoDetect, RackAutoDetect and WsgiAutoDetect => railsautodetect-rackautodetect-and-wsgiautodetect-1qgakzs
|
244
|
+
|
245
|
+
6.13.7. RailsAppSpawnerIdleTime => railsappspawneridletime-heh41r
|
246
|
+
|
247
|
+
6.13.8. RailsFrameworkSpawnerIdleTime => railsframeworkspawneridletime-adcf9k
|
242
248
|
|
243
249
|
7. Troubleshooting => troubleshooting-2ihihi
|
244
250
|
|
data/doc/Users guide Apache.txt
CHANGED
@@ -497,8 +497,43 @@ This option specifies the default Ruby interpreter to use for web apps as well a
|
|
497
497
|
|
498
498
|
This option may occur in the global server configuration. The default value is 'ruby', meaning that the Ruby interpreter will be looked up according to the `PATH` environment variable.
|
499
499
|
|
500
|
+
=== Deployment options
|
501
|
+
|
502
|
+
[[PassengerEnabled]]
|
503
|
+
==== PassengerEnabled <on|off>
|
504
|
+
You can set this option to 'off' to completely disable Phusion Passenger for
|
505
|
+
a certain location. This is useful if, for example, you want to integrate a PHP
|
506
|
+
application into the same virtual host as a Rails application.
|
507
|
+
|
508
|
+
Suppose that you have a Rails application in '/apps/foo'. Suppose that you've
|
509
|
+
dropped Wordpress -- a blogging application written in PHP -- in
|
510
|
+
'/apps/foo/public/wordpress'. You can then configure Phusion Passenger as
|
511
|
+
follows:
|
512
|
+
|
513
|
+
------------------------------------
|
514
|
+
<VirtualHost *:80>
|
515
|
+
ServerName www.foo.com
|
516
|
+
DocumentRoot /apps/foo/public
|
517
|
+
<Directory /apps/foo/public/wordpress>
|
518
|
+
PassengerEnabled off
|
519
|
+
AllowOverride all # <-- Makes Wordpress's .htaccess file work.
|
520
|
+
</Directory>
|
521
|
+
</VirtualHost>
|
522
|
+
------------------------------------
|
523
|
+
|
524
|
+
This way, Phusion Passenger will not interfere with Wordpress.
|
525
|
+
|
526
|
+
'PassengerEnabled' may occur in the following places:
|
527
|
+
|
528
|
+
* In the global server configuration.
|
529
|
+
* In a virtual host configuration block.
|
530
|
+
* In a `<Directory>` or `<Location>` block.
|
531
|
+
* In '.htaccess'.
|
532
|
+
|
533
|
+
In each place, it may be specified at most once. The default value is 'on'.
|
534
|
+
|
500
535
|
[[PassengerRuby]]
|
501
|
-
|
536
|
+
==== PassengerRuby <filename>
|
502
537
|
The `PassengerDefaultRuby` and `PassengerRuby` directives specify the Ruby interpreter to use. Similarly, the `PassengerPython` directive is for specifying the Python interpreter.
|
503
538
|
|
504
539
|
The relationship between `PassengerDefaultRuby` and `PassengerRuby` is as follows:
|
@@ -554,14 +589,14 @@ PassengerPython /usr/bin/python2.6
|
|
554
589
|
|
555
590
|
include::users_guide_snippets/rvm_helper_tool.txt[]
|
556
591
|
|
557
|
-
|
592
|
+
==== PassengerPython <filename>
|
558
593
|
:version: 4.0.0
|
559
594
|
include::users_guide_snippets/since_version.txt[]
|
560
595
|
|
561
596
|
This option allows one to specify the Python interpreter to use. See <<PassengerRuby,PassengerRuby>> for more information. The default value is 'python', meaning that the Python interpreter will be looked up according to the `PATH` environment variable.
|
562
597
|
|
563
598
|
[[PassengerAppRoot]]
|
564
|
-
|
599
|
+
==== PassengerAppRoot <path/to/root>
|
565
600
|
By default, Phusion Passenger assumes that the application's root directory
|
566
601
|
is the parent directory of the 'public' directory. This option allows one to
|
567
602
|
specify the application's root independently from the DocumentRoot, which
|
@@ -587,144 +622,7 @@ Example:
|
|
587
622
|
</VirtualHost>
|
588
623
|
-----------------------------
|
589
624
|
|
590
|
-
|
591
|
-
=== PassengerSpawnMethod <string> ===
|
592
|
-
[TIP]
|
593
|
-
."What spawn method should I use?"
|
594
|
-
=========================================================
|
595
|
-
This subsection attempts to describe spawn methods, but it's okay if you don't (want to)
|
596
|
-
understand it, as it's mostly a technical detail. You can basically follow this rule of thumb:
|
597
|
-
|
598
|
-
************************************************
|
599
|
-
If your application works on Mongrel or Thin, but not on Phusion Passenger, then set
|
600
|
-
`PassengerSpawnMethod` to 'direct'. Otherwise, leave it at 'smart' (the default).
|
601
|
-
************************************************
|
602
|
-
|
603
|
-
However, we do recommend you to try to understand it. The 'smart' spawn
|
604
|
-
method bring many benefits.
|
605
|
-
=========================================================
|
606
|
-
|
607
|
-
include::users_guide_snippets/passenger_spawn_method.txt[]
|
608
|
-
|
609
|
-
This option may occur in the following places:
|
610
|
-
|
611
|
-
* In the global server configuration.
|
612
|
-
* In a virtual host configuration block.
|
613
|
-
|
614
|
-
In each place, it may be specified at most once. The default value is 'smart'.
|
615
|
-
|
616
|
-
[[PassengerLoadShellEnvvars]]
|
617
|
-
=== passengerLoadShellEnvvars <on|off> ===
|
618
|
-
:version: 4.0.20
|
619
|
-
include::users_guide_snippets/since_version.txt[]
|
620
|
-
|
621
|
-
Enables or disables the loading of shell environment variables before spawning the application.
|
622
|
-
|
623
|
-
If this option is turned on, and the user's shell is `bash`, then applications are loaded by running them with `bash -l -c`. Otherwise, they are loaded by running them directly from the `PassengerHelperAgent` process.
|
624
|
-
|
625
|
-
This option may occur in the following places:
|
626
|
-
|
627
|
-
* In the global server configuration.
|
628
|
-
* In a virtual host configuration block.
|
629
|
-
* In a `<Directory>` or `<Location>` block.
|
630
|
-
* In '.htaccess', if `AllowOverride Options` is on.
|
631
|
-
|
632
|
-
In each place, it may be specified at most once. The default value is 'on'.
|
633
|
-
|
634
|
-
[[PassengerEnabled]]
|
635
|
-
=== PassengerEnabled <on|off> ===
|
636
|
-
You can set this option to 'off' to completely disable Phusion Passenger for
|
637
|
-
a certain location. This is useful if, for example, you want to integrate a PHP
|
638
|
-
application into the same virtual host as a Rails application.
|
639
|
-
|
640
|
-
Suppose that you have a Rails application in '/apps/foo'. Suppose that you've
|
641
|
-
dropped Wordpress -- a blogging application written in PHP -- in
|
642
|
-
'/apps/foo/public/wordpress'. You can then configure Phusion Passenger as
|
643
|
-
follows:
|
644
|
-
|
645
|
-
------------------------------------
|
646
|
-
<VirtualHost *:80>
|
647
|
-
ServerName www.foo.com
|
648
|
-
DocumentRoot /apps/foo/public
|
649
|
-
<Directory /apps/foo/public/wordpress>
|
650
|
-
PassengerEnabled off
|
651
|
-
AllowOverride all # <-- Makes Wordpress's .htaccess file work.
|
652
|
-
</Directory>
|
653
|
-
</VirtualHost>
|
654
|
-
------------------------------------
|
655
|
-
|
656
|
-
This way, Phusion Passenger will not interfere with Wordpress.
|
657
|
-
|
658
|
-
'PassengerEnabled' may occur in the following places:
|
659
|
-
|
660
|
-
* In the global server configuration.
|
661
|
-
* In a virtual host configuration block.
|
662
|
-
* In a `<Directory>` or `<Location>` block.
|
663
|
-
* In '.htaccess'.
|
664
|
-
|
665
|
-
In each place, it may be specified at most once. The default value is 'on'.
|
666
|
-
|
667
|
-
[[PassengerTempDir]]
|
668
|
-
=== PassengerTempDir <directory> ===
|
669
|
-
Specifies the directory that Phusion Passenger should use for storing temporary
|
670
|
-
files. This includes things such as Unix socket files, buffered file uploads
|
671
|
-
(see also <<PassengerUploadBufferDir,PassengerUploadBufferDir>>), etc.
|
672
|
-
|
673
|
-
This option may be specified once, in the global server configuration. The
|
674
|
-
default temp directory that Phusion Passenger uses is '/tmp'.
|
675
|
-
|
676
|
-
This option is especially useful if Apache is not allowed to write to /tmp
|
677
|
-
(which is the case on some systems with strict SELinux policies) or if the
|
678
|
-
partition that /tmp lives on doesn't have enough disk space.
|
679
|
-
|
680
|
-
.Command line tools
|
681
|
-
Some Phusion Passenger command line administration tools, such as
|
682
|
-
`passenger-status`, must know what Phusion Passenger's temp directory is
|
683
|
-
in order to function properly. You can pass the directory through the
|
684
|
-
`PASSENGER_TMPDIR` environment variable, or the `TMPDIR` environment variable
|
685
|
-
(the former will be used if both are specified).
|
686
|
-
|
687
|
-
For example, if you set 'PassengerTempDir' to '/my_temp_dir', then invoke
|
688
|
-
`passenger-status` after you've set the `PASSENGER_TMPDIR` or `TMPDIR`
|
689
|
-
environment variable, like this:
|
690
|
-
|
691
|
-
----------------------------------------------------------
|
692
|
-
export PASSENGER_TMPDIR=/my_temp-dir
|
693
|
-
sudo -E passenger-status
|
694
|
-
# The -E option tells 'sudo' to preserve environment variables.
|
695
|
-
----------------------------------------------------------
|
696
|
-
|
697
|
-
[[PassengerUploadBufferDir]]
|
698
|
-
=== PassengerUploadBufferDir <directory> ===
|
699
|
-
Phusion Passenger buffers large file uploads to disk in order prevent slow file
|
700
|
-
uploads from blocking web applications. By default, a subdirectory in the
|
701
|
-
system's temporary files directory (or a subdirectory in the directory specified
|
702
|
-
in <<PassengerTempDir,PassengerTempDir>>, if set) is automatically created for
|
703
|
-
storing these buffered file uploads.
|
704
|
-
|
705
|
-
This configuration directive allows you to specify a different directory for storing
|
706
|
-
buffered file uploads. If you've specified such a directory (as opposed to using
|
707
|
-
Phusion Passenger's default) then you *must* ensure that this directory exists.
|
708
|
-
|
709
|
-
This configuration directive is also useful if you're using apache2-mpm-itk.
|
710
|
-
The buffered file upload directory that Phusion Passenger creates by default has
|
711
|
-
very strict permissions: it can only be accessed by the Apache worker processes.
|
712
|
-
However, Phusion Passenger assumes that all Apache worker processes are running
|
713
|
-
as the same user. apache2-mpm-itk breaks this assumption by running multiple
|
714
|
-
Apache worker processes as different users. So if you're using apace2-mpm-itk,
|
715
|
-
you should set this option to a directory that is writable by all Apache worker
|
716
|
-
processes, such as '/tmp'.
|
717
|
-
|
718
|
-
You may specify 'PassengerUploadBufferDir' in the following places:
|
719
|
-
|
720
|
-
* In the global server configuration.
|
721
|
-
* In a virtual host configuration block.
|
722
|
-
* In a `<Directory>` or `<Location>` block.
|
723
|
-
* In '.htaccess', if `AllowOverrides Options` is enabled.
|
724
|
-
|
725
|
-
In each place, it may be specified at most once.
|
726
|
-
|
727
|
-
=== PassengerRestartDir <directory> ===
|
625
|
+
==== PassengerRestartDir <directory>
|
728
626
|
As described in the deployment chapters of this document, Phusion Passenger
|
729
627
|
checks the file 'tmp/restart.txt' in the applications'
|
730
628
|
<<application_root,root directory>> for restarting applications. Sometimes it
|
@@ -783,7 +681,7 @@ You can prevent this from happening by pointing PassengerRestartDir to a
|
|
783
681
|
directory that's readable by Apache, but only writable by administrators.
|
784
682
|
|
785
683
|
[[PassengerRollingRestarts]]
|
786
|
-
|
684
|
+
==== PassengerRollingRestarts <on|off>
|
787
685
|
:version: 3.0.0
|
788
686
|
include::users_guide_snippets/enterprise_only.txt[]
|
789
687
|
|
@@ -823,7 +721,7 @@ This option may occur in the following places:
|
|
823
721
|
|
824
722
|
In each place, it may be specified at most once. The default value is 'off'.
|
825
723
|
|
826
|
-
|
724
|
+
==== PassengerResistDeploymentErrors <on|off>
|
827
725
|
:version: 3.0.0
|
828
726
|
include::users_guide_snippets/enterprise_only.txt[]
|
829
727
|
|
@@ -850,6 +748,52 @@ This option may occur in the following places:
|
|
850
748
|
|
851
749
|
In each place, it may be specified at most once. The default value is 'off'.
|
852
750
|
|
751
|
+
=== Process spawning options
|
752
|
+
|
753
|
+
[[PassengerSpawnMethod]]
|
754
|
+
==== PassengerSpawnMethod <string>
|
755
|
+
[TIP]
|
756
|
+
."What spawn method should I use?"
|
757
|
+
=========================================================
|
758
|
+
This subsection attempts to describe spawn methods, but it's okay if you don't (want to)
|
759
|
+
understand it, as it's mostly a technical detail. You can basically follow this rule of thumb:
|
760
|
+
|
761
|
+
************************************************
|
762
|
+
If your application works on Mongrel or Thin, but not on Phusion Passenger, then set
|
763
|
+
`PassengerSpawnMethod` to 'direct'. Otherwise, leave it at 'smart' (the default).
|
764
|
+
************************************************
|
765
|
+
|
766
|
+
However, we do recommend you to try to understand it. The 'smart' spawn
|
767
|
+
method bring many benefits.
|
768
|
+
=========================================================
|
769
|
+
|
770
|
+
include::users_guide_snippets/passenger_spawn_method.txt[]
|
771
|
+
|
772
|
+
This option may occur in the following places:
|
773
|
+
|
774
|
+
* In the global server configuration.
|
775
|
+
* In a virtual host configuration block.
|
776
|
+
|
777
|
+
In each place, it may be specified at most once. The default value is 'smart'.
|
778
|
+
|
779
|
+
[[PassengerLoadShellEnvvars]]
|
780
|
+
==== PassengerLoadShellEnvvars <on|off>
|
781
|
+
:version: 4.0.20
|
782
|
+
include::users_guide_snippets/since_version.txt[]
|
783
|
+
|
784
|
+
Enables or disables the loading of shell environment variables before spawning the application.
|
785
|
+
|
786
|
+
If this option is turned on, and the user's shell is `bash`, then applications are loaded by running them with `bash -l -c`. Otherwise, they are loaded by running them directly from the `PassengerHelperAgent` process.
|
787
|
+
|
788
|
+
This option may occur in the following places:
|
789
|
+
|
790
|
+
* In the global server configuration.
|
791
|
+
* In a virtual host configuration block.
|
792
|
+
* In a `<Directory>` or `<Location>` block.
|
793
|
+
* In '.htaccess', if `AllowOverride Options` is on.
|
794
|
+
|
795
|
+
In each place, it may be specified at most once. The default value is 'on'.
|
796
|
+
|
853
797
|
=== Security options ===
|
854
798
|
|
855
799
|
[[PassengerUserSwitching]]
|
@@ -1685,7 +1629,7 @@ if responses can be huge. Because entire responses are buffered in memory when t
|
|
1685
1629
|
=====================================================
|
1686
1630
|
|
1687
1631
|
[[PassengerMaxRequestQueueSize]]
|
1688
|
-
====
|
1632
|
+
==== PassengerMaxRequestQueueSize <number> ====
|
1689
1633
|
:version: 4.0.15
|
1690
1634
|
include::users_guide_snippets/since_version.txt[]
|
1691
1635
|
|
@@ -1828,6 +1772,37 @@ This option may occur in the following places:
|
|
1828
1772
|
|
1829
1773
|
In each place, it may be specified at most once. The default value is 'off'.
|
1830
1774
|
|
1775
|
+
=== Rack and Rails >= 3 specific options ===
|
1776
|
+
|
1777
|
+
[[RackBaseURI]]
|
1778
|
+
==== RackBaseURI <uri> ====
|
1779
|
+
Used to specify that the given URI is a Rack application. See
|
1780
|
+
<<deploying_rack_to_sub_uri,Deploying Rack to a sub URI>> for an example.
|
1781
|
+
|
1782
|
+
It is allowed to specify this option multiple times. Do this to deploy multiple
|
1783
|
+
Rack applications in different sub-URIs under the same virtual host.
|
1784
|
+
|
1785
|
+
This option may occur in the following places:
|
1786
|
+
|
1787
|
+
* In the global server configuration.
|
1788
|
+
* In a virtual host configuration block.
|
1789
|
+
* In a `<Directory>` or `<Location>` block.
|
1790
|
+
* In '.htaccess', if `AllowOverride Options` is on.
|
1791
|
+
|
1792
|
+
[[rack_env]]
|
1793
|
+
==== RackEnv <string> ====
|
1794
|
+
The given value will be accessible in Rack applications in the `RACK_ENV`
|
1795
|
+
environment variable. This allows one to define the environment in which
|
1796
|
+
Rack applications are run, very similar to `RAILS_ENV`.
|
1797
|
+
|
1798
|
+
This option may occur in the following places:
|
1799
|
+
|
1800
|
+
* In the global server configuration.
|
1801
|
+
* In a virtual host configuration block.
|
1802
|
+
* In a `<Directory>` or `<Location>` block.
|
1803
|
+
* In '.htaccess', if `AllowOverride Options` is on.
|
1804
|
+
|
1805
|
+
In each place, it may be specified at most once. The default value is 'production'.
|
1831
1806
|
|
1832
1807
|
=== Classic Ruby on Rails (<= 2.x)-specific options ===
|
1833
1808
|
|
@@ -1862,37 +1837,67 @@ This option may occur in the following places:
|
|
1862
1837
|
|
1863
1838
|
In each place, it may be specified at most once. The default value is 'production'.
|
1864
1839
|
|
1865
|
-
===
|
1840
|
+
=== Advanced options
|
1866
1841
|
|
1867
|
-
[[
|
1868
|
-
====
|
1869
|
-
|
1870
|
-
|
1842
|
+
[[PassengerTempDir]]
|
1843
|
+
==== PassengerTempDir <directory>
|
1844
|
+
Specifies the directory that Phusion Passenger should use for storing temporary
|
1845
|
+
files. This includes things such as Unix socket files, buffered file uploads
|
1846
|
+
(see also <<PassengerUploadBufferDir,PassengerUploadBufferDir>>), etc.
|
1871
1847
|
|
1872
|
-
|
1873
|
-
|
1848
|
+
This option may be specified once, in the global server configuration. The
|
1849
|
+
default temp directory that Phusion Passenger uses is '/tmp'.
|
1874
1850
|
|
1875
|
-
This option
|
1851
|
+
This option is especially useful if Apache is not allowed to write to /tmp
|
1852
|
+
(which is the case on some systems with strict SELinux policies) or if the
|
1853
|
+
partition that /tmp lives on doesn't have enough disk space.
|
1876
1854
|
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1855
|
+
.Command line tools
|
1856
|
+
Some Phusion Passenger command line administration tools, such as
|
1857
|
+
`passenger-status`, must know what Phusion Passenger's temp directory is
|
1858
|
+
in order to function properly. You can pass the directory through the
|
1859
|
+
`PASSENGER_TMPDIR` environment variable, or the `TMPDIR` environment variable
|
1860
|
+
(the former will be used if both are specified).
|
1881
1861
|
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
environment variable. This allows one to define the environment in which
|
1886
|
-
Rack applications are run, very similar to `RAILS_ENV`.
|
1862
|
+
For example, if you set 'PassengerTempDir' to '/my_temp_dir', then invoke
|
1863
|
+
`passenger-status` after you've set the `PASSENGER_TMPDIR` or `TMPDIR`
|
1864
|
+
environment variable, like this:
|
1887
1865
|
|
1888
|
-
|
1866
|
+
----------------------------------------------------------
|
1867
|
+
export PASSENGER_TMPDIR=/my_temp-dir
|
1868
|
+
sudo -E passenger-status
|
1869
|
+
# The -E option tells 'sudo' to preserve environment variables.
|
1870
|
+
----------------------------------------------------------
|
1871
|
+
|
1872
|
+
[[PassengerUploadBufferDir]]
|
1873
|
+
==== PassengerUploadBufferDir <directory>
|
1874
|
+
Phusion Passenger buffers large file uploads to disk in order prevent slow file
|
1875
|
+
uploads from blocking web applications. By default, a subdirectory in the
|
1876
|
+
system's temporary files directory (or a subdirectory in the directory specified
|
1877
|
+
in <<PassengerTempDir,PassengerTempDir>>, if set) is automatically created for
|
1878
|
+
storing these buffered file uploads.
|
1879
|
+
|
1880
|
+
This configuration directive allows you to specify a different directory for storing
|
1881
|
+
buffered file uploads. If you've specified such a directory (as opposed to using
|
1882
|
+
Phusion Passenger's default) then you *must* ensure that this directory exists.
|
1883
|
+
|
1884
|
+
This configuration directive is also useful if you're using apache2-mpm-itk.
|
1885
|
+
The buffered file upload directory that Phusion Passenger creates by default has
|
1886
|
+
very strict permissions: it can only be accessed by the Apache worker processes.
|
1887
|
+
However, Phusion Passenger assumes that all Apache worker processes are running
|
1888
|
+
as the same user. apache2-mpm-itk breaks this assumption by running multiple
|
1889
|
+
Apache worker processes as different users. So if you're using apace2-mpm-itk,
|
1890
|
+
you should set this option to a directory that is writable by all Apache worker
|
1891
|
+
processes, such as '/tmp'.
|
1892
|
+
|
1893
|
+
You may specify 'PassengerUploadBufferDir' in the following places:
|
1889
1894
|
|
1890
1895
|
* In the global server configuration.
|
1891
1896
|
* In a virtual host configuration block.
|
1892
1897
|
* In a `<Directory>` or `<Location>` block.
|
1893
|
-
* In '.htaccess', if `
|
1898
|
+
* In '.htaccess', if `AllowOverrides Options` is enabled.
|
1894
1899
|
|
1895
|
-
In each place, it may be specified at most once.
|
1900
|
+
In each place, it may be specified at most once.
|
1896
1901
|
|
1897
1902
|
=== Deprecated or removed options ===
|
1898
1903
|
|