passenger 2.2.4 → 2.2.5
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/NEWS +137 -0
- data/Rakefile +101 -19
- data/bin/passenger-install-nginx-module +10 -3
- data/bin/passenger-make-enterprisey +1 -1
- data/doc/Users guide Apache.html +227 -92
- data/doc/Users guide Apache.txt +169 -75
- data/doc/Users guide Nginx.html +1 -1
- data/doc/cxxapi/Bucket_8h-source.html +1 -1
- data/doc/cxxapi/Configuration_8h-source.html +373 -338
- data/doc/cxxapi/DirectoryMapper_8h-source.html +1 -1
- data/doc/cxxapi/Hooks_8h-source.html +1 -1
- data/doc/cxxapi/annotated.html +1 -1
- data/doc/cxxapi/classHooks-members.html +1 -1
- data/doc/cxxapi/classHooks.html +2 -2
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +1 -1
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +1 -1
- data/doc/cxxapi/classes.html +1 -1
- data/doc/cxxapi/definitions_8h-source.html +1 -1
- data/doc/cxxapi/files.html +1 -1
- data/doc/cxxapi/functions.html +1 -1
- data/doc/cxxapi/functions_func.html +1 -1
- data/doc/cxxapi/graph_legend.html +1 -1
- data/doc/cxxapi/group__Configuration.html +1 -1
- data/doc/cxxapi/group__Core.html +1 -1
- data/doc/cxxapi/group__Hooks.html +1 -1
- data/doc/cxxapi/group__Support.html +1 -1
- data/doc/cxxapi/main.html +1 -1
- data/doc/cxxapi/modules.html +1 -1
- data/doc/rdoc/classes/ConditionVariable.html +59 -59
- data/doc/rdoc/classes/Exception.html +11 -11
- data/doc/rdoc/classes/GC.html +4 -4
- data/doc/rdoc/classes/IO.html +14 -14
- data/doc/rdoc/classes/PhusionPassenger.html +1 -1
- data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +8 -8
- data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +136 -136
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +254 -254
- data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +61 -61
- data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +4 -4
- data/doc/rdoc/classes/PhusionPassenger/Application.html +14 -14
- data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +12 -12
- data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +4 -4
- data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +12 -12
- data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +5 -5
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +139 -139
- data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +61 -56
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +3 -3
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +7 -7
- data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +15 -15
- data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +119 -119
- data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +4 -4
- data/doc/rdoc/classes/PhusionPassenger/Utils.html +310 -312
- data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +169 -0
- data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +4 -4
- data/doc/rdoc/classes/PlatformInfo.html +165 -164
- data/doc/rdoc/classes/Signal.html +23 -23
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +26 -28
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +26 -28
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +26 -28
- data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +26 -28
- data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +1 -2
- data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +26 -28
- data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +26 -28
- data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +34 -36
- data/doc/rdoc/fr_class_index.html +1 -0
- data/doc/rdoc/fr_method_index.html +72 -68
- data/ext/apache2/Configuration.cpp +69 -15
- data/ext/apache2/Configuration.h +37 -2
- data/ext/apache2/Hooks.cpp +167 -59
- data/ext/common/ApplicationPoolServerExecutable.cpp +1 -1
- data/ext/common/MessageChannel.h +4 -4
- data/ext/common/StandardApplicationPool.h +1 -1
- data/ext/common/Timer.h +2 -0
- data/ext/common/Version.h +1 -1
- data/ext/nginx/Configuration.c +3 -3
- data/ext/nginx/ContentHandler.c +16 -4
- data/ext/nginx/HelperServer.cpp +1 -1
- data/ext/oxt/system_calls.cpp +6 -1
- data/ext/oxt/thread.hpp +17 -2
- data/ext/phusion_passenger/native_support.c +4 -4
- data/lib/phusion_passenger/abstract_request_handler.rb +3 -3
- data/lib/phusion_passenger/abstract_server.rb +1 -0
- data/lib/phusion_passenger/constants.rb +1 -1
- data/lib/phusion_passenger/message_channel.rb +1 -0
- data/lib/phusion_passenger/platform_info.rb +3 -2
- data/lib/phusion_passenger/rack/request_handler.rb +11 -7
- data/lib/phusion_passenger/railz/application_spawner.rb +7 -4
- data/lib/phusion_passenger/railz/request_handler.rb +1 -0
- data/lib/phusion_passenger/spawn_manager.rb +1 -0
- data/lib/phusion_passenger/utils.rb +38 -20
- data/test/integration_tests/apache2_tests.rb +162 -100
- data/test/integration_tests/mycook_spec.rb +63 -62
- data/test/integration_tests/nginx_tests.rb +12 -5
- data/test/ruby/utils_spec.rb +98 -14
- data/test/stub/apache2/httpd.conf.erb +2 -1
- data/test/stub/rails_apps/mycook/app/controllers/welcome_controller.rb +8 -0
- data/test/support/apache2_controller.rb +5 -1
- data/test/support/test_helper.rb +42 -13
- metadata +7 -137
data/doc/Users guide Apache.txt
CHANGED
@@ -354,6 +354,14 @@ For example:
|
|
354
354
|
DocumentRoot /webapps/mycook/public
|
355
355
|
</VirtualHost>
|
356
356
|
-------------------------------------------
|
357
|
+
|
358
|
+
You may also need to tweak your file/folder permissions. Make sure that the
|
359
|
+
following folders are readable and executable by Apache:
|
360
|
+
|
361
|
+
* this 'public' folder.
|
362
|
+
* the application's 'config' folder.
|
363
|
+
* all parent folders. That is, /webapps/mycook and /webapps must also be readable and executable by Apache.
|
364
|
+
|
357
365
|
Then restart Apache. The application has now been deployed.
|
358
366
|
|
359
367
|
[[deploying_rails_to_sub_uri]]
|
@@ -524,6 +532,14 @@ For example:
|
|
524
532
|
DocumentRoot /webapps/rackapp/public
|
525
533
|
</VirtualHost>
|
526
534
|
-------------------------------------------
|
535
|
+
|
536
|
+
You may also need to tweak your file/folder permissions. Make sure that the
|
537
|
+
following folders are readable and executable by Apache:
|
538
|
+
|
539
|
+
* this 'public' folder.
|
540
|
+
* the application's 'config' folder.
|
541
|
+
* all parent folders. That is, /webapps/rackapp and /webapps must also be readable and executable by Apache.
|
542
|
+
|
527
543
|
Then restart Apache. The application has now been deployed.
|
528
544
|
|
529
545
|
[[deploying_rack_to_sub_uri]]
|
@@ -694,77 +710,6 @@ applications must run as, if user switching fails or is disabled.
|
|
694
710
|
This option may only occur once, in the global server configuration.
|
695
711
|
The default value is 'nobody'.
|
696
712
|
|
697
|
-
[[PassengerHighPerformance]]
|
698
|
-
=== PassengerHighPerformance <on|off> ===
|
699
|
-
By default, Phusion Passenger is compatible with mod_rewrite and most other
|
700
|
-
Apache modules. However, a lot of effort is required in order to be compatible.
|
701
|
-
If you turn 'PassengerHighPerformance' to 'on', then Phusion Passenger will be
|
702
|
-
a little faster, in return for reduced compatibility with other Apache modules.
|
703
|
-
|
704
|
-
In places where 'PassengerHighPerformance' is turned on, mod_rewrite rules will
|
705
|
-
likely not work. mod_autoindex (the module which displays a directory index)
|
706
|
-
will also not work. Other Apache modules may or may not work, depending on what
|
707
|
-
they exactly do. We recommend you to find out how other modules behave in high
|
708
|
-
performance mode via testing.
|
709
|
-
|
710
|
-
This option is *not* an all-or-nothing global option: you can enable high
|
711
|
-
performance mode for certain virtual hosts or certain URLs only.
|
712
|
-
The 'PassengerHighPerformance' option may occur in the following places:
|
713
|
-
|
714
|
-
* In the global server configuration.
|
715
|
-
* In a virtual host configuration block.
|
716
|
-
* In a `<Directory>` or `<Location>` block.
|
717
|
-
* In '.htaccess'.
|
718
|
-
|
719
|
-
In each place, it may be specified at most once. The default value is 'off',
|
720
|
-
so high performance mode is disabled by default, and you have to explicitly
|
721
|
-
enable it.
|
722
|
-
|
723
|
-
.When to enable high performance mode?
|
724
|
-
|
725
|
-
If you do not use mod_rewrite or other Apache modules then it might make
|
726
|
-
sense to enable high performance mode.
|
727
|
-
|
728
|
-
It's likely that some of your applications depend on mod_rewrite or other
|
729
|
-
Apache modules, while some do not. In that case you can enable high performance
|
730
|
-
for only those applications that don't use other Apache modules. For example:
|
731
|
-
|
732
|
-
------------------------------------
|
733
|
-
<VirtualHost *:80>
|
734
|
-
ServerName www.foo.com
|
735
|
-
DocumentRoot /apps/foo/public
|
736
|
-
.... mod_rewrite rules or options for other Apache modules here ...
|
737
|
-
</VirtualHost>
|
738
|
-
|
739
|
-
<VirtualHost *:80>
|
740
|
-
ServerName www.bar.com
|
741
|
-
DocumentRoot /apps/bar/public
|
742
|
-
PassengerHighPerformance on
|
743
|
-
</VirtualHost>
|
744
|
-
------------------------------------
|
745
|
-
|
746
|
-
In the above example, high performance mode is only enabled for www.bar.com.
|
747
|
-
It is disabled for everything else.
|
748
|
-
|
749
|
-
If your application generally depends on mod_rewrite or other Apache modules,
|
750
|
-
but a certain URL that's accessed often doesn't depend on those other modules,
|
751
|
-
then you can enable high performance mode for a certain URL only. For example:
|
752
|
-
|
753
|
-
------------------------------------
|
754
|
-
<VirtualHost *:80>
|
755
|
-
ServerName www.foo.com
|
756
|
-
DocumentRoot /apps/foo/public
|
757
|
-
.... mod_rewrite rules or options for other Apache modules here ...
|
758
|
-
|
759
|
-
<Location /chatroom/ajax_update_poll>
|
760
|
-
PassengerHighPerformance on
|
761
|
-
</Location>
|
762
|
-
</VirtualHost>
|
763
|
-
------------------------------------
|
764
|
-
|
765
|
-
This enables high performance mode for
|
766
|
-
http://www.foo.com/chatroom/ajax_update_poll only.
|
767
|
-
|
768
713
|
=== PassengerEnabled <on|off> ===
|
769
714
|
You can set this option to 'off' to completely disable Phusion Passenger for
|
770
715
|
a certain location. This is useful if, for example, you want to integrate a PHP
|
@@ -1039,6 +984,149 @@ This option may occur in the following places:
|
|
1039
984
|
|
1040
985
|
In each place, it may be specified at most once. The default value is '0'.
|
1041
986
|
|
987
|
+
[[PassengerHighPerformance]]
|
988
|
+
==== PassengerHighPerformance <on|off> ====
|
989
|
+
By default, Phusion Passenger is compatible with mod_rewrite and most other
|
990
|
+
Apache modules. However, a lot of effort is required in order to be compatible.
|
991
|
+
If you turn 'PassengerHighPerformance' to 'on', then Phusion Passenger will be
|
992
|
+
a little faster, in return for reduced compatibility with other Apache modules.
|
993
|
+
|
994
|
+
In places where 'PassengerHighPerformance' is turned on, mod_rewrite rules will
|
995
|
+
likely not work. mod_autoindex (the module which displays a directory index)
|
996
|
+
will also not work. Other Apache modules may or may not work, depending on what
|
997
|
+
they exactly do. We recommend you to find out how other modules behave in high
|
998
|
+
performance mode via testing.
|
999
|
+
|
1000
|
+
This option is *not* an all-or-nothing global option: you can enable high
|
1001
|
+
performance mode for certain virtual hosts or certain URLs only.
|
1002
|
+
The 'PassengerHighPerformance' option may occur in the following places:
|
1003
|
+
|
1004
|
+
* In the global server configuration.
|
1005
|
+
* In a virtual host configuration block.
|
1006
|
+
* In a `<Directory>` or `<Location>` block.
|
1007
|
+
* In '.htaccess'.
|
1008
|
+
|
1009
|
+
In each place, it may be specified at most once. The default value is 'off',
|
1010
|
+
so high performance mode is disabled by default, and you have to explicitly
|
1011
|
+
enable it.
|
1012
|
+
|
1013
|
+
.When to enable high performance mode?
|
1014
|
+
|
1015
|
+
If you do not use mod_rewrite or other Apache modules then it might make
|
1016
|
+
sense to enable high performance mode.
|
1017
|
+
|
1018
|
+
It's likely that some of your applications depend on mod_rewrite or other
|
1019
|
+
Apache modules, while some do not. In that case you can enable high performance
|
1020
|
+
for only those applications that don't use other Apache modules. For example:
|
1021
|
+
|
1022
|
+
------------------------------------
|
1023
|
+
<VirtualHost *:80>
|
1024
|
+
ServerName www.foo.com
|
1025
|
+
DocumentRoot /apps/foo/public
|
1026
|
+
.... mod_rewrite rules or options for other Apache modules here ...
|
1027
|
+
</VirtualHost>
|
1028
|
+
|
1029
|
+
<VirtualHost *:80>
|
1030
|
+
ServerName www.bar.com
|
1031
|
+
DocumentRoot /apps/bar/public
|
1032
|
+
PassengerHighPerformance on
|
1033
|
+
</VirtualHost>
|
1034
|
+
------------------------------------
|
1035
|
+
|
1036
|
+
In the above example, high performance mode is only enabled for www.bar.com.
|
1037
|
+
It is disabled for everything else.
|
1038
|
+
|
1039
|
+
If your application generally depends on mod_rewrite or other Apache modules,
|
1040
|
+
but a certain URL that's accessed often doesn't depend on those other modules,
|
1041
|
+
then you can enable high performance mode for a certain URL only. For example:
|
1042
|
+
|
1043
|
+
------------------------------------
|
1044
|
+
<VirtualHost *:80>
|
1045
|
+
ServerName www.foo.com
|
1046
|
+
DocumentRoot /apps/foo/public
|
1047
|
+
.... mod_rewrite rules or options for other Apache modules here ...
|
1048
|
+
|
1049
|
+
<Location /chatroom/ajax_update_poll>
|
1050
|
+
PassengerHighPerformance on
|
1051
|
+
</Location>
|
1052
|
+
</VirtualHost>
|
1053
|
+
------------------------------------
|
1054
|
+
|
1055
|
+
This enables high performance mode for
|
1056
|
+
http://www.foo.com/chatroom/ajax_update_poll only.
|
1057
|
+
|
1058
|
+
|
1059
|
+
=== Compatibility options ===
|
1060
|
+
|
1061
|
+
[[PassengerResolveSymlinksInDocumentRoot]]
|
1062
|
+
==== PassengerResolveSymlinksInDocumentRoot <on|off> ====
|
1063
|
+
Configures whether Phusion Passenger should resolve symlinks in the document root.
|
1064
|
+
Please refer to <<application_detection,How Phusion Passenger detects whether a
|
1065
|
+
virtual host is a web application>> for more information.
|
1066
|
+
|
1067
|
+
This option may occur in the following places:
|
1068
|
+
|
1069
|
+
* In the global server configuration.
|
1070
|
+
* In a virtual host configuration block.
|
1071
|
+
* In a `<Directory>` or `<Location>` block.
|
1072
|
+
* In '.htaccess', if `AllowOverride Options` is on.
|
1073
|
+
|
1074
|
+
In each place, it may be specified at most once. It is off by default.
|
1075
|
+
|
1076
|
+
==== PassengerAllowEncodedSlashes <on|off> ====
|
1077
|
+
By default, Apache doesn't support URLs with encoded slashes (%2f), e.g. URLs like
|
1078
|
+
this: `/users/fujikura%2fyuu`. If you access such an URL then Apache will return a
|
1079
|
+
404 Not Found error. This can be solved by turning on PassengerAllowEncodedSlashes
|
1080
|
+
as well as Apache's
|
1081
|
+
link:http://httpd.apache.org/docs/2.0/mod/core.html#allowencodedslashes[AllowEncodedSlashes].
|
1082
|
+
|
1083
|
+
Is it important that you turn on both AllowEncodedSlashes *and* PassengerAllowEncodedSlashes,
|
1084
|
+
otherwise this feature will not work properly.
|
1085
|
+
|
1086
|
+
PassengerAllowEncodedSlashes may occur in the following places:
|
1087
|
+
|
1088
|
+
* In the global server configuration.
|
1089
|
+
* In a virtual host configuration block.
|
1090
|
+
* In a `<Directory>` or `<Location>` block.
|
1091
|
+
* In '.htaccess', if `AllowOverride Options` is on.
|
1092
|
+
|
1093
|
+
In each place, it may be specified at most once. It is off by default.
|
1094
|
+
|
1095
|
+
Please note however that turning on support for encoded slashes will break support for
|
1096
|
+
mod_rewrite passthrough rules. Because of bugs/limitations in Apache, Phusion Passenger
|
1097
|
+
can support either encoded slashes or mod_rewrite passthrough rules, but not both at the
|
1098
|
+
same time. Luckily this option can be specified anywhere, so you can enable it only for
|
1099
|
+
virtual hosts or URLs that need it:
|
1100
|
+
|
1101
|
+
----------------------------------
|
1102
|
+
<VirtualHost *:80>
|
1103
|
+
ServerName www.example.com
|
1104
|
+
DocumentRoot /webapps/example/public
|
1105
|
+
AllowEncodedSlashes on
|
1106
|
+
RewriteEngine on
|
1107
|
+
|
1108
|
+
# Check for maintenance file and redirect all requests
|
1109
|
+
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
|
1110
|
+
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
|
1111
|
+
RewriteRule ^.*$ /system/maintenance.html [L]
|
1112
|
+
|
1113
|
+
# Make /about an alias for /info/about.
|
1114
|
+
RewriteRule ^/about$ /info/about [PT,L]
|
1115
|
+
|
1116
|
+
<Location ~ "^/users/">
|
1117
|
+
# In a location block so that it doesn't interfere with the
|
1118
|
+
# above /about mod_rewrite rule.
|
1119
|
+
PassengerAllowEncodedSlashes on
|
1120
|
+
</Location>
|
1121
|
+
</VirtualHost>
|
1122
|
+
----------------------------------
|
1123
|
+
|
1124
|
+
With this, http://www.example.com/users/fujikura%2fyuu will work properly, and
|
1125
|
+
accessing http://www.example.com/about will properly display the result of
|
1126
|
+
http://www.example.com/info/about. Notice that PassengerAllowEncodedSlashes only
|
1127
|
+
interferes with passthrough rules, not with any other mod_rewrite rules. The rules for
|
1128
|
+
displaying maintenance.html will work fine even URLs starting with "/users".
|
1129
|
+
|
1042
1130
|
|
1043
1131
|
=== Ruby on Rails-specific options ===
|
1044
1132
|
|
@@ -1647,6 +1735,7 @@ application uses a non-standard page cache directory, i.e. if it doesn't cache t
|
|
1647
1735
|
the 'public' directory. In that case you'll need to use mod_rewrite to serve such
|
1648
1736
|
page cache files.
|
1649
1737
|
|
1738
|
+
[[application_detection]]
|
1650
1739
|
=== How Phusion Passenger detects whether a virtual host is a web application ===
|
1651
1740
|
After you've read the deployment instructions you might wonder how Phusion Passenger
|
1652
1741
|
knows that the DocumentRoot points to a web application that Phusion Passenger is
|
@@ -1669,8 +1758,9 @@ that Phusion Passenger will:
|
|
1669
1758
|
So suppose that your document root is '/webapps/foo/public'. Phusion Passenger will check
|
1670
1759
|
whether the file '/webapps/foo/config/environment.rb' exists.
|
1671
1760
|
|
1672
|
-
Note that Phusion Passenger does *not* resolve any symlinks in the document root path
|
1673
|
-
version 2.2.0 -- in contrast to versions earlier than 2.2.0, which
|
1761
|
+
Note that Phusion Passenger does *not* resolve any symlinks in the document root path by
|
1762
|
+
default since version 2.2.0 -- in contrast to versions earlier than 2.2.0, which do resolve
|
1763
|
+
symlinks.
|
1674
1764
|
So for example, suppose that your DocumentRoot points to '/home/www/example.com', which in
|
1675
1765
|
turn is a symlink to '/webapps/example.com/public'. In versions earlier than 2.2.0, Phusion
|
1676
1766
|
Passenger will check whether '/webapps/example.com/config/environment.rb' exists because it
|
@@ -1679,8 +1769,12 @@ resolves all symlinks. Phusion Passenger 2.2.0 and later however will check for
|
|
1679
1769
|
Passenger will not activate itself for this virtual host, and you'll most likely see an Apache
|
1680
1770
|
mod_dirindex directory listing.
|
1681
1771
|
|
1682
|
-
If you
|
1683
|
-
|
1772
|
+
If you need the old symlink-resolving behavior for whatever reason, then you can turn on
|
1773
|
+
<<PassengerResolveSymlinksInDocumentRoot,PassengerResolveSymlinksInDocumentRoot>>.
|
1774
|
+
|
1775
|
+
Another way to solve this situation is to explicitly tell Phusion Passenger what the
|
1776
|
+
correct application root is through the <<PassengerAppRoot,PassengerAppRoot>> configuration
|
1777
|
+
directive.
|
1684
1778
|
|
1685
1779
|
Autodetection of Rack applications happens through the same mechanism, exception that
|
1686
1780
|
Phusion Passenger will look for 'config.ru' instead of 'config/environment.rb'.
|
data/doc/Users guide Nginx.html
CHANGED
@@ -107,7 +107,7 @@
|
|
107
107
|
<a name="l00086"></a>00086
|
108
108
|
<a name="l00087"></a>00087 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_BUCKET_H_ */</span>
|
109
109
|
</pre></div></div>
|
110
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
110
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Sep 1 11:23:09 2009 for Passenger by
|
111
111
|
<a href="http://www.doxygen.org/index.html">
|
112
112
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
113
113
|
</body>
|
@@ -49,348 +49,383 @@
|
|
49
49
|
<a name="l00028"></a>00028 <span class="preprocessor">#ifdef __cplusplus</span>
|
50
50
|
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor"> #include "Utils.h"</span>
|
51
51
|
<a name="l00030"></a>00030 <span class="preprocessor"> #include "MessageChannel.h"</span>
|
52
|
-
<a name="l00031"></a>00031 <span class="preprocessor"
|
53
|
-
<a name="l00032"></a>00032 <span class="preprocessor"
|
54
|
-
<a name="l00033"></a>00033 <span class="
|
55
|
-
<a name="l00034"></a>00034 <span class="comment"
|
56
|
-
<a name="l00035"></a>00035 <span class="comment">
|
57
|
-
<a name="l00036"></a>00036 <span class="comment">
|
58
|
-
<a name="l00037"></a>00037 <span class="comment"> * MessageChannel.h
|
59
|
-
<a name="l00038"></a>00038 <span class="comment"> *
|
60
|
-
<a name="l00039"></a>00039 <span class="comment">
|
61
|
-
<a name="l00040"></a>00040 <span class="
|
62
|
-
<a name="l00041"></a>00041 <span class="preprocessor">#include <
|
63
|
-
<a name="l00042"></a>00042 <span class="preprocessor">#include <
|
64
|
-
<a name="l00043"></a>00043 <span class="
|
65
|
-
<a name="l00044"></a>00044 <span class="comment"
|
66
|
-
<a name="l00045"></a>00045 <span class="comment"
|
67
|
-
<a name="l00046"></a>00046 <span class="comment"> * @
|
68
|
-
<a name="l00047"></a>00047 <span class="comment"> * @
|
69
|
-
<a name="l00048"></a>00048 <span class="comment">
|
70
|
-
<a name="l00049"></a>00049
|
71
|
-
<a name="l00050"></a>00050
|
72
|
-
<a name="l00051"></a>00051 <span class="preprocessor"
|
73
|
-
<a name="l00052"></a>00052 <span class="preprocessor"> #include <
|
74
|
-
<a name="l00053"></a>00053
|
75
|
-
<a name="l00054"></a>00054
|
76
|
-
<a name="l00055"></a>00055
|
77
|
-
<a name="l00056"></a>00056
|
78
|
-
<a name="l00057"></a>00057 <span class="
|
79
|
-
<a name="l00058"></a>00058
|
80
|
-
<a name="l00059"></a>00059 <span class="comment">
|
81
|
-
<a name="l00060"></a>00060 <span class="comment">
|
82
|
-
<a name="l00061"></a>00061 <span class="comment">
|
83
|
-
<a name="l00062"></a>00062 <span class="comment"> * the
|
84
|
-
<a name="l00063"></a>00063 <span class="comment">
|
85
|
-
<a name="l00064"></a>00064
|
86
|
-
<a name="l00065"></a>00065
|
87
|
-
<a name="l00066"></a>00066 <span class="keyword">enum</span>
|
88
|
-
<a name="l00067"></a>00067
|
89
|
-
<a name="l00068"></a>00068
|
90
|
-
<a name="l00069"></a>00069
|
91
|
-
<a name="l00070"></a>00070
|
92
|
-
<a name="l00071"></a>00071 std::set<std::string>
|
93
|
-
<a name="l00072"></a>00072
|
94
|
-
<a name="l00073"></a>00073
|
95
|
-
<a name="l00074"></a>00074
|
96
|
-
<a name="l00075"></a>00075
|
97
|
-
<a name="l00076"></a>00076
|
98
|
-
<a name="l00077"></a>00077
|
99
|
-
<a name="l00078"></a>00078
|
100
|
-
<a name="l00079"></a>00079
|
101
|
-
<a name="l00080"></a>00080
|
102
|
-
<a name="l00081"></a>00081
|
103
|
-
<a name="l00082"></a>00082
|
104
|
-
<a name="l00083"></a>00083
|
105
|
-
<a name="l00084"></a>00084
|
106
|
-
<a name="l00085"></a>00085
|
107
|
-
<a name="l00086"></a>00086 <span class="comment">
|
108
|
-
<a name="l00087"></a>00087
|
109
|
-
<a name="l00088"></a>00088 <span class="
|
110
|
-
<a name="l00089"></a>00089
|
111
|
-
<a name="l00090"></a>00090 <span class="comment">
|
112
|
-
<a name="l00091"></a>00091 <span class="comment"> * for
|
113
|
-
<a name="l00092"></a>00092 <span class="comment"> *
|
114
|
-
<a name="l00093"></a>00093 <span class="comment">
|
115
|
-
<a name="l00094"></a>00094
|
116
|
-
<a name="l00095"></a>00095 <span class="
|
117
|
-
<a name="l00096"></a>00096
|
118
|
-
<a name="l00097"></a>00097 <span class="comment">
|
119
|
-
<a name="l00098"></a>00098
|
120
|
-
<a name="l00099"></a>00099 <span class="
|
121
|
-
<a name="l00100"></a>00100
|
122
|
-
<a name="l00101"></a>00101
|
123
|
-
<a name="l00102"></a>00102
|
124
|
-
<a name="l00103"></a>00103
|
125
|
-
<a name="l00104"></a>00104 <span class="comment">
|
126
|
-
<a name="l00105"></a>00105 <span class="comment"> *
|
127
|
-
<a name="l00106"></a>00106 <span class="comment"> *
|
128
|
-
<a name="l00107"></a>00107 <span class="comment">
|
129
|
-
<a name="l00108"></a>00108
|
130
|
-
<a name="l00109"></a>00109 <span class="
|
131
|
-
<a name="l00110"></a>00110
|
132
|
-
<a name="l00111"></a>00111 <span class="comment">
|
133
|
-
<a name="l00112"></a>00112 <span class="comment"> *
|
134
|
-
<a name="l00113"></a>00113 <span class="comment"> *
|
135
|
-
<a name="l00114"></a>00114 <span class="comment">
|
136
|
-
<a name="l00115"></a>00115
|
137
|
-
<a name="l00116"></a>00116 <span class="
|
138
|
-
<a name="l00117"></a>00117
|
139
|
-
<a name="l00118"></a>00118 <span class="comment">
|
140
|
-
<a name="l00119"></a>00119 <span class="comment"> *
|
141
|
-
<a name="l00120"></a>00120 <span class="comment">
|
142
|
-
<a name="l00121"></a>00121
|
143
|
-
<a name="l00122"></a>00122 <span class="
|
144
|
-
<a name="l00123"></a>00123
|
145
|
-
<a name="l00124"></a>00124 <span class="comment">
|
146
|
-
<a name="l00125"></a>00125
|
147
|
-
<a name="l00126"></a>00126 <span class="
|
148
|
-
<a name="l00127"></a>00127
|
149
|
-
<a name="l00128"></a>00128 <span class="comment">
|
150
|
-
<a name="l00129"></a>00129 <span class="comment"> *
|
151
|
-
<a name="l00130"></a>00130 <span class="comment">
|
152
|
-
<a name="l00131"></a>00131
|
153
|
-
<a name="l00132"></a>00132 <span class="
|
154
|
-
<a name="l00133"></a>00133
|
155
|
-
<a name="l00134"></a>00134 <span class="comment">
|
156
|
-
<a name="l00135"></a>00135
|
157
|
-
<a name="l00136"></a>00136
|
158
|
-
<a name="l00137"></a>00137
|
159
|
-
<a name="l00138"></a>00138
|
160
|
-
<a name="l00139"></a>00139 <span class="comment">
|
161
|
-
<a name="l00140"></a>00140
|
162
|
-
<a name="l00141"></a>00141
|
163
|
-
<a name="l00142"></a>00142
|
164
|
-
<a name="l00143"></a>00143
|
165
|
-
<a name="l00144"></a>00144 <span class="comment">
|
166
|
-
<a name="l00145"></a>00145
|
167
|
-
<a name="l00146"></a>00146 <span class="
|
168
|
-
<a name="l00147"></a>00147
|
169
|
-
<a name="l00148"></a>00148
|
170
|
-
<a name="l00149"></a>00149
|
171
|
-
<a name="l00150"></a>00150
|
172
|
-
<a name="l00151"></a>00151
|
173
|
-
<a name="l00152"></a>00152 <span class="comment">
|
174
|
-
<a name="l00153"></a>00153 <span class="comment"> *
|
175
|
-
<a name="l00154"></a>00154 <span class="comment">
|
176
|
-
<a name="l00155"></a>00155
|
177
|
-
<a name="l00156"></a>00156 <span class="
|
178
|
-
<a name="l00157"></a>00157
|
179
|
-
<a name="l00158"></a>00158 <span class="comment">
|
180
|
-
<a name="l00159"></a>00159 <span class="comment"> *
|
181
|
-
<a name="l00160"></a>00160 <span class="comment">
|
182
|
-
<a name="l00161"></a>00161 <span class="
|
183
|
-
<a name="l00162"></a>00162 <span class="
|
184
|
-
<a name="l00163"></a>00163
|
185
|
-
<a name="l00164"></a>00164
|
186
|
-
<a name="l00165"></a>00165 <span class="
|
187
|
-
<a name="l00166"></a>00166
|
188
|
-
<a name="l00167"></a>00167
|
189
|
-
<a name="l00168"></a>00168
|
190
|
-
<a name="l00169"></a>00169
|
191
|
-
<a name="l00170"></a>00170
|
192
|
-
<a name="l00171"></a>00171 <span class="
|
193
|
-
<a name="l00172"></a>00172
|
194
|
-
<a name="l00173"></a>00173
|
195
|
-
<a name="l00174"></a>00174
|
196
|
-
<a name="l00175"></a>00175
|
197
|
-
<a name="l00176"></a>00176
|
198
|
-
<a name="l00177"></a>00177
|
52
|
+
<a name="l00031"></a>00031 <span class="preprocessor"> #include "Logging.h"</span>
|
53
|
+
<a name="l00032"></a>00032 <span class="preprocessor">#endif</span>
|
54
|
+
<a name="l00033"></a>00033 <span class="preprocessor"></span>
|
55
|
+
<a name="l00034"></a>00034 <span class="comment">/* The APR headers must come after the Passenger headers. See Hooks.cpp</span>
|
56
|
+
<a name="l00035"></a>00035 <span class="comment"> * to learn why.</span>
|
57
|
+
<a name="l00036"></a>00036 <span class="comment"> *</span>
|
58
|
+
<a name="l00037"></a>00037 <span class="comment"> * MessageChannel.h must be included -- even though we don't actually use</span>
|
59
|
+
<a name="l00038"></a>00038 <span class="comment"> * MessageChannel.h in here, it's necessary to make sure that apr_want.h</span>
|
60
|
+
<a name="l00039"></a>00039 <span class="comment"> * doesn't b0rk on 'struct iovec'.</span>
|
61
|
+
<a name="l00040"></a>00040 <span class="comment"> */</span>
|
62
|
+
<a name="l00041"></a>00041 <span class="preprocessor">#include <apr_pools.h></span>
|
63
|
+
<a name="l00042"></a>00042 <span class="preprocessor">#include <httpd.h></span>
|
64
|
+
<a name="l00043"></a>00043 <span class="preprocessor">#include <http_config.h></span>
|
65
|
+
<a name="l00044"></a>00044 <span class="comment"></span>
|
66
|
+
<a name="l00045"></a>00045 <span class="comment">/**</span>
|
67
|
+
<a name="l00046"></a>00046 <span class="comment"> * @defgroup Configuration Apache module configuration</span>
|
68
|
+
<a name="l00047"></a>00047 <span class="comment"> * @ingroup Core</span>
|
69
|
+
<a name="l00048"></a>00048 <span class="comment"> * @{</span>
|
70
|
+
<a name="l00049"></a>00049 <span class="comment"> */</span>
|
71
|
+
<a name="l00050"></a>00050
|
72
|
+
<a name="l00051"></a>00051 <span class="preprocessor">#ifdef __cplusplus</span>
|
73
|
+
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor"> #include <set></span>
|
74
|
+
<a name="l00053"></a>00053 <span class="preprocessor"> #include <string></span>
|
75
|
+
<a name="l00054"></a>00054
|
76
|
+
<a name="l00055"></a>00055 <span class="keyword">namespace </span>Passenger {
|
77
|
+
<a name="l00056"></a>00056
|
78
|
+
<a name="l00057"></a>00057 <span class="keyword">using namespace </span>std;
|
79
|
+
<a name="l00058"></a>00058 <span class="comment"></span>
|
80
|
+
<a name="l00059"></a>00059 <span class="comment"> /**</span>
|
81
|
+
<a name="l00060"></a>00060 <span class="comment"> * Per-directory configuration information.</span>
|
82
|
+
<a name="l00061"></a>00061 <span class="comment"> *</span>
|
83
|
+
<a name="l00062"></a>00062 <span class="comment"> * Use the getter methods to query information, because those will return</span>
|
84
|
+
<a name="l00063"></a>00063 <span class="comment"> * the default value if the value is not specified.</span>
|
85
|
+
<a name="l00064"></a>00064 <span class="comment"> */</span>
|
86
|
+
<a name="l00065"></a>00065 <span class="keyword">struct </span>DirConfig {
|
87
|
+
<a name="l00066"></a>00066 <span class="keyword">enum</span> Threeway { ENABLED, DISABLED, UNSET };
|
88
|
+
<a name="l00067"></a>00067 <span class="keyword">enum</span> SpawnMethod { SM_UNSET, SM_SMART, SM_SMART_LV2, SM_CONSERVATIVE };
|
89
|
+
<a name="l00068"></a>00068
|
90
|
+
<a name="l00069"></a>00069 Threeway enabled;
|
91
|
+
<a name="l00070"></a>00070
|
92
|
+
<a name="l00071"></a>00071 std::set<std::string> railsBaseURIs;
|
93
|
+
<a name="l00072"></a>00072 std::set<std::string> rackBaseURIs;
|
94
|
+
<a name="l00073"></a>00073 <span class="comment"></span>
|
95
|
+
<a name="l00074"></a>00074 <span class="comment"> /** Whether to autodetect Rails applications. */</span>
|
96
|
+
<a name="l00075"></a>00075 Threeway autoDetectRails;
|
97
|
+
<a name="l00076"></a>00076 <span class="comment"></span>
|
98
|
+
<a name="l00077"></a>00077 <span class="comment"> /** Whether to autodetect Rack applications. */</span>
|
99
|
+
<a name="l00078"></a>00078 Threeway autoDetectRack;
|
100
|
+
<a name="l00079"></a>00079 <span class="comment"></span>
|
101
|
+
<a name="l00080"></a>00080 <span class="comment"> /** Whether to autodetect WSGI applications. */</span>
|
102
|
+
<a name="l00081"></a>00081 Threeway autoDetectWSGI;
|
103
|
+
<a name="l00082"></a>00082 <span class="comment"></span>
|
104
|
+
<a name="l00083"></a>00083 <span class="comment"> /** Whether mod_rewrite should be allowed for Rails applications. */</span>
|
105
|
+
<a name="l00084"></a>00084 Threeway allowModRewrite;
|
106
|
+
<a name="l00085"></a>00085 <span class="comment"></span>
|
107
|
+
<a name="l00086"></a>00086 <span class="comment"> /** The environment (i.e. value for RAILS_ENV) under which</span>
|
108
|
+
<a name="l00087"></a>00087 <span class="comment"> * Rails applications should operate. */</span>
|
109
|
+
<a name="l00088"></a>00088 <span class="keyword">const</span> <span class="keywordtype">char</span> *railsEnv;
|
110
|
+
<a name="l00089"></a>00089 <span class="comment"></span>
|
111
|
+
<a name="l00090"></a>00090 <span class="comment"> /** The path to the application's root (for example: RAILS_ROOT</span>
|
112
|
+
<a name="l00091"></a>00091 <span class="comment"> * for Rails applications, directory containing 'config.ru'</span>
|
113
|
+
<a name="l00092"></a>00092 <span class="comment"> * for Rack applications). If this value is NULL, the default</span>
|
114
|
+
<a name="l00093"></a>00093 <span class="comment"> * autodetected path will be used.</span>
|
115
|
+
<a name="l00094"></a>00094 <span class="comment"> */</span>
|
116
|
+
<a name="l00095"></a>00095 <span class="keyword">const</span> <span class="keywordtype">char</span> *appRoot;
|
117
|
+
<a name="l00096"></a>00096 <span class="comment"></span>
|
118
|
+
<a name="l00097"></a>00097 <span class="comment"> /** The environment (i.e. value for RACK_ENV) under which</span>
|
119
|
+
<a name="l00098"></a>00098 <span class="comment"> * Rack applications should operate. */</span>
|
120
|
+
<a name="l00099"></a>00099 <span class="keyword">const</span> <span class="keywordtype">char</span> *rackEnv;
|
121
|
+
<a name="l00100"></a>00100 <span class="comment"></span>
|
122
|
+
<a name="l00101"></a>00101 <span class="comment"> /** The Rails spawn method to use. */</span>
|
123
|
+
<a name="l00102"></a>00102 SpawnMethod spawnMethod;
|
124
|
+
<a name="l00103"></a>00103 <span class="comment"></span>
|
125
|
+
<a name="l00104"></a>00104 <span class="comment"> /**</span>
|
126
|
+
<a name="l00105"></a>00105 <span class="comment"> * The idle timeout, in seconds, of Rails framework spawners.</span>
|
127
|
+
<a name="l00106"></a>00106 <span class="comment"> * May also be 0 (which indicates that the framework spawner should</span>
|
128
|
+
<a name="l00107"></a>00107 <span class="comment"> * never idle timeout) or -1 (which means that the value is not specified).</span>
|
129
|
+
<a name="l00108"></a>00108 <span class="comment"> */</span>
|
130
|
+
<a name="l00109"></a>00109 <span class="keywordtype">long</span> frameworkSpawnerTimeout;
|
131
|
+
<a name="l00110"></a>00110 <span class="comment"></span>
|
132
|
+
<a name="l00111"></a>00111 <span class="comment"> /**</span>
|
133
|
+
<a name="l00112"></a>00112 <span class="comment"> * The idle timeout, in seconds, of Rails application spawners.</span>
|
134
|
+
<a name="l00113"></a>00113 <span class="comment"> * May also be 0 (which indicates that the application spawner should</span>
|
135
|
+
<a name="l00114"></a>00114 <span class="comment"> * never idle timeout) or -1 (which means that the value is not specified).</span>
|
136
|
+
<a name="l00115"></a>00115 <span class="comment"> */</span>
|
137
|
+
<a name="l00116"></a>00116 <span class="keywordtype">long</span> appSpawnerTimeout;
|
138
|
+
<a name="l00117"></a>00117 <span class="comment"></span>
|
139
|
+
<a name="l00118"></a>00118 <span class="comment"> /**</span>
|
140
|
+
<a name="l00119"></a>00119 <span class="comment"> * The maximum number of requests that the spawned application may process</span>
|
141
|
+
<a name="l00120"></a>00120 <span class="comment"> * before exiting. A value of 0 means unlimited.</span>
|
142
|
+
<a name="l00121"></a>00121 <span class="comment"> */</span>
|
143
|
+
<a name="l00122"></a>00122 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> maxRequests;
|
144
|
+
<a name="l00123"></a>00123 <span class="comment"></span>
|
145
|
+
<a name="l00124"></a>00124 <span class="comment"> /** Indicates whether the maxRequests option was explicitly specified</span>
|
146
|
+
<a name="l00125"></a>00125 <span class="comment"> * in the directory configuration. */</span>
|
147
|
+
<a name="l00126"></a>00126 <span class="keywordtype">bool</span> maxRequestsSpecified;
|
148
|
+
<a name="l00127"></a>00127 <span class="comment"></span>
|
149
|
+
<a name="l00128"></a>00128 <span class="comment"> /**</span>
|
150
|
+
<a name="l00129"></a>00129 <span class="comment"> * The maximum amount of memory (in MB) the spawned application may use.</span>
|
151
|
+
<a name="l00130"></a>00130 <span class="comment"> * A value of 0 means unlimited.</span>
|
152
|
+
<a name="l00131"></a>00131 <span class="comment"> */</span>
|
153
|
+
<a name="l00132"></a>00132 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> memoryLimit;
|
154
|
+
<a name="l00133"></a>00133 <span class="comment"></span>
|
155
|
+
<a name="l00134"></a>00134 <span class="comment"> /** Indicates whether the memoryLimit option was explicitly specified</span>
|
156
|
+
<a name="l00135"></a>00135 <span class="comment"> * in the directory configuration. */</span>
|
157
|
+
<a name="l00136"></a>00136 <span class="keywordtype">bool</span> memoryLimitSpecified;
|
158
|
+
<a name="l00137"></a>00137 <span class="comment"></span>
|
159
|
+
<a name="l00138"></a>00138 <span class="comment"> /** Whether symlinks in the document root path should be resolved.</span>
|
160
|
+
<a name="l00139"></a>00139 <span class="comment"> * The implication of this is documented in the users guide, section</span>
|
161
|
+
<a name="l00140"></a>00140 <span class="comment"> * "How Phusion Passenger detects whether a virtual host is a web application".</span>
|
162
|
+
<a name="l00141"></a>00141 <span class="comment"> */</span>
|
163
|
+
<a name="l00142"></a>00142 Threeway resolveSymlinksInDocRoot;
|
164
|
+
<a name="l00143"></a>00143 <span class="comment"></span>
|
165
|
+
<a name="l00144"></a>00144 <span class="comment"> /** Whether high performance mode should be turned on. */</span>
|
166
|
+
<a name="l00145"></a>00145 Threeway highPerformance;
|
167
|
+
<a name="l00146"></a>00146 <span class="comment"></span>
|
168
|
+
<a name="l00147"></a>00147 <span class="comment"> /** Whether global queuing should be used. */</span>
|
169
|
+
<a name="l00148"></a>00148 Threeway useGlobalQueue;
|
170
|
+
<a name="l00149"></a>00149 <span class="comment"></span>
|
171
|
+
<a name="l00150"></a>00150 <span class="comment"> /**</span>
|
172
|
+
<a name="l00151"></a>00151 <span class="comment"> * Whether encoded slashes in URLs should be supported. This however conflicts</span>
|
173
|
+
<a name="l00152"></a>00152 <span class="comment"> * with mod_rewrite support because of a bug/limitation in Apache, so it's one</span>
|
174
|
+
<a name="l00153"></a>00153 <span class="comment"> * or the other.</span>
|
175
|
+
<a name="l00154"></a>00154 <span class="comment"> */</span>
|
176
|
+
<a name="l00155"></a>00155 Threeway allowEncodedSlashes;
|
177
|
+
<a name="l00156"></a>00156 <span class="comment"></span>
|
178
|
+
<a name="l00157"></a>00157 <span class="comment"> /**</span>
|
179
|
+
<a name="l00158"></a>00158 <span class="comment"> * Throttle the number of stat() calls on files like</span>
|
180
|
+
<a name="l00159"></a>00159 <span class="comment"> * restart.txt to the once per given number of seconds.</span>
|
181
|
+
<a name="l00160"></a>00160 <span class="comment"> */</span>
|
182
|
+
<a name="l00161"></a>00161 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> statThrottleRate;
|
183
|
+
<a name="l00162"></a>00162 <span class="comment"></span>
|
184
|
+
<a name="l00163"></a>00163 <span class="comment"> /** Indicates whether the statThrottleRate option was</span>
|
185
|
+
<a name="l00164"></a>00164 <span class="comment"> * explicitly specified in the directory configuration. */</span>
|
186
|
+
<a name="l00165"></a>00165 <span class="keywordtype">bool</span> statThrottleRateSpecified;
|
187
|
+
<a name="l00166"></a>00166 <span class="comment"></span>
|
188
|
+
<a name="l00167"></a>00167 <span class="comment"> /** The directory in which Passenger should look for</span>
|
189
|
+
<a name="l00168"></a>00168 <span class="comment"> * restart.txt. NULL means that the default directory</span>
|
190
|
+
<a name="l00169"></a>00169 <span class="comment"> * should be used.</span>
|
191
|
+
<a name="l00170"></a>00170 <span class="comment"> */</span>
|
192
|
+
<a name="l00171"></a>00171 <span class="keyword">const</span> <span class="keywordtype">char</span> *restartDir;
|
193
|
+
<a name="l00172"></a>00172 <span class="comment"></span>
|
194
|
+
<a name="l00173"></a>00173 <span class="comment"> /**</span>
|
195
|
+
<a name="l00174"></a>00174 <span class="comment"> * The directory in which Passenger should place upload buffer</span>
|
196
|
+
<a name="l00175"></a>00175 <span class="comment"> * files. NULL means that the default directory should be used.</span>
|
197
|
+
<a name="l00176"></a>00176 <span class="comment"> */</span>
|
198
|
+
<a name="l00177"></a>00177 <span class="keyword">const</span> <span class="keywordtype">char</span> *uploadBufferDir;
|
199
199
|
<a name="l00178"></a>00178
|
200
|
-
<a name="l00179"></a>00179 <span class="
|
201
|
-
<a name="l00180"></a>00180
|
202
|
-
<a name="l00181"></a>00181
|
203
|
-
<a name="l00182"></a>00182
|
204
|
-
<a name="l00183"></a>00183
|
205
|
-
<a name="l00184"></a>00184
|
206
|
-
<a name="l00185"></a>00185
|
207
|
-
<a name="l00186"></a>00186
|
208
|
-
<a name="l00187"></a>00187
|
209
|
-
<a name="l00188"></a>00188
|
210
|
-
<a name="l00189"></a>00189
|
211
|
-
<a name="l00190"></a>00190
|
212
|
-
<a name="l00191"></a>00191
|
213
|
-
<a name="l00192"></a>00192
|
214
|
-
<a name="l00193"></a>00193
|
215
|
-
<a name="l00194"></a>00194
|
216
|
-
<a name="l00195"></a>00195
|
217
|
-
<a name="l00196"></a>00196
|
218
|
-
<a name="l00197"></a>00197
|
219
|
-
<a name="l00198"></a>00198
|
220
|
-
<a name="l00199"></a>00199
|
221
|
-
<a name="l00200"></a>00200
|
222
|
-
<a name="l00201"></a>00201
|
223
|
-
<a name="l00202"></a>00202
|
224
|
-
<a name="l00203"></a>00203
|
225
|
-
<a name="l00204"></a>00204
|
226
|
-
<a name="l00205"></a>00205 <span class="keywordflow">
|
227
|
-
<a name="l00206"></a>00206 <span class="keywordflow">return</span>
|
228
|
-
<a name="l00207"></a>00207
|
229
|
-
<a name="l00208"></a>00208
|
230
|
-
<a name="l00209"></a>00209
|
231
|
-
<a name="l00210"></a>00210
|
232
|
-
<a name="l00211"></a>00211 <span class="keywordflow">
|
233
|
-
<a name="l00212"></a>00212 <span class="keywordflow">return</span>
|
234
|
-
<a name="l00213"></a>00213 }
|
235
|
-
<a name="l00214"></a>00214
|
236
|
-
<a name="l00215"></a>00215
|
237
|
-
<a name="l00216"></a>00216
|
238
|
-
<a name="l00217"></a>00217
|
239
|
-
<a name="l00218"></a>00218
|
240
|
-
<a name="l00219"></a>00219
|
241
|
-
<a name="l00220"></a>00220 <span class="keywordflow">return</span>
|
242
|
-
<a name="l00221"></a>00221 }
|
243
|
-
<a name="l00222"></a>00222
|
244
|
-
<a name="l00223"></a>00223
|
245
|
-
<a name="l00224"></a>00224
|
246
|
-
<a name="l00225"></a>00225
|
247
|
-
<a name="l00226"></a>00226
|
248
|
-
<a name="l00227"></a>00227
|
249
|
-
<a name="l00228"></a>00228
|
250
|
-
<a name="l00229"></a>00229
|
251
|
-
<a name="l00230"></a>00230
|
252
|
-
<a name="l00231"></a>00231
|
253
|
-
<a name="l00232"></a>00232
|
254
|
-
<a name="l00233"></a>00233
|
255
|
-
<a name="l00234"></a>00234
|
256
|
-
<a name="l00235"></a>00235
|
257
|
-
<a name="l00236"></a>00236
|
258
|
-
<a name="l00237"></a>00237
|
259
|
-
<a name="l00238"></a>00238
|
260
|
-
<a name="l00239"></a>00239
|
261
|
-
<a name="l00240"></a>00240
|
262
|
-
<a name="l00241"></a>00241
|
263
|
-
<a name="l00242"></a>00242
|
264
|
-
<a name="l00243"></a>00243
|
265
|
-
<a name="l00244"></a>00244
|
266
|
-
<a name="l00245"></a>00245
|
267
|
-
<a name="l00246"></a>00246
|
268
|
-
<a name="l00247"></a>00247
|
269
|
-
<a name="l00248"></a>00248
|
270
|
-
<a name="l00249"></a>00249
|
271
|
-
<a name="l00250"></a>00250
|
272
|
-
<a name="l00251"></a>00251
|
273
|
-
<a name="l00252"></a>00252
|
274
|
-
<a name="l00253"></a>00253
|
275
|
-
<a name="l00254"></a>00254
|
276
|
-
<a name="l00255"></a>00255
|
277
|
-
<a name="l00256"></a>00256
|
278
|
-
<a name="l00257"></a>00257
|
279
|
-
<a name="l00258"></a>00258
|
280
|
-
<a name="l00259"></a>00259
|
281
|
-
<a name="l00260"></a>00260
|
282
|
-
<a name="l00261"></a>00261
|
283
|
-
<a name="l00262"></a>00262
|
284
|
-
<a name="l00263"></a>00263
|
285
|
-
<a name="l00264"></a>00264
|
286
|
-
<a name="l00265"></a>00265
|
287
|
-
<a name="l00266"></a>00266
|
288
|
-
<a name="l00267"></a>00267 <span class="
|
289
|
-
<a name="l00268"></a>00268
|
290
|
-
<a name="l00269"></a>00269
|
291
|
-
<a name="l00270"></a>00270 <span class="
|
292
|
-
<a name="l00271"></a>00271
|
293
|
-
<a name="l00272"></a>00272
|
294
|
-
<a name="l00273"></a>00273
|
295
|
-
<a name="l00274"></a>00274
|
296
|
-
<a name="l00275"></a>00275 <span class="keyword">const</span> <span class="keywordtype">char</span> *
|
297
|
-
<a name="l00276"></a>00276
|
298
|
-
<a name="l00277"></a>00277
|
299
|
-
<a name="l00278"></a>00278
|
300
|
-
<a name="l00279"></a>00279
|
301
|
-
<a name="l00280"></a>00280
|
302
|
-
<a name="l00281"></a>00281
|
303
|
-
<a name="l00282"></a>00282
|
304
|
-
<a name="l00283"></a>00283
|
305
|
-
<a name="l00284"></a>00284
|
306
|
-
<a name="l00285"></a>00285
|
307
|
-
<a name="l00286"></a>00286
|
308
|
-
<a name="l00287"></a>00287
|
309
|
-
<a name="l00288"></a>00288
|
310
|
-
<a name="l00289"></a>00289
|
311
|
-
<a name="l00290"></a>00290
|
312
|
-
<a name="l00291"></a>00291
|
313
|
-
<a name="l00292"></a>00292
|
314
|
-
<a name="l00293"></a>00293
|
315
|
-
<a name="l00294"></a>00294
|
316
|
-
<a name="l00295"></a>00295 <span class="comment">
|
317
|
-
<a name="l00296"></a>00296 <span class="comment">
|
318
|
-
<a name="l00297"></a>00297
|
319
|
-
<a name="l00298"></a>00298
|
320
|
-
<a name="l00299"></a>00299 <span class="comment">
|
321
|
-
<a name="l00300"></a>00300
|
322
|
-
<a name="l00301"></a>00301
|
323
|
-
<a name="l00302"></a>00302 <span class="
|
324
|
-
<a name="l00303"></a>00303
|
325
|
-
<a name="l00304"></a>00304 <span class="comment">
|
326
|
-
<a name="l00305"></a>00305 <span class="keywordtype">
|
200
|
+
<a name="l00179"></a>00179 <span class="comment">/*************************************/</span>
|
201
|
+
<a name="l00180"></a>00180 <span class="comment">/*************************************/</span>
|
202
|
+
<a name="l00181"></a>00181
|
203
|
+
<a name="l00182"></a>00182 <span class="keywordtype">bool</span> isEnabled()<span class="keyword"> const </span>{
|
204
|
+
<a name="l00183"></a>00183 <span class="keywordflow">return</span> enabled != DISABLED;
|
205
|
+
<a name="l00184"></a>00184 }
|
206
|
+
<a name="l00185"></a>00185
|
207
|
+
<a name="l00186"></a>00186 <span class="keywordtype">string</span> getAppRoot(<span class="keyword">const</span> <span class="keywordtype">char</span> *documentRoot)<span class="keyword"> const </span>{
|
208
|
+
<a name="l00187"></a>00187 <span class="keywordflow">if</span> (appRoot == NULL) {
|
209
|
+
<a name="l00188"></a>00188 <span class="keywordflow">if</span> (resolveSymlinksInDocRoot == DirConfig::ENABLED) {
|
210
|
+
<a name="l00189"></a>00189 <span class="keywordflow">return</span> extractDirName(resolveSymlink(documentRoot));
|
211
|
+
<a name="l00190"></a>00190 } <span class="keywordflow">else</span> {
|
212
|
+
<a name="l00191"></a>00191 <span class="keywordflow">return</span> extractDirName(documentRoot);
|
213
|
+
<a name="l00192"></a>00192 }
|
214
|
+
<a name="l00193"></a>00193 } <span class="keywordflow">else</span> {
|
215
|
+
<a name="l00194"></a>00194 <span class="keywordflow">return</span> appRoot;
|
216
|
+
<a name="l00195"></a>00195 }
|
217
|
+
<a name="l00196"></a>00196 }
|
218
|
+
<a name="l00197"></a>00197
|
219
|
+
<a name="l00198"></a>00198 <span class="keywordtype">string</span> getAppRoot(<span class="keyword">const</span> <span class="keywordtype">string</span> &documentRoot)<span class="keyword"> const </span>{
|
220
|
+
<a name="l00199"></a>00199 <span class="keywordflow">if</span> (appRoot == NULL) {
|
221
|
+
<a name="l00200"></a>00200 <span class="keywordflow">if</span> (resolveSymlinksInDocRoot == DirConfig::ENABLED) {
|
222
|
+
<a name="l00201"></a>00201 <span class="keywordflow">return</span> extractDirName(resolveSymlink(documentRoot));
|
223
|
+
<a name="l00202"></a>00202 } <span class="keywordflow">else</span> {
|
224
|
+
<a name="l00203"></a>00203 <span class="keywordflow">return</span> extractDirName(documentRoot);
|
225
|
+
<a name="l00204"></a>00204 }
|
226
|
+
<a name="l00205"></a>00205 } <span class="keywordflow">else</span> {
|
227
|
+
<a name="l00206"></a>00206 <span class="keywordflow">return</span> appRoot;
|
228
|
+
<a name="l00207"></a>00207 }
|
229
|
+
<a name="l00208"></a>00208 }
|
230
|
+
<a name="l00209"></a>00209
|
231
|
+
<a name="l00210"></a>00210 <span class="keyword">const</span> <span class="keywordtype">char</span> *getRailsEnv()<span class="keyword"> const </span>{
|
232
|
+
<a name="l00211"></a>00211 <span class="keywordflow">if</span> (railsEnv != NULL) {
|
233
|
+
<a name="l00212"></a>00212 <span class="keywordflow">return</span> railsEnv;
|
234
|
+
<a name="l00213"></a>00213 } <span class="keywordflow">else</span> {
|
235
|
+
<a name="l00214"></a>00214 <span class="keywordflow">return</span> <span class="stringliteral">"production"</span>;
|
236
|
+
<a name="l00215"></a>00215 }
|
237
|
+
<a name="l00216"></a>00216 }
|
238
|
+
<a name="l00217"></a>00217
|
239
|
+
<a name="l00218"></a>00218 <span class="keyword">const</span> <span class="keywordtype">char</span> *getRackEnv()<span class="keyword"> const </span>{
|
240
|
+
<a name="l00219"></a>00219 <span class="keywordflow">if</span> (rackEnv != NULL) {
|
241
|
+
<a name="l00220"></a>00220 <span class="keywordflow">return</span> rackEnv;
|
242
|
+
<a name="l00221"></a>00221 } <span class="keywordflow">else</span> {
|
243
|
+
<a name="l00222"></a>00222 <span class="keywordflow">return</span> <span class="stringliteral">"production"</span>;
|
244
|
+
<a name="l00223"></a>00223 }
|
245
|
+
<a name="l00224"></a>00224 }
|
246
|
+
<a name="l00225"></a>00225
|
247
|
+
<a name="l00226"></a>00226 <span class="keyword">const</span> <span class="keywordtype">char</span> *getSpawnMethodString() {
|
248
|
+
<a name="l00227"></a>00227 <span class="keywordflow">switch</span> (spawnMethod) {
|
249
|
+
<a name="l00228"></a>00228 <span class="keywordflow">case</span> SM_SMART:
|
250
|
+
<a name="l00229"></a>00229 <span class="keywordflow">return</span> <span class="stringliteral">"smart"</span>;
|
251
|
+
<a name="l00230"></a>00230 <span class="keywordflow">case</span> SM_SMART_LV2:
|
252
|
+
<a name="l00231"></a>00231 <span class="keywordflow">return</span> <span class="stringliteral">"smart-lv2"</span>;
|
253
|
+
<a name="l00232"></a>00232 <span class="keywordflow">case</span> SM_CONSERVATIVE:
|
254
|
+
<a name="l00233"></a>00233 <span class="keywordflow">return</span> <span class="stringliteral">"conservative"</span>;
|
255
|
+
<a name="l00234"></a>00234 <span class="keywordflow">default</span>:
|
256
|
+
<a name="l00235"></a>00235 <span class="keywordflow">return</span> <span class="stringliteral">"smart-lv2"</span>;
|
257
|
+
<a name="l00236"></a>00236 }
|
258
|
+
<a name="l00237"></a>00237 }
|
259
|
+
<a name="l00238"></a>00238
|
260
|
+
<a name="l00239"></a>00239 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> getMaxRequests() {
|
261
|
+
<a name="l00240"></a>00240 <span class="keywordflow">if</span> (maxRequestsSpecified) {
|
262
|
+
<a name="l00241"></a>00241 <span class="keywordflow">return</span> maxRequests;
|
263
|
+
<a name="l00242"></a>00242 } <span class="keywordflow">else</span> {
|
264
|
+
<a name="l00243"></a>00243 <span class="keywordflow">return</span> 0;
|
265
|
+
<a name="l00244"></a>00244 }
|
266
|
+
<a name="l00245"></a>00245 }
|
267
|
+
<a name="l00246"></a>00246
|
268
|
+
<a name="l00247"></a>00247 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> getMemoryLimit() {
|
269
|
+
<a name="l00248"></a>00248 <span class="keywordflow">if</span> (memoryLimitSpecified) {
|
270
|
+
<a name="l00249"></a>00249 <span class="keywordflow">return</span> memoryLimit;
|
271
|
+
<a name="l00250"></a>00250 } <span class="keywordflow">else</span> {
|
272
|
+
<a name="l00251"></a>00251 <span class="keywordflow">return</span> 200;
|
273
|
+
<a name="l00252"></a>00252 }
|
274
|
+
<a name="l00253"></a>00253 }
|
275
|
+
<a name="l00254"></a>00254
|
276
|
+
<a name="l00255"></a>00255 <span class="keywordtype">bool</span> highPerformanceMode()<span class="keyword"> const </span>{
|
277
|
+
<a name="l00256"></a>00256 <span class="keywordflow">return</span> highPerformance == ENABLED;
|
278
|
+
<a name="l00257"></a>00257 }
|
279
|
+
<a name="l00258"></a>00258
|
280
|
+
<a name="l00259"></a>00259 <span class="keywordtype">bool</span> usingGlobalQueue()<span class="keyword"> const </span>{
|
281
|
+
<a name="l00260"></a>00260 <span class="keywordflow">return</span> useGlobalQueue == ENABLED;
|
282
|
+
<a name="l00261"></a>00261 }
|
283
|
+
<a name="l00262"></a>00262
|
284
|
+
<a name="l00263"></a>00263 <span class="keywordtype">bool</span> allowsEncodedSlashes()<span class="keyword"> const </span>{
|
285
|
+
<a name="l00264"></a>00264 <span class="keywordflow">return</span> allowEncodedSlashes == ENABLED;
|
286
|
+
<a name="l00265"></a>00265 }
|
287
|
+
<a name="l00266"></a>00266
|
288
|
+
<a name="l00267"></a>00267 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> getStatThrottleRate()<span class="keyword"> const </span>{
|
289
|
+
<a name="l00268"></a>00268 <span class="keywordflow">if</span> (statThrottleRateSpecified) {
|
290
|
+
<a name="l00269"></a>00269 <span class="keywordflow">return</span> statThrottleRate;
|
291
|
+
<a name="l00270"></a>00270 } <span class="keywordflow">else</span> {
|
292
|
+
<a name="l00271"></a>00271 <span class="keywordflow">return</span> 0;
|
293
|
+
<a name="l00272"></a>00272 }
|
294
|
+
<a name="l00273"></a>00273 }
|
295
|
+
<a name="l00274"></a>00274
|
296
|
+
<a name="l00275"></a>00275 <span class="keyword">const</span> <span class="keywordtype">char</span> *getRestartDir()<span class="keyword"> const </span>{
|
297
|
+
<a name="l00276"></a>00276 <span class="keywordflow">if</span> (restartDir != NULL) {
|
298
|
+
<a name="l00277"></a>00277 <span class="keywordflow">return</span> restartDir;
|
299
|
+
<a name="l00278"></a>00278 } <span class="keywordflow">else</span> {
|
300
|
+
<a name="l00279"></a>00279 <span class="keywordflow">return</span> <span class="stringliteral">""</span>;
|
301
|
+
<a name="l00280"></a>00280 }
|
302
|
+
<a name="l00281"></a>00281 }
|
303
|
+
<a name="l00282"></a>00282
|
304
|
+
<a name="l00283"></a>00283 <span class="keywordtype">string</span> getUploadBufferDir()<span class="keyword"> const </span>{
|
305
|
+
<a name="l00284"></a>00284 <span class="keywordflow">if</span> (uploadBufferDir != NULL) {
|
306
|
+
<a name="l00285"></a>00285 <span class="keywordflow">return</span> uploadBufferDir;
|
307
|
+
<a name="l00286"></a>00286 } <span class="keywordflow">else</span> {
|
308
|
+
<a name="l00287"></a>00287 <span class="keywordflow">return</span> getPassengerTempDir() + <span class="stringliteral">"/webserver_private"</span>;
|
309
|
+
<a name="l00288"></a>00288 }
|
310
|
+
<a name="l00289"></a>00289 }
|
311
|
+
<a name="l00290"></a>00290
|
312
|
+
<a name="l00291"></a>00291 <span class="comment">/*************************************/</span>
|
313
|
+
<a name="l00292"></a>00292 };
|
314
|
+
<a name="l00293"></a>00293 <span class="comment"></span>
|
315
|
+
<a name="l00294"></a>00294 <span class="comment"> /**</span>
|
316
|
+
<a name="l00295"></a>00295 <span class="comment"> * Server-wide (global, not per-virtual host) configuration information.</span>
|
317
|
+
<a name="l00296"></a>00296 <span class="comment"> *</span>
|
318
|
+
<a name="l00297"></a>00297 <span class="comment"> * Use the getter methods to query information, because those will return</span>
|
319
|
+
<a name="l00298"></a>00298 <span class="comment"> * the default value if the value is not specified.</span>
|
320
|
+
<a name="l00299"></a>00299 <span class="comment"> */</span>
|
321
|
+
<a name="l00300"></a>00300 <span class="keyword">struct </span>ServerConfig {<span class="comment"></span>
|
322
|
+
<a name="l00301"></a>00301 <span class="comment"> /** The filename of the Ruby interpreter to use. */</span>
|
323
|
+
<a name="l00302"></a>00302 <span class="keyword">const</span> <span class="keywordtype">char</span> *ruby;
|
324
|
+
<a name="l00303"></a>00303 <span class="comment"></span>
|
325
|
+
<a name="l00304"></a>00304 <span class="comment"> /** The Passenger root folder. */</span>
|
326
|
+
<a name="l00305"></a>00305 <span class="keyword">const</span> <span class="keywordtype">char</span> *root;
|
327
327
|
<a name="l00306"></a>00306 <span class="comment"></span>
|
328
|
-
<a name="l00307"></a>00307 <span class="comment"> /**
|
329
|
-
<a name="l00308"></a>00308 <span class="keywordtype">
|
328
|
+
<a name="l00307"></a>00307 <span class="comment"> /** The log verbosity. */</span>
|
329
|
+
<a name="l00308"></a>00308 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> logLevel;
|
330
330
|
<a name="l00309"></a>00309 <span class="comment"></span>
|
331
|
-
<a name="l00310"></a>00310 <span class="comment"> /**
|
332
|
-
<a name="l00311"></a>00311 <span class="comment"> *
|
333
|
-
<a name="l00312"></a>00312 <span class="keywordtype">
|
334
|
-
<a name="l00313"></a>00313
|
335
|
-
<a name="l00314"></a>00314 <span class="comment"> /**
|
336
|
-
<a name="l00315"></a>00315 <span class="comment"> *
|
337
|
-
<a name="l00316"></a>00316
|
338
|
-
<a name="l00317"></a>00317 <span class="
|
339
|
-
<a name="l00318"></a>00318
|
340
|
-
<a name="l00319"></a>00319 <span class="comment">
|
341
|
-
<a name="l00320"></a>00320
|
342
|
-
<a name="l00321"></a>00321
|
343
|
-
<a name="l00322"></a>00322
|
344
|
-
<a name="l00323"></a>00323
|
345
|
-
<a name="l00324"></a>00324 <span class="
|
346
|
-
<a name="l00325"></a>00325
|
347
|
-
<a name="l00326"></a>00326
|
348
|
-
<a name="l00327"></a>00327
|
349
|
-
<a name="l00328"></a>00328
|
350
|
-
<a name="l00329"></a>00329
|
351
|
-
<a name="l00330"></a>00330
|
352
|
-
<a name="l00331"></a>00331
|
353
|
-
<a name="l00332"></a>00332 <span class="
|
354
|
-
<a name="l00333"></a>00333
|
355
|
-
<a name="l00334"></a>00334
|
356
|
-
<a name="l00335"></a>00335
|
357
|
-
<a name="l00336"></a>00336
|
358
|
-
<a name="l00337"></a>00337
|
359
|
-
<a name="l00338"></a>00338
|
360
|
-
<a name="l00339"></a>00339
|
361
|
-
<a name="l00340"></a>00340
|
362
|
-
<a name="l00341"></a>00341
|
363
|
-
<a name="l00342"></a>00342
|
364
|
-
<a name="l00343"></a>00343 <span class="
|
365
|
-
<a name="l00344"></a>00344
|
366
|
-
<a name="l00345"></a>00345
|
367
|
-
<a name="l00346"></a>00346 <span class="
|
368
|
-
<a name="l00347"></a>00347 <span class="comment"
|
369
|
-
<a name="l00348"></a>00348 <span class="comment"
|
370
|
-
<a name="l00349"></a>00349
|
371
|
-
<a name="l00350"></a>00350
|
372
|
-
<a name="l00351"></a>00351
|
373
|
-
<a name="l00352"></a>00352
|
374
|
-
<a name="l00353"></a>00353
|
375
|
-
<a name="l00354"></a>00354 <span class="
|
376
|
-
<a name="l00355"></a>00355
|
377
|
-
<a name="l00356"></a>00356
|
378
|
-
<a name="l00357"></a>00357
|
379
|
-
<a name="l00358"></a>00358
|
380
|
-
<a name="l00359"></a>00359 <span class="
|
381
|
-
<a name="l00360"></a>00360
|
382
|
-
<a name="l00361"></a>00361
|
383
|
-
<a name="l00362"></a>00362 <span class="
|
384
|
-
<a name="l00363"></a>00363 <span class="
|
385
|
-
<a name="l00364"></a>00364
|
386
|
-
<a name="l00365"></a>00365
|
387
|
-
<a name="l00366"></a>00366
|
388
|
-
<a name="l00367"></a>00367 <span class="
|
389
|
-
<a name="l00368"></a>00368
|
390
|
-
<a name="l00369"></a>00369
|
391
|
-
<a name="l00370"></a>00370 <span class="
|
331
|
+
<a name="l00310"></a>00310 <span class="comment"> /** The maximum number of simultaneously alive application</span>
|
332
|
+
<a name="l00311"></a>00311 <span class="comment"> * instances. */</span>
|
333
|
+
<a name="l00312"></a>00312 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> maxPoolSize;
|
334
|
+
<a name="l00313"></a>00313 <span class="comment"></span>
|
335
|
+
<a name="l00314"></a>00314 <span class="comment"> /** Whether the maxPoolSize option was explicitly specified in</span>
|
336
|
+
<a name="l00315"></a>00315 <span class="comment"> * this server config. */</span>
|
337
|
+
<a name="l00316"></a>00316 <span class="keywordtype">bool</span> maxPoolSizeSpecified;
|
338
|
+
<a name="l00317"></a>00317 <span class="comment"></span>
|
339
|
+
<a name="l00318"></a>00318 <span class="comment"> /** The maximum number of simultaneously alive Rails application</span>
|
340
|
+
<a name="l00319"></a>00319 <span class="comment"> * that a single Rails application may occupy. */</span>
|
341
|
+
<a name="l00320"></a>00320 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> maxInstancesPerApp;
|
342
|
+
<a name="l00321"></a>00321 <span class="comment"></span>
|
343
|
+
<a name="l00322"></a>00322 <span class="comment"> /** Whether the maxInstancesPerApp option was explicitly specified in</span>
|
344
|
+
<a name="l00323"></a>00323 <span class="comment"> * this server config. */</span>
|
345
|
+
<a name="l00324"></a>00324 <span class="keywordtype">bool</span> maxInstancesPerAppSpecified;
|
346
|
+
<a name="l00325"></a>00325 <span class="comment"></span>
|
347
|
+
<a name="l00326"></a>00326 <span class="comment"> /** The maximum number of seconds that an application may be</span>
|
348
|
+
<a name="l00327"></a>00327 <span class="comment"> * idle before it gets terminated. */</span>
|
349
|
+
<a name="l00328"></a>00328 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> poolIdleTime;
|
350
|
+
<a name="l00329"></a>00329 <span class="comment"></span>
|
351
|
+
<a name="l00330"></a>00330 <span class="comment"> /** Whether the poolIdleTime option was explicitly specified in</span>
|
352
|
+
<a name="l00331"></a>00331 <span class="comment"> * this server config. */</span>
|
353
|
+
<a name="l00332"></a>00332 <span class="keywordtype">bool</span> poolIdleTimeSpecified;
|
354
|
+
<a name="l00333"></a>00333 <span class="comment"></span>
|
355
|
+
<a name="l00334"></a>00334 <span class="comment"> /** Whether user switching support is enabled. */</span>
|
356
|
+
<a name="l00335"></a>00335 <span class="keywordtype">bool</span> userSwitching;
|
357
|
+
<a name="l00336"></a>00336 <span class="comment"></span>
|
358
|
+
<a name="l00337"></a>00337 <span class="comment"> /** Whether the userSwitching option was explicitly specified in</span>
|
359
|
+
<a name="l00338"></a>00338 <span class="comment"> * this server config. */</span>
|
360
|
+
<a name="l00339"></a>00339 <span class="keywordtype">bool</span> userSwitchingSpecified;
|
361
|
+
<a name="l00340"></a>00340 <span class="comment"></span>
|
362
|
+
<a name="l00341"></a>00341 <span class="comment"> /** The user that applications must run as if user switching</span>
|
363
|
+
<a name="l00342"></a>00342 <span class="comment"> * fails or is disabled. NULL means the option is not specified.</span>
|
364
|
+
<a name="l00343"></a>00343 <span class="comment"> */</span>
|
365
|
+
<a name="l00344"></a>00344 <span class="keyword">const</span> <span class="keywordtype">char</span> *defaultUser;
|
366
|
+
<a name="l00345"></a>00345 <span class="comment"></span>
|
367
|
+
<a name="l00346"></a>00346 <span class="comment"> /** The temp directory that Passenger should use. NULL</span>
|
368
|
+
<a name="l00347"></a>00347 <span class="comment"> * means unspecified.</span>
|
369
|
+
<a name="l00348"></a>00348 <span class="comment"> */</span>
|
370
|
+
<a name="l00349"></a>00349 <span class="keyword">const</span> <span class="keywordtype">char</span> *tempDir;
|
371
|
+
<a name="l00350"></a>00350
|
372
|
+
<a name="l00351"></a>00351 <span class="keyword">const</span> <span class="keywordtype">char</span> *getRuby()<span class="keyword"> const </span>{
|
373
|
+
<a name="l00352"></a>00352 <span class="keywordflow">if</span> (ruby != NULL) {
|
374
|
+
<a name="l00353"></a>00353 <span class="keywordflow">return</span> ruby;
|
375
|
+
<a name="l00354"></a>00354 } <span class="keywordflow">else</span> {
|
376
|
+
<a name="l00355"></a>00355 <span class="keywordflow">return</span> <span class="stringliteral">"ruby"</span>;
|
377
|
+
<a name="l00356"></a>00356 }
|
378
|
+
<a name="l00357"></a>00357 }
|
379
|
+
<a name="l00358"></a>00358
|
380
|
+
<a name="l00359"></a>00359 <span class="keyword">const</span> <span class="keywordtype">char</span> *getDefaultUser()<span class="keyword"> const </span>{
|
381
|
+
<a name="l00360"></a>00360 <span class="keywordflow">if</span> (defaultUser != NULL) {
|
382
|
+
<a name="l00361"></a>00361 <span class="keywordflow">return</span> defaultUser;
|
383
|
+
<a name="l00362"></a>00362 } <span class="keywordflow">else</span> {
|
384
|
+
<a name="l00363"></a>00363 <span class="keywordflow">return</span> <span class="stringliteral">"nobody"</span>;
|
385
|
+
<a name="l00364"></a>00364 }
|
386
|
+
<a name="l00365"></a>00365 }
|
387
|
+
<a name="l00366"></a>00366
|
388
|
+
<a name="l00367"></a>00367 <span class="keyword">const</span> <span class="keywordtype">char</span> *getTempDir()<span class="keyword"> const </span>{
|
389
|
+
<a name="l00368"></a>00368 <span class="keywordflow">if</span> (tempDir != NULL) {
|
390
|
+
<a name="l00369"></a>00369 <span class="keywordflow">return</span> tempDir;
|
391
|
+
<a name="l00370"></a>00370 } <span class="keywordflow">else</span> {
|
392
|
+
<a name="l00371"></a>00371 <span class="keywordflow">return</span> getSystemTempDir();
|
393
|
+
<a name="l00372"></a>00372 }
|
394
|
+
<a name="l00373"></a>00373 }
|
395
|
+
<a name="l00374"></a>00374 };
|
396
|
+
<a name="l00375"></a>00375 }
|
397
|
+
<a name="l00376"></a>00376
|
398
|
+
<a name="l00377"></a>00377 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
|
399
|
+
<a name="l00378"></a>00378 <span class="preprocessor">#endif</span>
|
400
|
+
<a name="l00379"></a>00379 <span class="preprocessor"></span><span class="comment"></span>
|
401
|
+
<a name="l00380"></a>00380 <span class="comment">/** Configuration hook for per-directory configuration structure creation. */</span>
|
402
|
+
<a name="l00381"></a>00381 <span class="keywordtype">void</span> *<a class="code" href="group__Configuration.html#g92dc583c1fa5f8025149799e356a6c78" title="Configuration hook for per-directory configuration structure creation.">passenger_config_create_dir</a>(apr_pool_t *p, <span class="keywordtype">char</span> *dirspec);
|
403
|
+
<a name="l00382"></a>00382 <span class="comment"></span>
|
404
|
+
<a name="l00383"></a>00383 <span class="comment">/** Configuration hook for per-directory configuration structure merging. */</span>
|
405
|
+
<a name="l00384"></a>00384 <span class="keywordtype">void</span> *<a class="code" href="group__Configuration.html#g17787a036ef3f4dc46ae0acc9da2c7b0" title="Configuration hook for per-directory configuration structure merging.">passenger_config_merge_dir</a>(apr_pool_t *p, <span class="keywordtype">void</span> *basev, <span class="keywordtype">void</span> *addv);
|
406
|
+
<a name="l00385"></a>00385 <span class="comment"></span>
|
407
|
+
<a name="l00386"></a>00386 <span class="comment">/** Configuration hook for per-server configuration structure creation. */</span>
|
408
|
+
<a name="l00387"></a>00387 <span class="keywordtype">void</span> *<a class="code" href="group__Configuration.html#ga93bd8d426649b4e86da38eb67a49178" title="Configuration hook for per-server configuration structure creation.">passenger_config_create_server</a>(apr_pool_t *p, server_rec *s);
|
409
|
+
<a name="l00388"></a>00388 <span class="comment"></span>
|
410
|
+
<a name="l00389"></a>00389 <span class="comment">/** Configuration hook for per-server configuration structure merging. */</span>
|
411
|
+
<a name="l00390"></a>00390 <span class="keywordtype">void</span> *<a class="code" href="group__Configuration.html#g95c963a61867190928d912779952b15e" title="Configuration hook for per-server configuration structure merging.">passenger_config_merge_server</a>(apr_pool_t *p, <span class="keywordtype">void</span> *basev, <span class="keywordtype">void</span> *overridesv);
|
412
|
+
<a name="l00391"></a>00391
|
413
|
+
<a name="l00392"></a>00392 <span class="keywordtype">void</span> passenger_config_merge_all_servers(apr_pool_t *pool, server_rec *main_server);
|
414
|
+
<a name="l00393"></a>00393 <span class="comment"></span>
|
415
|
+
<a name="l00394"></a>00394 <span class="comment">/** Apache module commands array. */</span>
|
416
|
+
<a name="l00395"></a>00395 <span class="keyword">extern</span> <span class="keyword">const</span> command_rec <a class="code" href="group__Configuration.html#g21954abbf4018583acb9d8daef3dfd95" title="Apache module commands array.">passenger_commands</a>[];
|
417
|
+
<a name="l00396"></a>00396
|
418
|
+
<a name="l00397"></a>00397 <span class="preprocessor">#ifdef __cplusplus</span>
|
419
|
+
<a name="l00398"></a>00398 <span class="preprocessor"></span> }
|
420
|
+
<a name="l00399"></a>00399 <span class="preprocessor">#endif</span>
|
421
|
+
<a name="l00400"></a>00400 <span class="preprocessor"></span><span class="comment"></span>
|
422
|
+
<a name="l00401"></a>00401 <span class="comment">/**</span>
|
423
|
+
<a name="l00402"></a>00402 <span class="comment"> * @}</span>
|
424
|
+
<a name="l00403"></a>00403 <span class="comment"> */</span>
|
425
|
+
<a name="l00404"></a>00404
|
426
|
+
<a name="l00405"></a>00405 <span class="preprocessor">#endif </span><span class="comment">/* _PASSENGER_CONFIGURATION_H_ */</span>
|
392
427
|
</pre></div></div>
|
393
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on
|
428
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Sep 1 11:23:09 2009 for Passenger by
|
394
429
|
<a href="http://www.doxygen.org/index.html">
|
395
430
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
|
396
431
|
</body>
|