We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Rename some more config options. Update users guide.
Hongli Lai (Phusion) (author)
Fri May 09 06:29:04 -0700 2008
commit  edda89381f511c6f78e21fc5b151915e35df5921
tree    188c7d52774d1fff690f7d88d0b17a7ca3a08136
parent  6a90e77ac1374df1ff9cb3bcc01e97a436fdc546
...
377
378
379
 
380
381
382
383
384
385
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
387
388
...
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
...
600
601
602
 
 
 
 
 
 
 
 
 
 
 
 
 
 
603
604
605
...
951
952
953
954
955
 
 
 
956
957
958
...
960
961
962
 
 
963
964
965
966
967
968
 
 
 
 
969
970
971
 
972
973
974
975
 
976
977
 
978
979
980
 
 
981
982
983
...
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
...
549
550
551
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
552
553
554
...
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
...
966
967
968
 
 
969
970
971
972
973
974
...
976
977
978
979
980
981
982
 
 
 
 
983
984
985
986
987
988
 
989
990
991
992
 
993
994
 
995
996
997
998
999
1000
1001
1002
1003
0
@@ -377,12 +377,29 @@ and should usually not be changed manually.
0
 
0
 This required option may only occur once, in the global server configuration.
0
 
0
+[[PassengerRuby]]
0
 === PassengerRuby <filename> ===
0
 This option allows one to specify the Ruby interpreter to use.
0
 
0
 This option may only occur once, in the global server configuration.
0
 The default is 'ruby'.
0
 
0
+[[PassengerUserSwitching]]
0
+=== PassengerUserSwitching <on|off> ===
0
+Whether to enable <<user_switching,user switching support>>.
0
+
0
+This option may only occur once, in the global server configuration.
0
+The default value is 'on'.
0
+
0
+[[PassengerDefaultUser]]
0
+=== PassengerDefaultUser <username> ===
0
+Passenger enables <<user_switching,user switching support>> by default.
0
+This configuration option allows one to specify which user Rails/Rack
0
+applications must run as, if user switching fails or is disabled.
0
+
0
+This option may only occur once, in the global server configuration.
0
+The default value is 'nobody'.
0
+
0
 === Ruby on Rails-specific options ===
0
 
0
 ==== RailsAutoDetect <on|off> ====
0
@@ -532,22 +549,6 @@ mileage may vary.
0
 This option may only occur once, in the global server configuration.
0
 The default value is '120'.
0
 
0
-[[RailsUserSwitching]]
0
-==== RailsUserSwitching <on|off> ====
0
-Whether to enable <<user_switching,user switching support>>.
0
-
0
-This option may only occur once, in the global server configuration.
0
-The default value is 'on'.
0
-
0
-[[RailsDefaultUser]]
0
-==== RailsDefaultUser <username> ====
0
-Passenger enables <<user_switching,user switching support>> by default.
0
-This configuration option allows one to specify which user Rails
0
-applications must run as, if user switching fails or is disabled.
0
-
0
-This option may only occur once, in the global server configuration.
0
-The default value is 'nobody'.
0
-
0
 === Rack-specific options ===
0
 
0
 ==== RackAutoDetect <on|off> ====
0
@@ -600,6 +601,20 @@ Rack applications are run, very similar to `RAILS_ENV`.
0
 This option may occur once, in the global server configuration or in a virtual host
0
 configuration block. The default value is 'production'.
0
 
0
+=== Deprecated options ===
0
+
0
+The following options have been deprecated, but are still supported for backwards
0
+compatibility reasons.
0
+
0
+==== RailsRuby ====
0
+Deprecated in favor of <<PassengerRuby,PassengerRuby>>.
0
+
0
+==== RailsUserSwitching ====
0
+Deprecated in favor of <<PassengerUserSwitching,PassengerUserSwitching>>.
0
+
0
+==== RailsDefaultUser ====
0
+Deprecated in favor of <<PassengerDefaultUser,PassengerDefaultUser>>.
0
+
0
 
0
 == Troubleshooting ==
0
 
0
@@ -951,8 +966,9 @@ example, Joe's PHP application will be able to read Jane's PHP application's
0
 passwords. This is obviously undesirable on many servers.
0
 
0
 Passenger solves this problem by implementing 'user switching'. A Rails
