passenger 4.0.26 → 4.0.27
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- data.tar.gz.asc +7 -7
- data/NEWS +9 -1
- data/doc/Users guide Apache.idmap.txt +24 -26
- data/doc/Users guide Apache.txt +36 -35
- data/doc/Users guide Nginx.idmap.txt +56 -56
- data/doc/Users guide Nginx.txt +125 -117
- data/doc/Users guide Standalone.txt +1 -1
- data/ext/apache2/Configuration.cpp +0 -17
- data/ext/apache2/Configuration.hpp +0 -12
- data/ext/apache2/ConfigurationCommands.cpp +37 -0
- data/ext/apache2/ConfigurationCommands.cpp.erb +13 -0
- data/ext/apache2/ConfigurationFields.hpp +2 -0
- data/ext/apache2/ConfigurationSetters.cpp +8 -0
- data/ext/apache2/CreateDirConfig.cpp +1 -0
- data/ext/apache2/Hooks.cpp +1 -2
- data/ext/apache2/MergeDirConfig.cpp +7 -0
- data/ext/apache2/SetHeaders.cpp +4 -0
- data/ext/common/ApplicationPool2/Spawner.h +1 -1
- data/ext/common/Constants.h +1 -1
- data/ext/common/agents/HelperAgent/RequestHandler.h +1 -1
- data/ext/nginx/CacheLocationConfig.c +3 -3
- data/helper-scripts/node-loader.js +1 -0
- data/lib/phusion_passenger.rb +1 -1
- data/lib/phusion_passenger/apache2/config_options.rb +17 -0
- data/lib/phusion_passenger/nginx/config_options.rb +1 -2
- metadata +2 -2
- metadata.gz.asc +7 -7
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
|
+
iQEcBAABAgAGBQJSoJfRAAoJECrHRaUKISqMhQQIAIwDG+KTIMX7DLZDCYYLz+rN
|
6
|
+
WBM3NTljzYDC4FRXdek4gqfrILupsAAnrbLyEZibYb3+evJwopod2gLAvwq35BzL
|
7
|
+
3QWaDfH1ZYiYA7QgiN1yQNfHQ8hqckxYP/0UF2DqWL/j932oO47zs9XFu7eLrdYN
|
8
|
+
dZTAahRvdFnil+/ZlbrvBk7sJcaLpgnEe/BIarOO6012Y45O5aGzvqJOE2vQU/p2
|
9
|
+
z7iY0fM3WUbg1n0rh2wipiPvwHCIu4Rfr0mPo9AgV5fN4trsY2s8mDf7/dNyKdIf
|
10
|
+
dSuXU/MThKfcHD4jvod5yuxHJdP+FVpViPx61zdJMTGRVhzSo88lo7H5BpGrNzI=
|
11
|
+
=mSss
|
12
12
|
-----END PGP SIGNATURE-----
|
data/NEWS
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
Release 4.0.27
|
2
|
+
--------------
|
3
|
+
|
4
|
+
* [Apache] Fixed a bug in the Apache module which could lock up the Apache
|
5
|
+
process or thread. This is a regression introduced in version 4.0.24.
|
6
|
+
* Node.js application processes now have friendly process titles.
|
7
|
+
|
8
|
+
|
1
9
|
Release 4.0.26
|
2
10
|
--------------
|
3
11
|
|
@@ -12,7 +20,7 @@ Release 4.0.26
|
|
12
20
|
Release 4.0.25
|
13
21
|
--------------
|
14
22
|
|
15
|
-
* The `
|
23
|
+
* The `PassengerAppEnv`/`passenger_app_env`/`--environment` option now also sets NODE_ENV,
|
16
24
|
so that Node.js frameworks like Connect can properly respond to the environment.
|
17
25
|
* Fixed a bug in our Debian/Ubuntu packages causing `passenger-install-nginx-module`
|
18
26
|
not to be able to compile Nginx.
|
@@ -134,15 +134,21 @@
|
|
134
134
|
|
135
135
|
6.3.4. PassengerNodejs <filename> => passengernodejs-filename--2mjb1j
|
136
136
|
|
137
|
-
6.3.5.
|
137
|
+
6.3.5. PassengerAppEnv <string> => passengerappenv-string--s3ojlc
|
138
138
|
|
139
|
-
6.3.6.
|
139
|
+
6.3.6. RailsEnv <string> => railsenv-string--1b0xxvu
|
140
140
|
|
141
|
-
6.3.7.
|
141
|
+
6.3.7. RackEnv <string> => rackenv-string--vve9py
|
142
142
|
|
143
|
-
6.3.8.
|
143
|
+
6.3.8. PassengerAppRoot <path/to/root> => passengerapproot-path-to-root--uf24yd
|
144
144
|
|
145
|
-
6.3.9.
|
145
|
+
6.3.9. PassengerBaseURI <uri> => passengerbaseuri-uri--97i9mm
|
146
|
+
|
147
|
+
6.3.10. PassengerRestartDir <directory> => passengerrestartdir-directory--1fmhmv0
|
148
|
+
|
149
|
+
6.3.11. PassengerRollingRestarts <on|off> => passengerrollingrestarts
|
150
|
+
|
151
|
+
6.3.12. PassengerResistDeploymentErrors <on|off> => passengerresistdeploymenterrors
|
146
152
|
|
147
153
|
6.4. Process spawning options => process-spawning-options-v2vscm
|
148
154
|
|
@@ -220,39 +226,31 @@
|
|
220
226
|
|
221
227
|
6.9.3. PassengerDebugger <on|off> => passengerdebugger-on-off--19you7e
|
222
228
|
|
223
|
-
6.10.
|
224
|
-
|
225
|
-
6.10.1. RackEnv <string> => rackenv-string--vve9py
|
226
|
-
|
227
|
-
6.11. Classic Ruby on Rails (⇐ 2.x)-specific options => ruby-on-rails-specific-options-1t10wfu
|
228
|
-
|
229
|
-
6.11.1. RailsEnv <string> => railsenv-string--1b0xxvu
|
230
|
-
|
231
|
-
6.12. Advanced options => advanced-options-1ab1jkq
|
229
|
+
6.10. Advanced options => advanced-options-1ab1jkq
|
232
230
|
|
233
|
-
6.
|
231
|
+
6.10.1. PassengerTempDir <directory> => passengertempdir-directory--68h2ng
|
234
232
|
|
235
|
-
6.
|
233
|
+
6.10.2. PassengerUploadBufferDir <directory> => passengeruploadbufferdir-directory--kdr8at
|
236
234
|
|
237
|
-
6.
|
235
|
+
6.11. Deprecated or removed options => deprecated-options-pm9m57
|
238
236
|
|
239
|
-
6.
|
237
|
+
6.11.1. RailsRuby => railsruby-ht09ei
|
240
238
|
|
241
|
-
6.
|
239
|
+
6.11.2. RailsBaseURI and RackBaseURI => railsbaseuri-uri--1txrw3k
|
242
240
|
|
243
|
-
6.
|
241
|
+
6.11.3. RailsUserSwitching => railsuserswitching-1npx8y4
|
244
242
|
|
245
|
-
6.
|
243
|
+
6.11.4. RailsDefaultUser => railsdefaultuser-19j7n3m
|
246
244
|
|
247
|
-
6.
|
245
|
+
6.11.5. RailsAllowModRewrite => railsallowmodrewrite-1vkziro
|
248
246
|
|
249
|
-
6.
|
247
|
+
6.11.6. RailsSpawnMethod => railsspawnmethod-1aljgpa
|
250
248
|
|
251
|
-
6.
|
249
|
+
6.11.7. RailsAutoDetect, RackAutoDetect and WsgiAutoDetect => railsautodetect-rackautodetect-and-wsgiautodetect-1qgakzs
|
252
250
|
|
253
|
-
6.
|
251
|
+
6.11.8. RailsAppSpawnerIdleTime => railsappspawneridletime-heh41r
|
254
252
|
|
255
|
-
6.
|
253
|
+
6.11.9. RailsFrameworkSpawnerIdleTime => railsframeworkspawneridletime-adcf9k
|
256
254
|
|
257
255
|
7. Troubleshooting => troubleshooting-2ihihi
|
258
256
|
|
data/doc/Users guide Apache.txt
CHANGED
@@ -647,6 +647,39 @@ include::users_guide_snippets/since_version.txt[]
|
|
647
647
|
|
648
648
|
This option allows one to specify the Node.js command to use. See <<PassengerRuby,PassengerRuby>> for more information. The default value is 'node', meaning that the Node.js command will be looked up according to the `PATH` environment variable.
|
649
649
|
|
650
|
+
[[PassengerAppEnv]]
|
651
|
+
==== PassengerAppEnv <string> ====
|
652
|
+
This option sets the value of the following environment variables:
|
653
|
+
|
654
|
+
* `RAILS_ENV`
|
655
|
+
* `RACK_ENV`
|
656
|
+
* `WSGI_ENV`
|
657
|
+
* `NODE_ENV`
|
658
|
+
* `PASSENGER_APP_ENV`
|
659
|
+
|
660
|
+
Some web frameworks, for example Rails and Connect.js, adjust their behavior according to the value in one of these environment variables.
|
661
|
+
|
662
|
+
Phusion Passenger for Apache sets the default value to **production**. If you're developing an Rails application then you should set this to `development`.
|
663
|
+
|
664
|
+
If you want to set other environment variables, please refer to <<env_vars_passenger_apps,Setting environment variables for Phusion Passenger-served apps>>.
|
665
|
+
|
666
|
+
This option may occur in the following places:
|
667
|
+
|
668
|
+
* In the global server configuration.
|
669
|
+
* In a virtual host configuration block.
|
670
|
+
* In a `<Directory>` or `<Location>` block.
|
671
|
+
* In '.htaccess', if `AllowOverride Options` is on.
|
672
|
+
|
673
|
+
In each place, it may be specified at most once.
|
674
|
+
|
675
|
+
[[rails_env]]
|
676
|
+
==== RailsEnv <string> ====
|
677
|
+
An alias for <<PassengerAppEnv,PassengerAppEnv>>.
|
678
|
+
|
679
|
+
[[rack_env]]
|
680
|
+
==== RackEnv <string> ====
|
681
|
+
An alias for <<PassengerAppEnv,PassengerAppEnv>>.
|
682
|
+
|
650
683
|
[[PassengerAppRoot]]
|
651
684
|
==== PassengerAppRoot <path/to/root>
|
652
685
|
By default, Phusion Passenger assumes that the application's root directory
|
@@ -1638,6 +1671,9 @@ http://www.foo.com/chatroom/ajax_update_poll only.
|
|
1638
1671
|
|
1639
1672
|
[[PassengerBufferUpload]]
|
1640
1673
|
==== PassengerBufferUpload <on|off> ====
|
1674
|
+
:version: 4.0.26
|
1675
|
+
include::users_guide_snippets/since_version.txt[]
|
1676
|
+
|
1641
1677
|
When turned on, HTTP request uploads (HTTP POST request bodies) will be buffered before sending the request to the application. Enabling upload buffering protects the application from slow clients, but will also prevent the ability to track upload progress.
|
1642
1678
|
|
1643
1679
|
If you want to allow your application to track upload progress, it is recommended that you disable upload buffering for specific URIs only. For example:
|
@@ -1907,41 +1943,6 @@ This option may occur in the following places:
|
|
1907
1943
|
|
1908
1944
|
In each place, it may be specified at most once. The default value is 'off'.
|
1909
1945
|
|
1910
|
-
=== Rack and Rails >= 3 specific options ===
|
1911
|
-
|
1912
|
-
[[rack_env]]
|
1913
|
-
==== RackEnv <string> ====
|
1914
|
-
The given value will be accessible in Rack applications in the `RACK_ENV`
|
1915
|
-
environment variable. This allows one to define the environment in which
|
1916
|
-
Rack applications are run, very similar to `RAILS_ENV`.
|
1917
|
-
|
1918
|
-
This option may occur in the following places:
|
1919
|
-
|
1920
|
-
* In the global server configuration.
|
1921
|
-
* In a virtual host configuration block.
|
1922
|
-
* In a `<Directory>` or `<Location>` block.
|
1923
|
-
* In '.htaccess', if `AllowOverride Options` is on.
|
1924
|
-
|
1925
|
-
In each place, it may be specified at most once. The default value is 'production'.
|
1926
|
-
|
1927
|
-
=== Classic Ruby on Rails (<= 2.x)-specific options ===
|
1928
|
-
|
1929
|
-
These options only have effect on classic Ruby on Rails 1.x and 2.x applications.
|
1930
|
-
Ruby on Rails >= 3.x applications are considered Rack applications.
|
1931
|
-
|
1932
|
-
[[rails_env]]
|
1933
|
-
==== RailsEnv <string> ====
|
1934
|
-
This option allows one to specify the default `RAILS_ENV` value.
|
1935
|
-
|
1936
|
-
This option may occur in the following places:
|
1937
|
-
|
1938
|
-
* In the global server configuration.
|
1939
|
-
* In a virtual host configuration block.
|
1940
|
-
* In a `<Directory>` or `<Location>` block.
|
1941
|
-
* In '.htaccess', if `AllowOverride Options` is on.
|
1942
|
-
|
1943
|
-
In each place, it may be specified at most once. The default value is 'production'.
|
1944
|
-
|
1945
1946
|
=== Advanced options
|
1946
1947
|
|
1947
1948
|
[[PassengerTempDir]]
|
@@ -124,117 +124,117 @@
|
|
124
124
|
|
125
125
|
6.1. passenger_root <directory> => passenger-root-directory--bqvhhz
|
126
126
|
|
127
|
-
6.2.
|
127
|
+
6.2. Deployment options => deployment-options-1a1vxsp
|
128
128
|
|
129
|
-
6.
|
129
|
+
6.2.1. passenger_enabled <on|off> => passenger-enabled-on-off--1rpb2t7
|
130
130
|
|
131
|
-
6.
|
131
|
+
6.2.2. passenger_ruby <filename> => passenger-ruby-filename--1gnok5k
|
132
132
|
|
133
|
-
6.
|
133
|
+
6.2.3. passenger_python <filename> => passenger-python-filename--14p554
|
134
134
|
|
135
|
-
6.
|
135
|
+
6.2.4. passenger_nodejs <filename> => passenger-nodejs-filename--16hzjsv
|
136
136
|
|
137
|
-
6.
|
137
|
+
6.2.5. passenger_app_env <string> => passenger-app-env-string--qjeimp
|
138
138
|
|
139
|
-
6.
|
139
|
+
6.2.6. rails_env <string> => rails-env-string--jlh7v9
|
140
140
|
|
141
|
-
6.
|
141
|
+
6.2.7. rack_env <string> => rack-env-string--tqmrt0
|
142
142
|
|
143
|
-
6.
|
143
|
+
6.2.8. passenger_app_root <path/to/root> => passenger-app-root-path-to-root--1dbudc6
|
144
144
|
|
145
|
-
6.
|
145
|
+
6.2.9. passenger_base_uri <uri> => passenger-base-uri-uri--1xtuo50
|
146
146
|
|
147
|
-
6.
|
147
|
+
6.2.10. passenger_spawn_method <string> => passenger-spawn-method-string--1sc6njl
|
148
148
|
|
149
|
-
6.
|
149
|
+
6.2.11. passenger_load_shell_envvars <on|off> => passenger-load-shell-envvars-on-off--fw5u4l
|
150
150
|
|
151
|
-
6.12.
|
151
|
+
6.2.12. passenger_rolling_restarts <on|off> => passenger-rolling-restarts
|
152
152
|
|
153
|
-
6.13.
|
153
|
+
6.2.13. passenger_resist_deployment_errors <on|off> => passenger-resist-deployment-errors-on-off--k9yf1
|
154
154
|
|
155
|
-
6.
|
155
|
+
6.3. Connection handling options => connection-handling-options-8jgq90
|
156
156
|
|
157
|
-
6.
|
157
|
+
6.3.1. passenger_ignore_client_abort <on|off> => passenger-ignore-client-abort
|
158
158
|
|
159
|
-
6.
|
159
|
+
6.3.2. passenger_set_cgi_param <CGI environment name> <value> => passenger-set-cgi-param-cgi-environment-name-value--rx9gc0
|
160
160
|
|
161
|
-
6.
|
161
|
+
6.3.3. passenger_pass_header <header name> => passenger-pass-header-header-name--1cg31je
|
162
162
|
|
163
|
-
6.
|
163
|
+
6.3.4. passenger_buffer_response <on|off> => passenger-buffer-response
|
164
164
|
|
165
|
-
6.
|
165
|
+
6.3.5. passenger_buffer_size => passenger-buffer-size-1jfkq87
|
166
166
|
|
167
|
-
6.
|
167
|
+
6.3.6. passenger_buffers => passenger-busy-buffers
|
168
168
|
|
169
|
-
6.
|
169
|
+
6.3.7. passenger_busy_buffer_size => passenger-busy-buffer-size-124sj61
|
170
170
|
|
171
|
-
6.
|
171
|
+
6.3.8. passenger_intercept_errors <on|off> => passenger-intercept-errors-1uvcb9x
|
172
172
|
|
173
|
-
6.
|
173
|
+
6.3.9. passenger_max_request_queue_size <number> => passenger-max-request-queue-size-number--i0te1b
|
174
174
|
|
175
|
-
6.
|
175
|
+
6.3.10. passenger_request_queue_overflow_status_code <code> => passenger-request-queue-overflow-status-code-code--1wcwuxl
|
176
176
|
|
177
|
-
6.
|
177
|
+
6.4. Security options => security-options-1bv93g4
|
178
178
|
|
179
|
-
6.
|
179
|
+
6.4.1. passenger_user_switching <on|off> => passenger-user-switching-on-off--1p37u3l
|
180
180
|
|
181
|
-
6.
|
181
|
+
6.4.2. passenger_user <username> => passenger-user-username--b06ur7
|
182
182
|
|
183
|
-
6.
|
183
|
+
6.4.3. passenger_group <group name> => passenger-user-group-name--1fco4j7
|
184
184
|
|
185
|
-
6.
|
185
|
+
6.4.4. passenger_default_user <username> => passenger-default-user-username--1h6cdmf
|
186
186
|
|
187
|
-
6.
|
187
|
+
6.4.5. Passenger_default_group <group name> => passenger-default-group-group-name--1qxn2qa
|
188
188
|
|
189
|
-
6.
|
189
|
+
6.4.6. passenger_show_version_in_header <on|off> => passenger-show-version-in-header-on-off--2h49av
|
190
190
|
|
191
|
-
6.
|
191
|
+
6.4.7. passenger_friendly_error_pages <on|off> => passenger-friendly-error-pages-on-off--1ti1a0e
|
192
192
|
|
193
|
-
6.
|
193
|
+
6.5. Resource control and optimization options => resource-control-and-optimization-options-xd7evs
|
194
194
|
|
195
|
-
6.
|
195
|
+
6.5.1. passenger_max_pool_size <integer> => passenger-max-pool-size-integer--3jzefs
|
196
196
|
|
197
|
-
6.
|
197
|
+
6.5.2. passenger_min_instances <integer> => passenger-min-instances-integer--uclykt
|
198
198
|
|
199
|
-
6.
|
199
|
+
6.5.3. passenger_max_instances <integer> => passenger-max-instances
|
200
200
|
|
201
|
-
6.
|
201
|
+
6.5.4. passenger_max_instances_per_app <integer> => passenger-max-instances-per-app-integer--1xhbbne
|
202
202
|
|
203
|
-
6.
|
203
|
+
6.5.5. passenger_pool_idle_time <integer> => passenger-pool-idle-time-integer--xcw65o
|
204
204
|
|
205
|
-
6.
|
205
|
+
6.5.6. passenger_max_preloader_idle_time <integer> => rails-app-spawner-idle-time-integer--1xjqe4b
|
206
206
|
|
207
|
-
6.
|
207
|
+
6.5.7. passenger_start_timeout <seconds> => passenger-start-timeout-seconds--8xn504
|
208
208
|
|
209
|
-
6.
|
209
|
+
6.5.8. passenger_concurrency_model <process|thread> => passenger-concurrency-model-process-thread--brcvkk
|
210
210
|
|
211
|
-
6.
|
211
|
+
6.5.9. passenger_thread_count <number> => passenger-thread-count-number--1kd6ffy
|
212
212
|
|
213
|
-
6.
|
213
|
+
6.5.10. passenger_max_requests <integer> => passenger-max-requests-integer--sgzint
|
214
214
|
|
215
|
-
6.
|
215
|
+
6.5.11. passenger_max_request_time <seconds> => passenger-max-request-time-seconds--1htog2g
|
216
216
|
|
217
|
-
6.
|
217
|
+
6.5.12. passenger_memory_limit <integer> => passenger-memory-limit-integer--1ry7dwx
|
218
218
|
|
219
|
-
6.
|
219
|
+
6.5.13. passenger_pre_start <url> => passenger-pre-start-url--npldeb
|
220
220
|
|
221
|
-
6.
|
221
|
+
6.6. Logging and debugging options => logging-and-debugging-options-14e91ni
|
222
222
|
|
223
|
-
6.
|
223
|
+
6.6.1. passenger_log_level <integer> => passenger-log-level-integer--17snhon
|
224
224
|
|
225
|
-
6.
|
225
|
+
6.6.2. passenger_debug_log_file <filename> => passenger-debug-log-file-filename--21ubaj
|
226
226
|
|
227
|
-
6.
|
227
|
+
6.6.3. passenger_debugger <on|off> => passenger-debugger-on-off--1wkuq85
|
228
228
|
|
229
|
-
6.
|
229
|
+
6.7. Advanced options => advanced-options-hnuhqz
|
230
230
|
|
231
|
-
6.
|
231
|
+
6.7.1. passenger_temp_dir <directory> => passenger-temp-dir-directory--1t3opri
|
232
232
|
|
233
|
-
6.
|
233
|
+
6.7.2. passenger_fly_with <socket filename> => passenger-fly-with-socket-filename--1amd1xn
|
234
234
|
|
235
|
-
6.
|
235
|
+
6.8. Deprecated options => deprecated-options-1dtzo0g
|
236
236
|
|
237
|
-
6.
|
237
|
+
6.8.1. rails_spawn_method => rails-spawn-method-17vdnpt
|
238
238
|
|
239
239
|
7. Troubleshooting => troubleshooting-1pt0c76
|
240
240
|
|
data/doc/Users guide Nginx.txt
CHANGED
@@ -511,8 +511,38 @@ This required option may only occur once, in the 'http' configuration block.
|
|
511
511
|
|
512
512
|
NOTE: This option has no effect when you are using <<flying_passenger,Flying Passenger>>.
|
513
513
|
|
514
|
+
=== Deployment options
|
515
|
+
|
516
|
+
==== passenger_enabled <on|off>
|
517
|
+
This option may be specified in the 'http' configuration block, a
|
518
|
+
'server' configuration block, a 'location' configuration block or
|
519
|
+
an 'if' configuration scope, to enable or disable Phusion Passenger
|
520
|
+
for that server or that location.
|
521
|
+
|
522
|
+
Phusion Passenger is disabled by default, so you must explicitly enable
|
523
|
+
it for server blocks that you wish to serve through Phusion Passenger.
|
524
|
+
Please see <<deploying_a_rack_app,Deploying a Rack-based Ruby application>>
|
525
|
+
and <<deploying_a_wsgi_app,Deploying a WSGI (Python) application>>
|
526
|
+
for examples.
|
527
|
+
|
528
|
+
When using `location` blocks, you must re-specify `passenger_enabled` in each `location` block that you want to enable Phusion Passenger. This is because each `location` block has `passenger_enabled` turned off by default. For example:
|
529
|
+
|
530
|
+
----------------------------
|
531
|
+
server {
|
532
|
+
listen 80;
|
533
|
+
server_name www.foo.com;
|
534
|
+
root /webapps/foo/public;
|
535
|
+
passenger_enabled on;
|
536
|
+
|
537
|
+
location /attachments {
|
538
|
+
# Re-specify passenger_enabled here!
|
539
|
+
passenger_enabled on;
|
540
|
+
}
|
541
|
+
}
|
542
|
+
----------------------------
|
543
|
+
|
514
544
|
[[PassengerRuby]]
|
515
|
-
|
545
|
+
==== passenger_ruby <filename>
|
516
546
|
The `passenger_ruby` option allows one to specify the Ruby interpreter to use. Similarly, the `passenger_python` and `passenger_nodejs` options are for specifying the Python interpreter and Node.js commands, respectively.
|
517
547
|
|
518
548
|
In versions prior to 4.0.0, only a single Ruby version was supported for the entire Nginx instance, so `passenger_ruby` may only occur in the global server configuration. Also, the `passenger_python` option was not supported.
|
@@ -581,20 +611,53 @@ http {
|
|
581
611
|
|
582
612
|
include::users_guide_snippets/rvm_helper_tool.txt[]
|
583
613
|
|
584
|
-
|
614
|
+
==== passenger_python <filename>
|
585
615
|
:version: 4.0.0
|
586
616
|
include::users_guide_snippets/since_version.txt[]
|
587
617
|
|
588
618
|
This option allows one to specify the Python interpreter to use. See <<PassengerRuby,passenger_ruby>> for more information. The default value is 'python', meaning that the Python interpreter will be looked up according to the `PATH` environment variable.
|
589
619
|
|
590
|
-
|
620
|
+
==== passenger_nodejs <filename>
|
591
621
|
:version: 4.0.24
|
592
622
|
include::users_guide_snippets/since_version.txt[]
|
593
623
|
|
594
624
|
This option allows one to specify the Node.js command to use. See <<PassengerRuby,passenger_ruby>> for more information. The default value is 'node', meaning that the Node.js command will be looked up according to the `PATH` environment variable.
|
595
625
|
|
626
|
+
[[PassengerAppEnv]]
|
627
|
+
==== passenger_app_env <string>
|
628
|
+
This option sets the value of the following environment variables:
|
629
|
+
|
630
|
+
* `RAILS_ENV`
|
631
|
+
* `RACK_ENV`
|
632
|
+
* `WSGI_ENV`
|
633
|
+
* `NODE_ENV`
|
634
|
+
* `PASSENGER_APP_ENV`
|
635
|
+
|
636
|
+
Some web frameworks, for example Rails and Connect.js, adjust their behavior according to the value in one of these environment variables.
|
637
|
+
|
638
|
+
Phusion Passenger for Nginx sets the default value to **production**. If you're developing an Rails application then you should set this to `development`.
|
639
|
+
|
640
|
+
If you want to set other environment variables, please refer to <<env_vars_passenger_apps,Setting environment variables for Phusion Passenger-served apps>>.
|
641
|
+
|
642
|
+
This option may occur in the following places:
|
643
|
+
|
644
|
+
* In the 'http' configuration block.
|
645
|
+
* In a 'server' configuration block.
|
646
|
+
* In a 'location' configuration block.
|
647
|
+
* In an 'if' configuration scope.
|
648
|
+
|
649
|
+
In each place, it may be specified at most once. The default value is 'production'.
|
650
|
+
|
651
|
+
[[RailsEnv]]
|
652
|
+
==== rails_env <string>
|
653
|
+
An alias for <<PassengerAppEnv,passenger_app_env>>.
|
654
|
+
|
655
|
+
[[RackEnv]]
|
656
|
+
==== rack_env <string>
|
657
|
+
An alias for <<PassengerAppEnv,passenger_app_env>>.
|
658
|
+
|
596
659
|
[[PassengerAppRoot]]
|
597
|
-
|
660
|
+
==== passenger_app_root <path/to/root>
|
598
661
|
:version: 4.0.0
|
599
662
|
include::users_guide_snippets/since_version.txt[]
|
600
663
|
By default, Phusion Passenger assumes that the application's root directory
|
@@ -624,8 +687,28 @@ server {
|
|
624
687
|
}
|
625
688
|
-----------------------------
|
626
689
|
|
690
|
+
[[PassengerBaseURI]]
|
691
|
+
==== passenger_base_uri <uri>
|
692
|
+
Used to specify that the given URI is an distinct application that should
|
693
|
+
be served by Phusion Passenger. Please refer to the following sections for
|
694
|
+
more information:
|
695
|
+
|
696
|
+
* <<deploying_rack_to_sub_uri,Deploying Rack to a sub URI>>
|
697
|
+
* <<deploying_wsgi_to_sub_uri,Deploying WSGI to a sub URI>>
|
698
|
+
* <<deploying_rails_to_sub_uri,Deploying Rails 1 and Rails 2 to a sub URI>>
|
699
|
+
|
700
|
+
It is allowed to specify this option multiple times. Do this to deploy multiple
|
701
|
+
applications in different sub-URIs under the same virtual host.
|
702
|
+
|
703
|
+
This option may occur in the following places:
|
704
|
+
|
705
|
+
* In the 'http' configuration block.
|
706
|
+
* In a 'server' configuration block.
|
707
|
+
* In a 'location' configuration block.
|
708
|
+
* In an 'if' configuration scope.
|
709
|
+
|
627
710
|
[[PassengerSpawnMethod]]
|
628
|
-
|
711
|
+
==== passenger_spawn_method <string>
|
629
712
|
[TIP]
|
630
713
|
."What spawn method should I use?"
|
631
714
|
=========================================================
|
@@ -653,7 +736,7 @@ This option may occur in the following places:
|
|
653
736
|
In each place, it may be specified at most once. The default value is 'smart'.
|
654
737
|
|
655
738
|
[[PassengerLoadShellEnvvars]]
|
656
|
-
|
739
|
+
==== passenger_load_shell_envvars <on|off>
|
657
740
|
:version: 4.0.20
|
658
741
|
include::users_guide_snippets/since_version.txt[]
|
659
742
|
|
@@ -671,7 +754,7 @@ This option may occur in the following places:
|
|
671
754
|
In each place, it may be specified at most once. The default value is 'on'.
|
672
755
|
|
673
756
|
[[PassengerRollingRestarts]]
|
674
|
-
|
757
|
+
==== passenger_rolling_restarts <on|off>
|
675
758
|
:version: 3.0.0
|
676
759
|
include::users_guide_snippets/enterprise_only.txt[]
|
677
760
|
|
@@ -711,7 +794,7 @@ This option may occur in the following places:
|
|
711
794
|
|
712
795
|
In each place, it may be specified at most once. The default value is 'off'.
|
713
796
|
|
714
|
-
|
797
|
+
==== passenger_resist_deployment_errors <on|off>
|
715
798
|
:version: 3.0.0
|
716
799
|
include::users_guide_snippets/enterprise_only.txt[]
|
717
800
|
|
@@ -738,95 +821,6 @@ This option may occur in the following places:
|
|
738
821
|
|
739
822
|
In each place, it may be specified at most once. The default value is 'off'.
|
740
823
|
|
741
|
-
[[PassengerTempDir]]
|
742
|
-
=== passenger_temp_dir <directory> ===
|
743
|
-
Specifies the directory that Phusion Passenger should use for storing temporary
|
744
|
-
files. This includes things such as Unix socket files.
|
745
|
-
|
746
|
-
This option may only be specified in the 'http' configuration block. The
|
747
|
-
default temp directory that Phusion Passenger uses is '/tmp'.
|
748
|
-
|
749
|
-
This option is especially useful if Nginx is not allowed to write to /tmp
|
750
|
-
(which is the case on some systems with strict SELinux policies) or if the
|
751
|
-
partition that /tmp lives on doesn't have enough disk space.
|
752
|
-
|
753
|
-
.Command line tools
|
754
|
-
Some Phusion Passenger command line administration tools, such as
|
755
|
-
`passenger-status`, must know what Phusion Passenger's temp directory is
|
756
|
-
in order to function properly. You can pass the directory through the
|
757
|
-
`PASSENGER_TMPDIR` environment variable, or the `TMPDIR` environment variable
|
758
|
-
(the former will be used if both are specified).
|
759
|
-
|
760
|
-
For example, if you set 'passenger_temp_dir' to '/my_temp_dir', then invoke
|
761
|
-
`passenger-status` after you've set the `PASSENGER_TMPDIR` or `TMPDIR`
|
762
|
-
environment variable, like this:
|
763
|
-
|
764
|
-
----------------------------------------------------------
|
765
|
-
export PASSENGER_TMPDIR=/my_temp-dir
|
766
|
-
sudo -E passenger-status
|
767
|
-
# The -E option tells 'sudo' to preserve environment variables.
|
768
|
-
----------------------------------------------------------
|
769
|
-
|
770
|
-
:option: `--temp-dir`
|
771
|
-
include::users_guide_snippets/alternative_for_flying_passenger.txt[]
|
772
|
-
|
773
|
-
=== passenger_fly_with <socket filename>
|
774
|
-
:version: 4.1.0
|
775
|
-
include::users_guide_snippets/enterprise_only.txt[]
|
776
|
-
|
777
|
-
Enables <<flying_passenger,Flying Passenger>> mode, and configures Nginx to connect to the Flying Passenger daemon that's listening on the given socket filename.
|
778
|
-
|
779
|
-
This option may only occur once, in the 'http' configuration block. When not set, Flying Passenger is not enabled.
|
780
|
-
|
781
|
-
=== Important deployment options ===
|
782
|
-
==== passenger_enabled <on|off> ====
|
783
|
-
This option may be specified in the 'http' configuration block, a
|
784
|
-
'server' configuration block, a 'location' configuration block or
|
785
|
-
an 'if' configuration scope, to enable or disable Phusion Passenger
|
786
|
-
for that server or that location.
|
787
|
-
|
788
|
-
Phusion Passenger is disabled by default, so you must explicitly enable
|
789
|
-
it for server blocks that you wish to serve through Phusion Passenger.
|
790
|
-
Please see <<deploying_a_rack_app,Deploying a Rack-based Ruby application>>
|
791
|
-
and <<deploying_a_wsgi_app,Deploying a WSGI (Python) application>>
|
792
|
-
for examples.
|
793
|
-
|
794
|
-
When using `location` blocks, you must re-specify `passenger_enabled` in each `location` block that you want to enable Phusion Passenger. This is because each `location` block has `passenger_enabled` turned off by default. For example:
|
795
|
-
|
796
|
-
----------------------------
|
797
|
-
server {
|
798
|
-
listen 80;
|
799
|
-
server_name www.foo.com;
|
800
|
-
root /webapps/foo/public;
|
801
|
-
passenger_enabled on;
|
802
|
-
|
803
|
-
location /attachments {
|
804
|
-
# Re-specify passenger_enabled here!
|
805
|
-
passenger_enabled on;
|
806
|
-
}
|
807
|
-
}
|
808
|
-
----------------------------
|
809
|
-
|
810
|
-
[[PassengerBaseURI]]
|
811
|
-
==== passenger_base_uri <uri> ====
|
812
|
-
Used to specify that the given URI is an distinct application that should
|
813
|
-
be served by Phusion Passenger. Please refer to the following sections for
|
814
|
-
more information:
|
815
|
-
|
816
|
-
* <<deploying_rack_to_sub_uri,Deploying Rack to a sub URI>>
|
817
|
-
* <<deploying_wsgi_to_sub_uri,Deploying WSGI to a sub URI>>
|
818
|
-
* <<deploying_rails_to_sub_uri,Deploying Rails 1 and Rails 2 to a sub URI>>
|
819
|
-
|
820
|
-
It is allowed to specify this option multiple times. Do this to deploy multiple
|
821
|
-
applications in different sub-URIs under the same virtual host.
|
822
|
-
|
823
|
-
This option may occur in the following places:
|
824
|
-
|
825
|
-
* In the 'http' configuration block.
|
826
|
-
* In a 'server' configuration block.
|
827
|
-
* In a 'location' configuration block.
|
828
|
-
* In an 'if' configuration scope.
|
829
|
-
|
830
824
|
=== Connection handling options ===
|
831
825
|
|
832
826
|
==== passenger_ignore_client_abort <on|off> ====
|
@@ -1790,33 +1784,47 @@ This option may occur in the following places:
|
|
1790
1784
|
In each place, it may be specified at most once. The default value is 'off'.
|
1791
1785
|
|
1792
1786
|
|
1793
|
-
===
|
1794
|
-
[[RailsEnv]]
|
1795
|
-
==== rails_env <string> ====
|
1796
|
-
This option allows one to specify the default `RAILS_ENV` value.
|
1787
|
+
=== Advanced options
|
1797
1788
|
|
1798
|
-
|
1789
|
+
[[PassengerTempDir]]
|
1790
|
+
==== passenger_temp_dir <directory>
|
1791
|
+
Specifies the directory that Phusion Passenger should use for storing temporary
|
1792
|
+
files. This includes things such as Unix socket files.
|
1799
1793
|
|
1800
|
-
|
1801
|
-
|
1802
|
-
* In a 'location' configuration block.
|
1803
|
-
* In an 'if' configuration scope.
|
1794
|
+
This option may only be specified in the 'http' configuration block. The
|
1795
|
+
default temp directory that Phusion Passenger uses is '/tmp'.
|
1804
1796
|
|
1805
|
-
|
1797
|
+
This option is especially useful if Nginx is not allowed to write to /tmp
|
1798
|
+
(which is the case on some systems with strict SELinux policies) or if the
|
1799
|
+
partition that /tmp lives on doesn't have enough disk space.
|
1806
1800
|
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1801
|
+
.Command line tools
|
1802
|
+
Some Phusion Passenger command line administration tools, such as
|
1803
|
+
`passenger-status`, must know what Phusion Passenger's temp directory is
|
1804
|
+
in order to function properly. You can pass the directory through the
|
1805
|
+
`PASSENGER_TMPDIR` environment variable, or the `TMPDIR` environment variable
|
1806
|
+
(the former will be used if both are specified).
|
1811
1807
|
|
1812
|
-
|
1808
|
+
For example, if you set 'passenger_temp_dir' to '/my_temp_dir', then invoke
|
1809
|
+
`passenger-status` after you've set the `PASSENGER_TMPDIR` or `TMPDIR`
|
1810
|
+
environment variable, like this:
|
1813
1811
|
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1812
|
+
----------------------------------------------------------
|
1813
|
+
export PASSENGER_TMPDIR=/my_temp-dir
|
1814
|
+
sudo -E passenger-status
|
1815
|
+
# The -E option tells 'sudo' to preserve environment variables.
|
1816
|
+
----------------------------------------------------------
|
1818
1817
|
|
1819
|
-
|
1818
|
+
:option: `--temp-dir`
|
1819
|
+
include::users_guide_snippets/alternative_for_flying_passenger.txt[]
|
1820
|
+
|
1821
|
+
==== passenger_fly_with <socket filename>
|
1822
|
+
:version: 4.1.0
|
1823
|
+
include::users_guide_snippets/enterprise_only.txt[]
|
1824
|
+
|
1825
|
+
Enables <<flying_passenger,Flying Passenger>> mode, and configures Nginx to connect to the Flying Passenger daemon that's listening on the given socket filename.
|
1826
|
+
|
1827
|
+
This option may only occur once, in the 'http' configuration block. When not set, Flying Passenger is not enabled.
|
1820
1828
|
|
1821
1829
|
|
1822
1830
|
=== Deprecated options ===
|
@@ -38,7 +38,7 @@ Most configuration is done by customizing the arguments passed to the `passenger
|
|
38
38
|
`--port NUMBER`::
|
39
39
|
The port number that Phusion Passenger Standalone should listen on. If not given, port 3000 is assumed.
|
40
40
|
`--environment NAME`::
|
41
|
-
Customizes the value of the `RAILS_ENV`, `RACK_ENV`, `WSGI_ENV`, `NODE_ENV` and `
|
41
|
+
Customizes the value of the `RAILS_ENV`, `RACK_ENV`, `WSGI_ENV`, `NODE_ENV` and `PASSENGER_APP_ENV` environment variables. Some web frameworks, for example Rails and Connect.js, adjust their behavior according to the environment. The default value is 'development'.
|
42
42
|
`--max-pool-size NUMBER`::
|
43
43
|
The maximum number of application processes to run. The maximum number that you can run depends on the amount of memory your server has. The article link:http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/[Tuning Phusion Passenger's concurrency settings] explains how you can infer a good number for this option.
|
44
44
|
`--min-instances NUMBER`::
|
@@ -189,7 +189,6 @@ passenger_config_create_dir(apr_pool_t *p, char *dirspec) {
|
|
189
189
|
|
190
190
|
#include "CreateDirConfig.cpp"
|
191
191
|
|
192
|
-
config->environment = NULL;
|
193
192
|
config->appRoot = NULL;
|
194
193
|
config->spawnMethod = DirConfig::SM_UNSET;
|
195
194
|
config->maxPreloaderIdleTime = -1;
|
@@ -219,7 +218,6 @@ passenger_config_merge_dir(apr_pool_t *p, void *basev, void *addv) {
|
|
219
218
|
config->baseURIs.insert(*it);
|
220
219
|
}
|
221
220
|
|
222
|
-
MERGE_STR_CONFIG(environment);
|
223
221
|
MERGE_STR_CONFIG(appRoot);
|
224
222
|
MERGE_STRING_CONFIG(appGroupName);
|
225
223
|
config->spawnMethod = (add->spawnMethod == DirConfig::SM_UNSET) ? base->spawnMethod : add->spawnMethod;
|
@@ -280,7 +278,6 @@ cmd_passenger_pre_start(cmd_parms *cmd, void *pcfg, const char *arg) {
|
|
280
278
|
|
281
279
|
#include "ConfigurationSetters.cpp"
|
282
280
|
|
283
|
-
DEFINE_DIR_STR_CONFIG_SETTER(cmd_environment, environment)
|
284
281
|
DEFINE_DIR_INT_CONFIG_SETTER(cmd_passenger_stat_throttle_rate, statThrottleRate, unsigned long, 0)
|
285
282
|
DEFINE_DIR_STR_CONFIG_SETTER(cmd_passenger_app_root, appRoot)
|
286
283
|
DEFINE_DIR_STR_CONFIG_SETTER(cmd_passenger_app_group_name, appGroupName)
|
@@ -633,20 +630,6 @@ const command_rec passenger_commands[] = {
|
|
633
630
|
OR_ALL,
|
634
631
|
"The number of threads that Phusion Passenger should spawn per application."),
|
635
632
|
|
636
|
-
// Rails-specific settings.
|
637
|
-
AP_INIT_TAKE1("RailsEnv",
|
638
|
-
(Take1Func) cmd_environment,
|
639
|
-
NULL,
|
640
|
-
OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
|
641
|
-
"The environment under which a Rails app must run."),
|
642
|
-
|
643
|
-
// Rack-specific settings.
|
644
|
-
AP_INIT_TAKE1("RackEnv",
|
645
|
-
(Take1Func) cmd_environment,
|
646
|
-
NULL,
|
647
|
-
OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
|
648
|
-
"The environment under which a Rack app must run."),
|
649
|
-
|
650
633
|
// Backwards compatibility options.
|
651
634
|
AP_INIT_TAKE1("RailsRuby",
|
652
635
|
(Take1Func) cmd_passenger_ruby,
|
@@ -70,10 +70,6 @@ struct DirConfig {
|
|
70
70
|
|
71
71
|
std::set<std::string> baseURIs;
|
72
72
|
|
73
|
-
/** The environment (RAILS_ENV/RACK_ENV/WSGI_ENV) under which
|
74
|
-
* applications should operate. */
|
75
|
-
const char *environment;
|
76
|
-
|
77
73
|
/** The path to the application's root (for example: RAILS_ROOT
|
78
74
|
* for Rails applications, directory containing 'config.ru'
|
79
75
|
* for Rack applications). If this value is NULL, the default
|
@@ -155,14 +151,6 @@ struct DirConfig {
|
|
155
151
|
return enabled != DISABLED;
|
156
152
|
}
|
157
153
|
|
158
|
-
StaticString getEnvironment() const {
|
159
|
-
if (environment != NULL) {
|
160
|
-
return environment;
|
161
|
-
} else {
|
162
|
-
return "production";
|
163
|
-
}
|
164
|
-
}
|
165
|
-
|
166
154
|
StaticString getAppGroupName(const StaticString &appRoot) const {
|
167
155
|
if (appGroupName.empty()) {
|
168
156
|
return appRoot;
|
@@ -39,96 +39,133 @@
|
|
39
39
|
|
40
40
|
|
41
41
|
|
42
|
+
|
42
43
|
AP_INIT_TAKE1("PassengerRuby",
|
43
44
|
(Take1Func) cmd_passenger_ruby,
|
44
45
|
NULL,
|
45
46
|
OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
|
46
47
|
"The Ruby interpreter to use."),
|
47
48
|
|
49
|
+
|
48
50
|
AP_INIT_TAKE1("PassengerPython",
|
49
51
|
(Take1Func) cmd_passenger_python,
|
50
52
|
NULL,
|
51
53
|
OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
|
52
54
|
"The Python interpreter to use."),
|
53
55
|
|
56
|
+
|
54
57
|
AP_INIT_TAKE1("PassengerNodejs",
|
55
58
|
(Take1Func) cmd_passenger_nodejs,
|
56
59
|
NULL,
|
57
60
|
OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
|
58
61
|
"The Node.js command to use."),
|
59
62
|
|
63
|
+
|
64
|
+
AP_INIT_TAKE1("PassengerAppEnv",
|
65
|
+
(Take1Func) cmd_passenger_app_env,
|
66
|
+
NULL,
|
67
|
+
OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
|
68
|
+
"The environment under which applications are run."),
|
69
|
+
|
70
|
+
|
71
|
+
AP_INIT_TAKE1("RailsEnv",
|
72
|
+
(Take1Func) cmd_passenger_app_env,
|
73
|
+
NULL,
|
74
|
+
OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
|
75
|
+
"The environment under which applications are run."),
|
76
|
+
|
77
|
+
|
78
|
+
AP_INIT_TAKE1("RackEnv",
|
79
|
+
(Take1Func) cmd_passenger_app_env,
|
80
|
+
NULL,
|
81
|
+
OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
|
82
|
+
"The environment under which applications are run."),
|
83
|
+
|
84
|
+
|
60
85
|
AP_INIT_TAKE1("PassengerMinInstances",
|
61
86
|
(Take1Func) cmd_passenger_min_instances,
|
62
87
|
NULL,
|
63
88
|
OR_LIMIT | ACCESS_CONF | RSRC_CONF,
|
64
89
|
"The minimum number of application instances to keep when cleaning idle instances."),
|
65
90
|
|
91
|
+
|
66
92
|
AP_INIT_TAKE1("PassengerUser",
|
67
93
|
(Take1Func) cmd_passenger_user,
|
68
94
|
NULL,
|
69
95
|
ACCESS_CONF | RSRC_CONF,
|
70
96
|
"The user that Ruby applications must run as."),
|
71
97
|
|
98
|
+
|
72
99
|
AP_INIT_TAKE1("PassengerGroup",
|
73
100
|
(Take1Func) cmd_passenger_group,
|
74
101
|
NULL,
|
75
102
|
ACCESS_CONF | RSRC_CONF,
|
76
103
|
"The group that Ruby applications must run as."),
|
77
104
|
|
105
|
+
|
78
106
|
AP_INIT_FLAG("PassengerErrorOverride",
|
79
107
|
(FlagFunc) cmd_passenger_error_override,
|
80
108
|
NULL,
|
81
109
|
OR_ALL,
|
82
110
|
"Allow Apache to handle error response."),
|
83
111
|
|
112
|
+
|
84
113
|
AP_INIT_TAKE1("PassengerMaxRequests",
|
85
114
|
(Take1Func) cmd_passenger_max_requests,
|
86
115
|
NULL,
|
87
116
|
OR_LIMIT | ACCESS_CONF | RSRC_CONF,
|
88
117
|
"The maximum number of requests that an application instance may process."),
|
89
118
|
|
119
|
+
|
90
120
|
AP_INIT_TAKE1("PassengerStartTimeout",
|
91
121
|
(Take1Func) cmd_passenger_start_timeout,
|
92
122
|
NULL,
|
93
123
|
OR_LIMIT | ACCESS_CONF | RSRC_CONF,
|
94
124
|
"A timeout for application startup."),
|
95
125
|
|
126
|
+
|
96
127
|
AP_INIT_FLAG("PassengerHighPerformance",
|
97
128
|
(FlagFunc) cmd_passenger_high_performance,
|
98
129
|
NULL,
|
99
130
|
OR_ALL,
|
100
131
|
"Enable or disable Passenger's high performance mode."),
|
101
132
|
|
133
|
+
|
102
134
|
AP_INIT_FLAG("PassengerEnabled",
|
103
135
|
(FlagFunc) cmd_passenger_enabled,
|
104
136
|
NULL,
|
105
137
|
OR_ALL,
|
106
138
|
"Enable or disable Phusion Passenger."),
|
107
139
|
|
140
|
+
|
108
141
|
AP_INIT_TAKE1("PassengerMaxRequestQueueSize",
|
109
142
|
(Take1Func) cmd_passenger_max_request_queue_size,
|
110
143
|
NULL,
|
111
144
|
OR_ALL,
|
112
145
|
"The maximum number of queued requests."),
|
113
146
|
|
147
|
+
|
114
148
|
AP_INIT_FLAG("PassengerLoadShellEnvvars",
|
115
149
|
(FlagFunc) cmd_passenger_load_shell_envvars,
|
116
150
|
NULL,
|
117
151
|
OR_OPTIONS | ACCESS_CONF | RSRC_CONF,
|
118
152
|
"Whether to load environment variables from the shell before running the application."),
|
119
153
|
|
154
|
+
|
120
155
|
AP_INIT_FLAG("PassengerBufferUpload",
|
121
156
|
(FlagFunc) cmd_passenger_buffer_upload,
|
122
157
|
NULL,
|
123
158
|
OR_ALL,
|
124
159
|
"Whether to buffer file uploads."),
|
125
160
|
|
161
|
+
|
126
162
|
AP_INIT_TAKE1("PassengerAppType",
|
127
163
|
(Take1Func) cmd_passenger_app_type,
|
128
164
|
NULL,
|
129
165
|
OR_ALL,
|
130
166
|
"Force specific application type."),
|
131
167
|
|
168
|
+
|
132
169
|
AP_INIT_TAKE1("PassengerStartupFile",
|
133
170
|
(Take1Func) cmd_passenger_startup_file,
|
134
171
|
NULL,
|
@@ -39,6 +39,18 @@
|
|
39
39
|
<%
|
40
40
|
require 'phusion_passenger/apache2/config_options'
|
41
41
|
|
42
|
+
def resolve_possible_alias(option)
|
43
|
+
if option[:alias_for]
|
44
|
+
the_alias = APACHE2_DIRECTORY_CONFIGURATION_OPTIONS.find do |o|
|
45
|
+
o[:name] == option[:alias_for]
|
46
|
+
end.dup
|
47
|
+
the_alias[:aliased_for] = option[:name]
|
48
|
+
return the_alias
|
49
|
+
else
|
50
|
+
return option
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
42
54
|
def macro_for(option)
|
43
55
|
case option[:type]
|
44
56
|
when :string, :integer
|
@@ -83,6 +95,7 @@ end
|
|
83
95
|
%>
|
84
96
|
|
85
97
|
<% for option in APACHE2_DIRECTORY_CONFIGURATION_OPTIONS %>
|
98
|
+
<% option = resolve_possible_alias(option) %>
|
86
99
|
<%= macro_for(option) %>(<%= name_for(option) %>,
|
87
100
|
(<%= function_type_for(option) %>) <%= function_for(option) %>,
|
88
101
|
NULL,
|
@@ -56,6 +56,8 @@
|
|
56
56
|
int minInstances;
|
57
57
|
/** A timeout for application startup. */
|
58
58
|
int startTimeout;
|
59
|
+
/** The environment under which applications are run. */
|
60
|
+
const char *appEnv;
|
59
61
|
/** Force specific application type. */
|
60
62
|
const char *appType;
|
61
63
|
/** The group that Ruby applications must run as. */
|
@@ -63,6 +63,14 @@
|
|
63
63
|
}
|
64
64
|
|
65
65
|
|
66
|
+
static const char *
|
67
|
+
cmd_passenger_app_env(cmd_parms *cmd, void *pcfg, const char *arg) {
|
68
|
+
DirConfig *config = (DirConfig *) pcfg;
|
69
|
+
config->appEnv = arg;
|
70
|
+
return NULL;
|
71
|
+
}
|
72
|
+
|
73
|
+
|
66
74
|
static const char *
|
67
75
|
cmd_passenger_min_instances(cmd_parms *cmd, void *pcfg, const char *arg) {
|
68
76
|
DirConfig *config = (DirConfig *) pcfg;
|
data/ext/apache2/Hooks.cpp
CHANGED
@@ -696,7 +696,7 @@ private:
|
|
696
696
|
int originalStatus = r->status;
|
697
697
|
r->status = HTTP_OK;
|
698
698
|
return originalStatus;
|
699
|
-
} if (ap_pass_brigade(r->output_filters, bb) == APR_SUCCESS) {
|
699
|
+
} else if (ap_pass_brigade(r->output_filters, bb) == APR_SUCCESS) {
|
700
700
|
apr_brigade_cleanup(bb);
|
701
701
|
}
|
702
702
|
return OK;
|
@@ -951,7 +951,6 @@ private:
|
|
951
951
|
addHeader(output, "PASSENGER_APP_ROOT", mapper.getAppRoot());
|
952
952
|
addHeader(output, "PASSENGER_APP_GROUP_NAME", config->getAppGroupName(mapper.getAppRoot()));
|
953
953
|
#include "SetHeaders.cpp"
|
954
|
-
addHeader(output, "PASSENGER_ENV", config->getEnvironment());
|
955
954
|
addHeader(output, "PASSENGER_SPAWN_METHOD", config->getSpawnMethodString());
|
956
955
|
addHeader(r, output, "PASSENGER_MAX_REQUEST_QUEUE_SIZE", config->maxRequestQueueSize);
|
957
956
|
addHeader(output, "PASSENGER_APP_TYPE", mapper.getApplicationTypeName());
|
data/ext/apache2/SetHeaders.cpp
CHANGED
@@ -1005,7 +1005,7 @@ protected:
|
|
1005
1005
|
appendNullTerminatedKeyValue(result, "RACK_ENV", options.environment);
|
1006
1006
|
appendNullTerminatedKeyValue(result, "WSGI_ENV", options.environment);
|
1007
1007
|
appendNullTerminatedKeyValue(result, "NODE_ENV", options.environment);
|
1008
|
-
appendNullTerminatedKeyValue(result, "
|
1008
|
+
appendNullTerminatedKeyValue(result, "PASSENGER_APP_ENV", options.environment);
|
1009
1009
|
if (!options.baseURI.empty() && options.baseURI != "/") {
|
1010
1010
|
appendNullTerminatedKeyValue(result,
|
1011
1011
|
"RAILS_RELATIVE_URL_ROOT",
|
data/ext/common/Constants.h
CHANGED
@@ -1715,7 +1715,7 @@ private:
|
|
1715
1715
|
options.defaultGroup = this->options.defaultGroup;
|
1716
1716
|
fillPoolOption(client, options.appGroupName, "PASSENGER_APP_GROUP_NAME");
|
1717
1717
|
fillPoolOption(client, options.appType, "PASSENGER_APP_TYPE");
|
1718
|
-
fillPoolOption(client, options.environment, "
|
1718
|
+
fillPoolOption(client, options.environment, "PASSENGER_APP_ENV");
|
1719
1719
|
fillPoolOption(client, options.ruby, "PASSENGER_RUBY");
|
1720
1720
|
fillPoolOption(client, options.python, "PASSENGER_PYTHON");
|
1721
1721
|
fillPoolOption(client, options.nodejs, "PASSENGER_NODEJS");
|
@@ -66,7 +66,7 @@ u_char int_buf[32], *end, *buf, *pos;
|
|
66
66
|
|
67
67
|
|
68
68
|
if (conf->environment.data != NULL) {
|
69
|
-
len +=
|
69
|
+
len += 18;
|
70
70
|
len += conf->environment.len + 1;
|
71
71
|
}
|
72
72
|
|
@@ -282,8 +282,8 @@ buf = pos = ngx_pnalloc(cf->pool, len);
|
|
282
282
|
|
283
283
|
if (conf->environment.data != NULL) {
|
284
284
|
pos = ngx_copy(pos,
|
285
|
-
"
|
286
|
-
|
285
|
+
"PASSENGER_APP_ENV",
|
286
|
+
18);
|
287
287
|
pos = ngx_copy(pos,
|
288
288
|
conf->environment.data,
|
289
289
|
conf->environment.len);
|
@@ -79,6 +79,7 @@ function setupEnvironment(options) {
|
|
79
79
|
PhusionPassenger.configure = configure;
|
80
80
|
PhusionPassenger._requestHandler = new RequestHandler(loadApplication);
|
81
81
|
PhusionPassenger._appInstalled = false;
|
82
|
+
process.title = 'Passenger NodeApp: ' + options.app_root;
|
82
83
|
http.Server.prototype.originalListen = http.Server.prototype.listen;
|
83
84
|
http.Server.prototype.listen = installServer;
|
84
85
|
|
data/lib/phusion_passenger.rb
CHANGED
@@ -30,7 +30,7 @@ module PhusionPassenger
|
|
30
30
|
|
31
31
|
PACKAGE_NAME = 'passenger'
|
32
32
|
# Run 'rake ext/common/Constants.h' after changing this number.
|
33
|
-
VERSION_STRING = '4.0.
|
33
|
+
VERSION_STRING = '4.0.27'
|
34
34
|
|
35
35
|
PREFERRED_NGINX_VERSION = '1.4.4'
|
36
36
|
NGINX_SHA256_CHECKSUM = '7c989a58e5408c9593da0bebcd0e4ffc3d892d1316ba5042ddb0be5b0b4102b9'
|
@@ -66,6 +66,23 @@ APACHE2_DIRECTORY_CONFIGURATION_OPTIONS = [
|
|
66
66
|
:type => :string,
|
67
67
|
:desc => "The Node.js command to use."
|
68
68
|
},
|
69
|
+
{
|
70
|
+
:name => "PassengerAppEnv",
|
71
|
+
:type => :string,
|
72
|
+
:desc => "The environment under which applications are run."
|
73
|
+
},
|
74
|
+
{
|
75
|
+
:name => "RailsEnv",
|
76
|
+
:type => :string,
|
77
|
+
:desc => "The environment under which applications are run.",
|
78
|
+
:alias_for => "PassengerAppEnv"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
:name => "RackEnv",
|
82
|
+
:type => :string,
|
83
|
+
:desc => "The environment under which applications are run.",
|
84
|
+
:alias_for => "PassengerAppEnv"
|
85
|
+
},
|
69
86
|
{
|
70
87
|
:name => "PassengerMinInstances",
|
71
88
|
:type => :integer,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: passenger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.27
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-12-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
metadata.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
|
+
iQEcBAABAgAGBQJSoJfRAAoJECrHRaUKISqM/j0IAJbxv5UWZxTICe0kyJOinOR3
|
6
|
+
biccIqm1CN9UPHv9RavwralUWLnhXYXeHY3YoXTvl0yXwnoYkO2zDHc/pUn+CXj0
|
7
|
+
XZYb8+7Nj/iwoYZJiFRTOQnb7CE1d244dEEwE5JL/eSu6H53DIboJtY8Ako2yWBa
|
8
|
+
zZu4Ijq6Zz8Cv5PIp1+lVa3n4ZSBN5+/rqFYhO9CYwOlI04++CxM36f1LUGh0BkT
|
9
|
+
ujwIa11aOXjO4HKi1bqRF1dhkK/T7iLy7ZMRWK5G5f+SGVZ78fCN7Fr2w7OfsPPo
|
10
|
+
xwsiB/cZj/y/+b0ir8AF7icuGuxS9Ixbw7Ru1GvivDY4kghug7X3Vnhx987HKOg=
|
11
|
+
=NuX6
|
12
12
|
-----END PGP SIGNATURE-----
|