0
-application is started as the owner of the file 'config/environment.rb'. So if
0
-'/home/webapps/foo/config/environment.rb' is owned by 'joe', then Passenger
0
+application is started as the owner of the file 'config/environment.rb',
0
+and a Rack application is started as the owner of the file 'config.ru'.
0
+So if '/home/webapps/foo/config/environment.rb' is owned by 'joe', then Passenger
0
 will launch the corresponding Rails application as 'joe' as well.
0
 
0
 This behavior is the default, and you don't need to configure anything. But
0
@@ -960,24 +976,28 @@ there are things that you should keep in mind:
0
 
0
 - The owner of 'environment.rb' must have read access to the Rails application's
0
   folder, and read/write access to the Rails application's 'logs' folder.
0
+ Likewise, the owner of 'config.ru' must have read access to the Rack application's
0
+ folder.
0
 - This feature is only available if Apache is started by 'root'. This is the
0
   case on most Apache installations.
0
-- Under no circumstances will Rails applications be run as 'root'. If
0
- 'environment.rb' is owned as root or by an unknown user, then the Rails
0
- application will run as the user specified by
0
- <<RailsDefaultUser,RailsDefaultUser>>.
0
+- Under no circumstances will applications be run as 'root'. If
0
+ 'environment.rb'/'config.ru' is owned as root or by an unknown user, then the
0
+ Rails/Rack application will run as the user specified by
0
+ <<PassengerDefaultUser,PassengerDefaultUser>>.
0
 
0
 User switching can be disabled with the
0
-<<RailsUserSwitching,RailsUserSwitching>> option.
0
+<<PassengerUserSwitching,PassengerUserSwitching>> option.
0
 
0
 
0
 [[reducing_memory_usage]]
0
-=== Reducing memory consumption of Ruby on Rails apps by 33% ===
0
+=== Reducing memory consumption of Ruby on Rails applications by 33% ===
0
 
0
-Is it possible to reduce memory consumption of your Rails apps by 33% on average,
0
+Is it possible to reduce memory consumption of your Rails applications by 33% on average,
0
 by using http://www.rubyenterpriseedition.com/[Ruby Enterprise Edition].
0
 Please visit the website for details.
0
 
0
+Note that this feature does not apply to Rack applications.
0
+
0
 === Moving Passenger to a different directory ===
0
 
0
 It is possible to relocate the Passenger files to a different directory. It
...
160
161
162
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
164
165
...
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
...
309
310
311
 
 
 
 
 
 
 
 
 
 
312
313
314
...
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
...
374
375
376
377
 
 
 
 
 
 
 
 
 
 
 
378
379
380
...
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
...
261
262
263
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
264
265
266
...
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
356
357
358
 
 
 
 
 
 
 
 
 
 
359
360
361
...
374
375
376
 
377
378
379
380
381
382
383
384
385
386
387
388
389
390
0
@@ -160,6 +160,23 @@ cmd_passenger_ruby(cmd_parms *cmd, void *pcfg, const char *arg) {
0
   return NULL;
0
 }
0
 
0
+static const char *
0
+cmd_passenger_user_switching(cmd_parms *cmd, void *pcfg, int arg) {
0
+ ServerConfig *config = (ServerConfig *) ap_get_module_config(
0
+ cmd->server->module_config, &passenger_module);
0
+ config->userSwitching = arg;
0
+ config->userSwitchingSpecified = true;
0
+ return NULL;
0
+}
0
+
0
+static const char *
0
+cmd_passenger_default_user(cmd_parms *cmd, void *dummy, const char *arg) {
0
+ ServerConfig *config = (ServerConfig *) ap_get_module_config(
0
+ cmd->server->module_config, &passenger_module);
0
+ config->defaultUser = arg;
0
+ return NULL;
0
+}
0
+
0
 
0
 /*************************************************
0
  * Rails-specific settings
0
@@ -244,23 +261,6 @@ cmd_rails_pool_idle_time(cmd_parms *cmd, void *pcfg, const char *arg) {
0
   }
0
 }
0
 
0
-static const char *
0
-cmd_rails_user_switching(cmd_parms *cmd, void *pcfg, int arg) {
0
- ServerConfig *config = (ServerConfig *) ap_get_module_config(
0
- cmd->server->module_config, &passenger_module);
0
- config->userSwitching = arg;
0
- config->userSwitchingSpecified = true;
0
- return NULL;
0
-}
0
-
0
-static const char *
0
-cmd_rails_default_user(cmd_parms *cmd, void *dummy, const char *arg) {
0
- ServerConfig *config = (ServerConfig *) ap_get_module_config(
0
- cmd->server->module_config, &passenger_module);
0
- config->defaultUser = arg;
0
- return NULL;
0
-}
0
-
0
 
0
 /*************************************************
0
  * Rack-specific settings
0
@@ -309,6 +309,16 @@ const command_rec passenger_commands[] = {
0
     NULL,
0
     RSRC_CONF,
0
     "The Ruby interpreter to use."),
0
+ AP_INIT_FLAG("PassengerUserSwitching",
0
+ (Take1Func) cmd_passenger_user_switching,
0
+ NULL,
0
+ RSRC_CONF,
0
+ "Whether to enable user switching support."),
0
+ AP_INIT_TAKE1("PassengerDefaultUser",
0
+ (Take1Func) cmd_passenger_default_user,
0
+ NULL,
0
+ RSRC_CONF,
0
+ "The user that Rails/Rack applications must run as when user switching fails or is disabled."),
0
 
0
   // Rails-specific settings.
0
   AP_INIT_TAKE1("RailsBaseURI",
0
@@ -346,16 +356,6 @@ const command_rec passenger_commands[] = {
0
     NULL,
0
     RSRC_CONF,
0
     "The maximum number of seconds that a Rails application may be idle before it gets terminated."),
0
- AP_INIT_FLAG("RailsUserSwitching",
0
- (Take1Func) cmd_rails_user_switching,
0
- NULL,
0
- RSRC_CONF,
0
- "Whether to enable user switching support."),
0
- AP_INIT_TAKE1("RailsDefaultUser",
0
- (Take1Func) cmd_rails_default_user,
0
- NULL,
0
- RSRC_CONF,
0
- "The user that Rails applications must run as when user switching fails or is disabled."),
0
   
0
   // Rack-specific settings.
0
   AP_INIT_FLAG("RackAutoDetect",
0
@@ -374,7 +374,17 @@ const command_rec passenger_commands[] = {
0
     (Take1Func) cmd_passenger_ruby,
0
     NULL,
0
     RSRC_CONF,
0
- "Obsolete option."),
0
+ "Deprecated option."),
0
+ AP_INIT_FLAG("RailsUserSwitching",
0
+ (Take1Func) cmd_passenger_user_switching,
0
+ NULL,
0
+ RSRC_CONF,
0
+ "Deprecated option."),
0
+ AP_INIT_TAKE1("RailsDefaultUser",
0
+ (Take1Func) cmd_passenger_default_user,
0
+ NULL,
0
+ RSRC_CONF,
0
+ "Deprecated option."),
0
   
0
   // Obsolete options.
0
   AP_INIT_TAKE1("RailsSpawnServer",
...
79
80
81
82
 
83
84
85
...
87
88
89
90
 
91
92
93
...
102
103
104
105
 
106
107
108
...
79
80
81
 
82
83
84
85
...
87
88
89
 
90
91
92
93
...
102
103
104
 
105
106
107
108
0
@@ -79,7 +79,7 @@
0
       /** The Passenger root folder. */
0
       const char *root;
0
       
0
- /** The maximum number of simultaneously alive Rails application
0
+ /** The maximum number of simultaneously alive application
0
        * instances. */
0
       unsigned int maxPoolSize;
0
       
0
@@ -87,7 +87,7 @@
0
        * this server config. */
0
       bool maxPoolSizeSpecified;
0
       
0
- /** The maximum number of seconds that a Rails application may be
0
+ /** The maximum number of seconds that an application may be
0
        * idle before it gets terminated. */
0
       unsigned int poolIdleTime;
0
       
0
@@ -102,7 +102,7 @@
0
        * this server config. */
0
       bool userSwitchingSpecified;
0
 
0
- /** User that Rails applications must run as if user switching
0
+ /** The user that applications must run as if user switching
0
        * fails or is disabled. NULL means the option is not specified.
0
        */
0
       const char *defaultUser;

Comments

    No one has commented yet.