passenger 3.0.19 → 3.0.21

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.

@@ -1,9 +1,9 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
- <meta name="generator" content="AsciiDoc 8.6.7">
6
- <title>Phusion Passenger users guide</title>
2
+ <html lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
+ <meta name="generator" content="AsciiDoc 8.6.7">
6
+ <title>Phusion Passenger users guide</title>
7
7
  <style type="text/css">
8
8
  /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
9
9
 
@@ -603,7 +603,7 @@ div.exampleblock > div.content, div.sidebarblock > div.content, div.listingblock
603
603
  div.verseblock { border-left-width: 0; margin-left: 3em; }
604
604
  div.quoteblock { border-left-width: 3px; margin-left: 0; margin-right: 0;}
605
605
  div.admonitionblock td.content { border-left: 3px solid #E8E8E8; }
606
- </style>
606
+ </style>
607
607
  <script type="text/javascript">
608
608
  /*<![CDATA[*/
609
609
  var asciidoc = { // Namespace.
@@ -795,11 +795,14 @@ install: function(toclevels) {
795
795
  }
796
796
 
797
797
  }
798
- asciidoc.install(3);
798
+ asciidoc.install();
799
799
  /*]]>*/
800
- </script><style type="text/css">
800
+ </script>
801
+ <style type="text/css">
801
802
  body {
802
- margin: 1em 10% 1em 10%;
803
+ margin: 1em auto 1em auto;
804
+ padding: 0 1em 0 1em;
805
+ max-width: 800px;
803
806
  }
804
807
 
805
808
  a.image {
@@ -878,6 +881,10 @@ a.image {
878
881
  margin: 2em;
879
882
  }
880
883
 
884
+ pre {
885
+ overflow: auto;
886
+ }
887
+
881
888
  @media print {
882
889
  body {
883
890
  font-size: 18pt;
@@ -1038,29 +1045,40 @@ a.image {
1038
1045
  border-bottom-right-radius: 0;
1039
1046
  }
1040
1047
 
1048
+ /* http://nicolasgallagher.com/jump-links-and-viewport-positioning/ */
1049
+ .anchor_helper {
1050
+ position: relative;
1051
+ display: block;
1052
+ top: -50px;
1053
+ width: 1px;
1054
+ height: 1px;
1055
+ }
1056
+
1041
1057
  </style>
1042
- </head>
1058
+ </head>
1043
1059
  <body class="article">
1044
1060
  <div id="topbar" style="display: none">
1045
1061
  <div class="title">
1046
- <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAAEV95QVAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sGCRMSACDxkZwAAAAidEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVAgb24gYSBNYWOHqHdDAAAAZUlEQVQY032PSxbAIAjEIlfygL6ePF3UUvpzNjgSYWwqAMEhUQnANnsC7TQPeJpsVWzMuh2sog4vDTUbqP081zECrW4dtdaQGSIKlWluPyjK+VXxAz5XfcKufCzA130AfQHWB30HZxlPaP080xsAAAAASUVORK5CYII=" width="11" height="10" alt=""><a href="javascript:void(Mizuho.smoothlyScrollToToc())">Phusion Passenger users guide</a>
1062
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAAEV95QVAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sGCRMSACDxkZwAAAAidEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVAgb24gYSBNYWOHqHdDAAAAZUlEQVQY032PSxbAIAjEIlfygL6ePF3UUvpzNjgSYWwqAMEhUQnANnsC7TQPeJpsVWzMuh2sog4vDTUbqP081zECrW4dtdaQGSIKlWluPyjK+VXxAz5XfcKufCzA130AfQHWB30HZxlPaP080xsAAAAASUVORK5CYII=" width="11" height="10" alt="">
1063
+ <a href="javascript:void(Mizuho.smoothlyScrollToToc())">Phusion Passenger users guide</a>
1047
1064
  </div>
1048
1065
  <a href="javascript:void(0)" id="current_section"></a>
1049
1066
  </div>
1050
1067
  <div id="header">
1051
- <h1>Phusion Passenger users guide</h1>
1068
+ <h1>Phusion Passenger users guide</h1>
1052
1069
  <div id="preamble">
1053
1070
  <div class="sectionbody">
1054
1071
  <div class="paragraph"><p><span class="image">
1055
1072
  <a class="image" href="http://www.phusion.nl/">
1056
- <img src="images/phusion_banner.png" alt="images/phusion_banner.png"></a>
1073
+ <img src="images/phusion_banner.png" alt="images/phusion_banner.png">
1074
+ </a>
1057
1075
  </span></p></div>
1058
1076
  <div class="paragraph"><p>Phusion Passenger is an Apache module, which makes deploying Ruby and Ruby on
1059
1077
  Rails applications on Apache a breeze. It follows the usual Ruby on Rails
1060
1078
  conventions, such as "Don’t-Repeat-Yourself" and ease of setup, while at the
1061
1079
  same time providing enough flexibility.</p></div>
1062
1080
  <div class="paragraph"><p>This users guide will teach you:</p></div>
1063
- <div class="ulist"><ul>
1081
+ <div class="ulist"><ul>
1064
1082
  <li>
1065
1083
  <p>
1066
1084
  How to install Phusion Passenger.
@@ -1090,19 +1108,167 @@ How to solve common problems.
1090
1108
  <div class="paragraph"><p>This guide assumes that the reader is somewhat familiar with Apache and with
1091
1109
  using the commandline.</p></div>
1092
1110
  </div>
1093
- </div>
1111
+ </div>
1094
1112
  <div id="toc">
1095
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><div id="toctitle">Table of Contents</div>
1096
- <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
1097
- </div>
1113
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><div id="toctitle">Table of Contents</div>
1114
+ <div class="foo toclevel2"><a href="#_support_information">1. Support information</a></div>
1115
+ <div class="foo toclevel3"><a href="#_supported_operating_systems">1.1. Supported operating systems</a></div>
1116
+ <div class="foo toclevel3"><a href="#_where_to_get_support">1.2. Where to get support</a></div>
1117
+ <div class="foo toclevel2"><a href="#_installing_upgrading_and_uninstalling_phusion_passenger">2. Installing, upgrading and uninstalling Phusion Passenger</a></div>
1118
+ <div class="foo toclevel3"><a href="#_generic_installation_instructions">2.1. Generic installation instructions</a></div>
1119
+ <div class="foo toclevel4"><a href="#install_passenger">2.1.1. Overview of installation methods</a></div>
1120
+ <div class="foo toclevel4"><a href="#_preparation_gem_and_source_tarball_only">2.1.2. Preparation (gem and source tarball only)</a></div>
1121
+ <div class="foo toclevel4"><a href="#_installing_via_the_gem">2.1.3. Installing via the gem</a></div>
1122
+ <div class="foo toclevel4"><a href="#_installing_via_the_source_tarball">2.1.4. Installing via the source tarball</a></div>
1123
+ <div class="foo toclevel4"><a href="#_installing_via_a_native_linux_package">2.1.5. Installing via a native Linux package</a></div>
1124
+ <div class="foo toclevel4"><a href="#_what_does_the_installer_do">2.1.6. What does the installer do?</a></div>
1125
+ <div class="foo toclevel3"><a href="#_operating_system_specific_instructions_and_information">2.2. Operating system-specific instructions and information</a></div>
1126
+ <div class="foo toclevel4"><a href="#_macos_x">2.2.1. MacOS X</a></div>
1127
+ <div class="foo toclevel4"><a href="#_ubuntu_linux">2.2.2. Ubuntu Linux</a></div>
1128
+ <div class="foo toclevel4"><a href="#_opensolaris">2.2.3. OpenSolaris</a></div>
1129
+ <div class="foo toclevel3"><a href="#_upgrading_or_downgrading_phusion_passenger">2.3. Upgrading or downgrading Phusion Passenger</a></div>
1130
+ <div class="foo toclevel3"><a href="#_unloading_disabling_phusion_passenger_from_apache_without_uninstalling_it">2.4. Unloading (disabling) Phusion Passenger from Apache without uninstalling it</a></div>
1131
+ <div class="foo toclevel3"><a href="#_uninstalling_phusion_passenger">2.5. Uninstalling Phusion Passenger</a></div>
1132
+ <div class="foo toclevel2"><a href="#_deploying_a_ruby_on_rails_1_x_or_2_x_but_not_rails_gt_3_x_application">3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails &gt;= 3.x) application</a></div>
1133
+ <div class="foo toclevel3"><a href="#_deploying_to_a_virtual_host_8217_s_root">3.1. Deploying to a virtual host’s root</a></div>
1134
+ <div class="foo toclevel3"><a href="#deploying_rails_to_sub_uri">3.2. Deploying to a sub URI</a></div>
1135
+ <div class="foo toclevel3"><a href="#_redeploying_restarting_the_ruby_on_rails_application">3.3. Redeploying (restarting the Ruby on Rails application)</a></div>
1136
+ <div class="foo toclevel3"><a href="#_migrations">3.4. Migrations</a></div>
1137
+ <div class="foo toclevel3"><a href="#_capistrano_integration">3.5. Capistrano integration</a></div>
1138
+ <div class="foo toclevel2"><a href="#_deploying_a_rack_based_ruby_application_including_rails_gt_3">4. Deploying a Rack-based Ruby application (including Rails &gt;= 3)</a></div>
1139
+ <div class="foo toclevel3"><a href="#_tutorial_example_writing_and_deploying_a_hello_world_rack_application">4.1. Tutorial/example: writing and deploying a Hello World Rack application</a></div>
1140
+ <div class="foo toclevel3"><a href="#_deploying_to_a_virtual_host_8217_s_root_2">4.2. Deploying to a virtual host’s root</a></div>
1141
+ <div class="foo toclevel3"><a href="#deploying_rack_to_sub_uri">4.3. Deploying to a sub URI</a></div>
1142
+ <div class="foo toclevel3"><a href="#_redeploying_restarting_the_rack_application">4.4. Redeploying (restarting the Rack application)</a></div>
1143
+ <div class="foo toclevel3"><a href="#_rackup_specifications_for_various_web_frameworks">4.5. Rackup specifications for various web frameworks</a></div>
1144
+ <div class="foo toclevel4"><a href="#_camping">4.5.1. Camping</a></div>
1145
+ <div class="foo toclevel4"><a href="#_halcyon">4.5.2. Halcyon</a></div>
1146
+ <div class="foo toclevel4"><a href="#_mack">4.5.3. Mack</a></div>
1147
+ <div class="foo toclevel4"><a href="#_merb">4.5.4. Merb</a></div>
1148
+ <div class="foo toclevel4"><a href="#_ramaze">4.5.5. Ramaze</a></div>
1149
+ <div class="foo toclevel4"><a href="#_sinatra">4.5.6. Sinatra</a></div>
1150
+ <div class="foo toclevel2"><a href="#_configuring_phusion_passenger">5. Configuring Phusion Passenger</a></div>
1151
+ <div class="foo toclevel3"><a href="#_passengerroot_lt_directory_gt">5.1. PassengerRoot &lt;directory&gt;</a></div>
1152
+ <div class="foo toclevel3"><a href="#PassengerRuby">5.2. PassengerRuby &lt;filename&gt;</a></div>
1153
+ <div class="foo toclevel3"><a href="#PassengerAppRoot">5.3. PassengerAppRoot &lt;path/to/root&gt;</a></div>
1154
+ <div class="foo toclevel3"><a href="#PassengerSpawnMethod">5.4. PassengerSpawnMethod &lt;string&gt;</a></div>
1155
+ <div class="foo toclevel3"><a href="#PassengerUseGlobalQueue">5.5. PassengerUseGlobalQueue &lt;on|off&gt;</a></div>
1156
+ <div class="foo toclevel3"><a href="#_passengerenabled_lt_on_off_gt">5.6. PassengerEnabled &lt;on|off&gt;</a></div>
1157
+ <div class="foo toclevel3"><a href="#PassengerTempDir">5.7. PassengerTempDir &lt;directory&gt;</a></div>
1158
+ <div class="foo toclevel3"><a href="#PassengerUploadBufferDir">5.8. PassengerUploadBufferDir &lt;directory&gt;</a></div>
1159
+ <div class="foo toclevel3"><a href="#_passengerrestartdir_lt_directory_gt">5.9. PassengerRestartDir &lt;directory&gt;</a></div>
1160
+ <div class="foo toclevel3"><a href="#PassengerBufferResponse">5.10. PassengerBufferResponse &lt;on|off&gt;</a></div>
1161
+ <div class="foo toclevel3"><a href="#PassengerRollingRestarts">5.11. PassengerRollingRestarts &lt;on|off&gt;</a></div>
1162
+ <div class="foo toclevel3"><a href="#_passengerresistdeploymenterrors_lt_on_off_gt">5.12. PassengerResistDeploymentErrors &lt;on|off&gt;</a></div>
1163
+ <div class="foo toclevel3"><a href="#_security_options">5.13. Security options</a></div>
1164
+ <div class="foo toclevel4"><a href="#PassengerUserSwitching">5.13.1. PassengerUserSwitching &lt;on|off&gt;</a></div>
1165
+ <div class="foo toclevel4"><a href="#_passengeruser_lt_username_gt">5.13.2. PassengerUser &lt;username&gt;</a></div>
1166
+ <div class="foo toclevel4"><a href="#_passengergroup_lt_group_name_gt">5.13.3. PassengerGroup &lt;group name&gt;</a></div>
1167
+ <div class="foo toclevel4"><a href="#PassengerDefaultUser">5.13.4. PassengerDefaultUser &lt;username&gt;</a></div>
1168
+ <div class="foo toclevel4"><a href="#PassengerDefaultGroup">5.13.5. PassengerDefaultGroup &lt;group name&gt;</a></div>
1169
+ <div class="foo toclevel4"><a href="#_passengerfriendlyerrorpages_lt_on_off_gt">5.13.6. PassengerFriendlyErrorPages &lt;on|off&gt;</a></div>
1170
+ <div class="foo toclevel3"><a href="#_resource_control_and_optimization_options">5.14. Resource control and optimization options</a></div>
1171
+ <div class="foo toclevel4"><a href="#_passengermaxpoolsize_lt_integer_gt">5.14.1. PassengerMaxPoolSize &lt;integer&gt;</a></div>
1172
+ <div class="foo toclevel4"><a href="#PassengerMinInstances">5.14.2. PassengerMinInstances &lt;integer&gt;</a></div>
1173
+ <div class="foo toclevel4"><a href="#_passengermaxinstances_lt_integer_gt">5.14.3. PassengerMaxInstances &lt;integer&gt;</a></div>
1174
+ <div class="foo toclevel4"><a href="#_passengermaxinstancesperapp_lt_integer_gt">5.14.4. PassengerMaxInstancesPerApp &lt;integer&gt;</a></div>
1175
+ <div class="foo toclevel4"><a href="#PassengerPoolIdleTime">5.14.5. PassengerPoolIdleTime &lt;integer&gt;</a></div>
1176
+ <div class="foo toclevel4"><a href="#PassengerMaxRequests">5.14.6. PassengerMaxRequests &lt;integer&gt;</a></div>
1177
+ <div class="foo toclevel4"><a href="#PassengerMaxRequestTime">5.14.7. PassengerMaxRequestTime &lt;seconds&gt;</a></div>
1178
+ <div class="foo toclevel4"><a href="#PassengerMemoryLimit">5.14.8. PassengerMemoryLimit &lt;integer&gt;</a></div>
1179
+ <div class="foo toclevel4"><a href="#_passengerstatthrottlerate_lt_integer_gt">5.14.9. PassengerStatThrottleRate &lt;integer&gt;</a></div>
1180
+ <div class="foo toclevel4"><a href="#PassengerPreStart">5.14.10. PassengerPreStart &lt;url&gt;</a></div>
1181
+ <div class="foo toclevel4"><a href="#PassengerHighPerformance">5.14.11. PassengerHighPerformance &lt;on|off&gt;</a></div>
1182
+ <div class="foo toclevel3"><a href="#_compatibility_options">5.15. Compatibility options</a></div>
1183
+ <div class="foo toclevel4"><a href="#PassengerResolveSymlinksInDocumentRoot">5.15.1. PassengerResolveSymlinksInDocumentRoot &lt;on|off&gt;</a></div>
1184
+ <div class="foo toclevel4"><a href="#_passengerallowencodedslashes_lt_on_off_gt">5.15.2. PassengerAllowEncodedSlashes &lt;on|off&gt;</a></div>
1185
+ <div class="foo toclevel3"><a href="#_logging_and_debugging_options">5.16. Logging and debugging options</a></div>
1186
+ <div class="foo toclevel4"><a href="#_passengerloglevel_lt_integer_gt">5.16.1. PassengerLogLevel &lt;integer&gt;</a></div>
1187
+ <div class="foo toclevel4"><a href="#_passengerdebuglogfile_lt_filename_gt">5.16.2. PassengerDebugLogFile &lt;filename&gt;</a></div>
1188
+ <div class="foo toclevel4"><a href="#_passengerdebugger_lt_on_off_gt">5.16.3. PassengerDebugger &lt;on|off&gt;</a></div>
1189
+ <div class="foo toclevel3"><a href="#_ruby_on_rails_specific_options">5.17. Ruby on Rails-specific options</a></div>
1190
+ <div class="foo toclevel4"><a href="#_railsautodetect_lt_on_off_gt">5.17.1. RailsAutoDetect &lt;on|off&gt;</a></div>
1191
+ <div class="foo toclevel4"><a href="#RailsBaseURI">5.17.2. RailsBaseURI &lt;uri&gt;</a></div>
1192
+ <div class="foo toclevel4"><a href="#rails_env">5.17.3. RailsEnv &lt;string&gt;</a></div>
1193
+ <div class="foo toclevel4"><a href="#_railsframeworkspawneridletime_lt_integer_gt">5.17.4. RailsFrameworkSpawnerIdleTime &lt;integer&gt;</a></div>
1194
+ <div class="foo toclevel4"><a href="#_railsappspawneridletime_lt_integer_gt">5.17.5. RailsAppSpawnerIdleTime &lt;integer&gt;</a></div>
1195
+ <div class="foo toclevel3"><a href="#_rack_and_rails_gt_3_specific_options">5.18. Rack and Rails &gt;= 3 specific options</a></div>
1196
+ <div class="foo toclevel4"><a href="#_rackautodetect_lt_on_off_gt">5.18.1. RackAutoDetect &lt;on|off&gt;</a></div>
1197
+ <div class="foo toclevel4"><a href="#RackBaseURI">5.18.2. RackBaseURI &lt;uri&gt;</a></div>
1198
+ <div class="foo toclevel4"><a href="#rack_env">5.18.3. RackEnv &lt;string&gt;</a></div>
1199
+ <div class="foo toclevel3"><a href="#_deprecated_options">5.19. Deprecated options</a></div>
1200
+ <div class="foo toclevel4"><a href="#_railsruby">5.19.1. RailsRuby</a></div>
1201
+ <div class="foo toclevel4"><a href="#_railsuserswitching">5.19.2. RailsUserSwitching</a></div>
1202
+ <div class="foo toclevel4"><a href="#_railsdefaultuser">5.19.3. RailsDefaultUser</a></div>
1203
+ <div class="foo toclevel4"><a href="#_railsallowmodrewrite">5.19.4. RailsAllowModRewrite</a></div>
1204
+ <div class="foo toclevel4"><a href="#_railsspawnmethod">5.19.5. RailsSpawnMethod</a></div>
1205
+ <div class="foo toclevel2"><a href="#_troubleshooting">6. Troubleshooting</a></div>
1206
+ <div class="foo toclevel3"><a href="#_operating_system_specific_problems">6.1. Operating system-specific problems</a></div>
1207
+ <div class="foo toclevel4"><a href="#_macos_x_the_installer_cannot_locate_mamp_8217_s_apache">6.1.1. MacOS X: The installer cannot locate MAMP’s Apache</a></div>
1208
+ <div class="foo toclevel3"><a href="#_problems_during_installation">6.2. Problems during installation</a></div>
1209
+ <div class="foo toclevel4"><a href="#installing_ruby_dev">6.2.1. Ruby development headers aren’t installed</a></div>
1210
+ <div class="foo toclevel4"><a href="#_apache_development_headers_aren_8217_t_installed">6.2.2. Apache development headers aren’t installed</a></div>
1211
+ <div class="foo toclevel4"><a href="#_apr_development_headers_aren_8217_t_installed">6.2.3. APR development headers aren’t installed</a></div>
1212
+ <div class="foo toclevel4"><a href="#_phusion_passenger_is_using_the_wrong_apache_during_installation">6.2.4. Phusion Passenger is using the wrong Apache during installation</a></div>
1213
+ <div class="foo toclevel4"><a href="#_phusion_passenger_is_using_the_wrong_ruby_during_installation">6.2.5. Phusion Passenger is using the wrong Ruby during installation</a></div>
1214
+ <div class="foo toclevel3"><a href="#_problems_after_installation">6.3. Problems after installation</a></div>
1215
+ <div class="foo toclevel4"><a href="#_my_rails_application_works_on_mongrel_but_not_on_phusion_passenger">6.3.1. My Rails application works on Mongrel, but not on Phusion Passenger</a></div>
1216
+ <div class="foo toclevel4"><a href="#_phusion_passenger_has_been_compiled_against_the_wrong_apache_installation">6.3.2. Phusion Passenger has been compiled against the wrong Apache installation</a></div>
1217
+ <div class="foo toclevel4"><a href="#_i_get_a_403_forbidden_error">6.3.3. I get a "403 Forbidden" error</a></div>
1218
+ <div class="foo toclevel4"><a href="#_static_assets_such_as_images_and_stylesheets_aren_8217_t_being_displayed">6.3.4. Static assets such as images and stylesheets aren’t being displayed</a></div>
1219
+ <div class="foo toclevel4"><a href="#_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it">6.3.5. The Apache error log says that the spawn manager script does not exist, or that it does not have permission to execute it</a></div>
1220
+ <div class="foo toclevel4"><a href="#_the_rails_application_reports_that_it_8217_s_unable_to_start_because_of_a_permission_error">6.3.6. The Rails application reports that it’s unable to start because of a permission error</a></div>
1221
+ <div class="foo toclevel4"><a href="#_my_rails_application_8217_s_log_file_is_not_being_written_to">6.3.7. My Rails application’s log file is not being written to</a></div>
1222
+ <div class="foo toclevel4"><a href="#_i_8217_ve_deployed_my_app_on_ssl_but_the_app_thinks_its_not_on_ssl">6.3.8. I’ve deployed my app on SSL, but the app thinks its not on SSL</a></div>
1223
+ <div class="foo toclevel3"><a href="#conflicting_apache_modules">6.4. Conflicting Apache modules</a></div>
1224
+ <div class="foo toclevel4"><a href="#_mod_userdir">6.4.1. mod_userdir</a></div>
1225
+ <div class="foo toclevel4"><a href="#_multiviews_mod_negotiation">6.4.2. MultiViews (mod_negotiation)</a></div>
1226
+ <div class="foo toclevel4"><a href="#_virtualdocumentroot">6.4.3. VirtualDocumentRoot</a></div>
1227
+ <div class="foo toclevel2"><a href="#_analysis_and_system_maintenance">7. Analysis and system maintenance</a></div>
1228
+ <div class="foo toclevel3"><a href="#_inspecting_memory_usage">7.1. Inspecting memory usage</a></div>
1229
+ <div class="foo toclevel3"><a href="#_inspecting_phusion_passenger_8217_s_internal_status">7.2. Inspecting Phusion Passenger’s internal status</a></div>
1230
+ <div class="foo toclevel3"><a href="#debugging_frozen">7.3. Debugging frozen applications</a></div>
1231
+ <div class="foo toclevel3"><a href="#_accessing_individual_application_processes">7.4. Accessing individual application processes</a></div>
1232
+ <div class="foo toclevel3"><a href="#_attaching_an_irb_console_to_an_application_process">7.5. Attaching an IRB console to an application process</a></div>
1233
+ <div class="foo toclevel2"><a href="#_tips">8. Tips</a></div>
1234
+ <div class="foo toclevel3"><a href="#user_switching">8.1. User switching (security)</a></div>
1235
+ <div class="foo toclevel3"><a href="#reducing_memory_usage">8.2. Reducing memory consumption of Ruby on Rails applications by 33%</a></div>
1236
+ <div class="foo toclevel3"><a href="#capistrano">8.3. Capistrano recipe</a></div>
1237
+ <div class="foo toclevel3"><a href="#bundler_support">8.4. Bundler support</a></div>
1238
+ <div class="foo toclevel3"><a href="#moving_phusion_passenger">8.5. Moving Phusion Passenger to a different directory</a></div>
1239
+ <div class="foo toclevel3"><a href="#_installing_multiple_ruby_on_rails_versions">8.6. Installing multiple Ruby on Rails versions</a></div>
1240
+ <div class="foo toclevel3"><a href="#_making_the_application_restart_after_each_request">8.7. Making the application restart after each request</a></div>
1241
+ <div class="foo toclevel3"><a href="#sub_uri_deployment_uri_fix">8.8. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</a></div>
1242
+ <div class="foo toclevel3"><a href="#_x_sendfile_support">8.9. X-Sendfile support</a></div>
1243
+ <div class="foo toclevel3"><a href="#_upload_progress">8.10. Upload progress</a></div>
1244
+ <div class="foo toclevel2"><a href="#_under_the_hood">9. Under the hood</a></div>
1245
+ <div class="foo toclevel3"><a href="#_static_assets_serving">9.1. Static assets serving</a></div>
1246
+ <div class="foo toclevel3"><a href="#_page_caching_support">9.2. Page caching support</a></div>
1247
+ <div class="foo toclevel3"><a href="#application_detection">9.3. How Phusion Passenger detects whether a virtual host is a web application</a></div>
1248
+ <div class="foo toclevel2"><a href="#_appendix_a_about_this_document">10. Appendix A: About this document</a></div>
1249
+ <div class="foo toclevel2"><a href="#_appendix_b_terminology">11. Appendix B: Terminology</a></div>
1250
+ <div class="foo toclevel3"><a href="#application_root">11.1. Application root</a></div>
1251
+ <div class="foo toclevel3"><a href="#idle_process">11.2. Idle process</a></div>
1252
+ <div class="foo toclevel3"><a href="#inactive_process">11.3. Inactive process</a></div>
1253
+ <div class="foo toclevel2"><a href="#spawning_methods_explained">12. Appendix C: Spawning methods explained</a></div>
1254
+ <div class="foo toclevel3"><a href="#_the_most_straightforward_and_traditional_way_conservative_spawning">12.1. The most straightforward and traditional way: conservative spawning</a></div>
1255
+ <div class="foo toclevel3"><a href="#_the_smart_spawning_method">12.2. The smart spawning method</a></div>
1256
+ <div class="foo toclevel4"><a href="#_how_it_works">12.2.1. How it works</a></div>
1257
+ <div class="foo toclevel4"><a href="#_summary_of_benefits">12.2.2. Summary of benefits</a></div>
1258
+ <div class="foo toclevel3"><a href="#_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing">12.3. Smart spawning gotcha #1: unintentional file descriptor sharing</a></div>
1259
+ <div class="foo toclevel4"><a href="#_example_1_memcached_connection_sharing_harmful">12.3.1. Example 1: Memcached connection sharing (harmful)</a></div>
1260
+ <div class="foo toclevel4"><a href="#_example_2_log_file_sharing_not_harmful">12.3.2. Example 2: Log file sharing (not harmful)</a></div>
1261
+ <div class="foo toclevel3"><a href="#_smart_spawning_gotcha_2_the_need_to_revive_threads">12.4. Smart spawning gotcha #2: the need to revive threads</a></div>
1262
+ <div class="foo toclevel3"><a href="#_smart_spawning_gotcha_3_code_load_order">12.5. Smart spawning gotcha #3: code load order</a></div>
1263
+ </div>
1098
1264
  </div>
1099
1265
  <div id="content">
1100
1266
 
1101
1267
  <div class="sect1">
1102
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_support_information" data-comment-topic="support-information-zkewk3">1. Support information</h2>
1268
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_support_information"></span><h2 data-comment-topic="support-information-zkewk3" data-anchor="_support_information">1. Support information</h2>
1103
1269
  <div class="sectionbody">
1104
1270
  <div class="sect2">
1105
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_supported_operating_systems" data-comment-topic="supported-operating-systems-rhbg35">1.1. Supported operating systems</h3>
1271
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_supported_operating_systems"></span><h3 data-comment-topic="supported-operating-systems-rhbg35" data-anchor="_supported_operating_systems">1.1. Supported operating systems</h3>
1106
1272
  <div class="paragraph"><p>Phusion Passenger works on any POSIX-compliant operating system. In other
1107
1273
  words: practically any operating system on earth, except Microsoft Windows.</p></div>
1108
1274
  <div class="paragraph"><p>Phusion Passenger is confirmed on a large number of operating systems and Linux
@@ -1118,8 +1284,8 @@ or
1118
1284
  if it doesn’t work on your POSIX-compliant operating system.</p></div>
1119
1285
  </div>
1120
1286
  <div class="sect2">
1121
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_where_to_get_support" data-comment-topic="where-to-get-support-f3pbrb">1.2. Where to get support</h3>
1122
- <div class="ulist"><ul>
1287
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_where_to_get_support"></span><h3 data-comment-topic="where-to-get-support-f3pbrb" data-anchor="_where_to_get_support">1.2. Where to get support</h3>
1288
+ <div class="ulist"><ul>
1123
1289
  <li>
1124
1290
  <p>
1125
1291
  <a href="http://code.google.com/p/phusion-passenger/issues/list">Issue tracker</a> - report
@@ -1137,14 +1303,14 @@ if it doesn’t work on your POSIX-compliant operating system.</p></div>
1137
1303
  </div>
1138
1304
  </div>
1139
1305
  <div class="sect1">
1140
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_installing_upgrading_and_uninstalling_phusion_passenger" data-comment-topic="installing-upgrading-and-uninstalling-phusion-passenger-laryvs">2. Installing, upgrading and uninstalling Phusion Passenger</h2>
1306
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_upgrading_and_uninstalling_phusion_passenger"></span><h2 data-comment-topic="installing-upgrading-and-uninstalling-phusion-passenger-laryvs" data-anchor="_installing_upgrading_and_uninstalling_phusion_passenger">2. Installing, upgrading and uninstalling Phusion Passenger</h2>
1141
1307
  <div class="sectionbody">
1142
1308
  <div class="sect2">
1143
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_generic_installation_instructions" data-comment-topic="generic-installation-instructions-17jo43j">2.1. Generic installation instructions</h3>
1309
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_generic_installation_instructions"></span><h3 data-comment-topic="generic-installation-instructions-17jo43j" data-anchor="_generic_installation_instructions">2.1. Generic installation instructions</h3>
1144
1310
  <div class="sect3">
1145
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="install_passenger" data-comment-topic="overview-of-installation-methods-12vnjyb">2.1.1. Overview of installation methods</h4>
1311
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="install_passenger"></span><h4 data-comment-topic="overview-of-installation-methods-12vnjyb" data-anchor="install_passenger">2.1.1. Overview of installation methods</h4>
1146
1312
  <div class="paragraph"><p>There are three ways to install Phusion Passenger:</p></div>
1147
- <div class="olist arabic"><ol class="arabic">
1313
+ <div class="olist arabic"><ol class="arabic">
1148
1314
  <li>
1149
1315
  <p>
1150
1316
  By installing the Phusion Passenger gem, as instructed on the
@@ -1170,7 +1336,7 @@ the gem or the native package is easiest. For these two installation methods,
1170
1336
  Phusion Passenger provides an easy-to-use installer.</p></div>
1171
1337
  </div>
1172
1338
  <div class="sect3">
1173
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_preparation_gem_and_source_tarball_only" data-comment-topic="preparation-gem-and-source-tarball-only--1sxhbgg">2.1.2. Preparation (gem and source tarball only)</h4>
1339
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_preparation_gem_and_source_tarball_only"></span><h4 data-comment-topic="preparation-gem-and-source-tarball-only--1sxhbgg" data-anchor="_preparation_gem_and_source_tarball_only">2.1.2. Preparation (gem and source tarball only)</h4>
1174
1340
  <div class="paragraph"><p>If you want to install Phusion Passenger via the gem or the source tarball,
1175
1341
  then some preparations might be required. You can skip this subsection if
1176
1342
  you’re installing Phusion Passenger via a native Linux package, because no
@@ -1229,18 +1395,18 @@ installation in <em>/opt/apache2</em>. Then, assuming that the corresponding
1229
1395
  </div>
1230
1396
  </div>
1231
1397
  <div class="admonitionblock">
1232
- <table><tr>
1398
+ <table><tr>
1233
1399
  <td class="icon">
1234
- <img src="./images/icons/note.png" alt="Note">
1400
+ <img src="./images/icons/note.png" alt="Note">
1235
1401
  </td>
1236
1402
  <td class="content">On some systems, the <span class="monospaced">apxs</span> program might be called <span class="monospaced">apxs2</span>, and it might
1237
1403
  be located in the <span class="monospaced">sbin</span> folder instead of the <span class="monospaced">bin</span> folder.</td>
1238
- </tr></table>
1404
+ </tr></table>
1239
1405
  </div>
1240
1406
  <div class="admonitionblock">
1241
- <table><tr>
1407
+ <table><tr>
1242
1408
  <td class="icon">
1243
- <img src="./images/icons/note.png" alt="Note">
1409
+ <img src="./images/icons/note.png" alt="Note">
1244
1410
  </td>
1245
1411
  <td class="content">
1246
1412
  <div class="title">Environment variables and <em>sudo</em>
@@ -1250,7 +1416,7 @@ normal user, then run <span class="monospaced">sudo passenger-install-apache2-mo
1250
1416
  for the Phusion Passenger installer), then the installer will not receive the
1251
1417
  environment variable value that you set. To solve this problem, please become root
1252
1418
  prior to setting any environment variables, as described in the previous subsection.</td>
1253
- </tr></table>
1419
+ </tr></table>
1254
1420
  </div>
1255
1421
  </div>
1256
1422
  <div class="sect4">
@@ -1265,7 +1431,7 @@ Passenger will automatically detect it.</p></div>
1265
1431
  <div class="paragraph"><p>To specify a Ruby installation, prepend your Ruby installation’s <span class="monospaced">bin</span>
1266
1432
  directory to the <span class="monospaced">PATH</span> environment variable. For example, if you have the
1267
1433
  following Ruby installations:</p></div>
1268
- <div class="ulist"><ul>
1434
+ <div class="ulist"><ul>
1269
1435
  <li>
1270
1436
  <p>
1271
1437
  /usr/bin/ruby
@@ -1286,7 +1452,7 @@ following Ruby installations:</p></div>
1286
1452
  </div>
1287
1453
  </div>
1288
1454
  <div class="sect3">
1289
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_installing_via_the_gem" data-comment-topic="installing-via-the-gem-39jw1u">2.1.3. Installing via the gem</h4>
1455
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_via_the_gem"></span><h4 data-comment-topic="installing-via-the-gem-39jw1u" data-anchor="_installing_via_the_gem">2.1.3. Installing via the gem</h4>
1290
1456
  <div class="paragraph"><p>Please install the gem and then run the Phusion Passenger installer, by typing the
1291
1457
  following commands:</p></div>
1292
1458
  <div class="listingblock">
@@ -1298,7 +1464,7 @@ passenger-install-apache2-module</pre>
1298
1464
  <div class="paragraph"><p>Please follow the instructions given by the installer.</p></div>
1299
1465
  </div>
1300
1466
  <div class="sect3">
1301
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_installing_via_the_source_tarball" data-comment-topic="installing-via-the-source-tarball-1cgxrqc">2.1.4. Installing via the source tarball</h4>
1467
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_via_the_source_tarball"></span><h4 data-comment-topic="installing-via-the-source-tarball-1cgxrqc" data-anchor="_installing_via_the_source_tarball">2.1.4. Installing via the source tarball</h4>
1302
1468
  <div class="paragraph"><p>Extract the tarball to whatever location you prefer. <strong>The Phusion Passenger files
1303
1469
  are to reside in that location permanently.</strong> For example, if you would like
1304
1470
  Phusion Passenger to reside in <span class="monospaced">/opt/passenger-x.x.x</span>:</p></div>
@@ -1316,21 +1482,21 @@ tar xzvf ~/YourDownloadsFolder/passenger-x.x.x.tar.gz</pre>
1316
1482
  </div>
1317
1483
  <div class="paragraph"><p>Please follow the instructions given by the installer.</p></div>
1318
1484
  <div class="admonitionblock">
1319
- <table><tr>
1485
+ <table><tr>
1320
1486
  <td class="icon">
1321
- <img src="./images/icons/important.png" alt="Important">
1487
+ <img src="./images/icons/important.png" alt="Important">
1322
1488
  </td>
1323
1489
  <td class="content">Please do not remove the <em>passenger-x.x.x</em> folder after
1324
1490
  installation. Furthermore, the <em>passenger-x.x.x</em> folder must be accessible by Apache.</td>
1325
- </tr></table>
1491
+ </tr></table>
1326
1492
  </div>
1327
1493
  </div>
1328
1494
  <div class="sect3">
1329
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_installing_via_a_native_linux_package" data-comment-topic="installing-via-a-native-linux-package-i1tmhg">2.1.5. Installing via a native Linux package</h4>
1495
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_via_a_native_linux_package"></span><h4 data-comment-topic="installing-via-a-native-linux-package-i1tmhg" data-anchor="_installing_via_a_native_linux_package">2.1.5. Installing via a native Linux package</h4>
1330
1496
  <div class="paragraph"><p>John Leach from Brightbox has kindly provided a Ubuntu packages for Phusion Passenger. The package is available from the <a href="http://wiki.brightbox.co.uk/docs:phusion-passenger">Brightbox repository</a>.</p></div>
1331
1497
  </div>
1332
1498
  <div class="sect3">
1333
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_what_does_the_installer_do" data-comment-topic="what-does-the-installer-do--3a7z1w">2.1.6. What does the installer do?</h4>
1499
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_what_does_the_installer_do"></span><h4 data-comment-topic="what-does-the-installer-do--3a7z1w" data-anchor="_what_does_the_installer_do">2.1.6. What does the installer do?</h4>
1334
1500
  <div class="paragraph"><p>Although we call it an “installer”, it doesn’t actually install anything.
1335
1501
  The installer checks whether all required dependencies are installed,
1336
1502
  compiles Phusion Passenger for you, and tells you how to modify the Apache
@@ -1341,27 +1507,27 @@ Phusion Passenger.</p></div>
1341
1507
  </div>
1342
1508
  </div>
1343
1509
  <div class="sect2">
1344
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_operating_system_specific_instructions_and_information" data-comment-topic="operating-system-specific-instructions-and-information-1dfz365">2.2. Operating system-specific instructions and information</h3>
1510
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_operating_system_specific_instructions_and_information"></span><h3 data-comment-topic="operating-system-specific-instructions-and-information-1dfz365" data-anchor="_operating_system_specific_instructions_and_information">2.2. Operating system-specific instructions and information</h3>
1345
1511
  <div class="sect3">
1346
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_macos_x" data-comment-topic="macos-x-1lcpbz2">2.2.1. MacOS X</h4>
1512
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_macos_x"></span><h4 data-comment-topic="macos-x-1lcpbz2" data-anchor="_macos_x">2.2.1. MacOS X</h4>
1347
1513
  <div class="paragraph"><p>Ben Ruebenstein has written an excellent
1348
1514
  <a href="http://benr75.com/articles/2008/04/12/setup-mod_rails-phusion-mac-os-x-leopard">tutorial
1349
1515
  on installing Phusion Passenger on OS X</a>.</p></div>
1350
1516
  </div>
1351
1517
  <div class="sect3">
1352
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_ubuntu_linux" data-comment-topic="ubuntu-linux-1xwc66">2.2.2. Ubuntu Linux</h4>
1518
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_ubuntu_linux"></span><h4 data-comment-topic="ubuntu-linux-1xwc66" data-anchor="_ubuntu_linux">2.2.2. Ubuntu Linux</h4>
1353
1519
  <div class="paragraph"><p>Ben Hughes has written an <a href="http://www.railsgarden.com/2008/04/12/configurating-passenger-mod_rails-on-slicehost-with-ubuntu-710/">article on installing Phusion Passenger on Ubuntu</a>.</p></div>
1354
1520
  </div>
1355
1521
  <div class="sect3">
1356
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_opensolaris" data-comment-topic="opensolaris-1e0dynj">2.2.3. OpenSolaris</h4>
1522
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_opensolaris"></span><h4 data-comment-topic="opensolaris-1e0dynj" data-anchor="_opensolaris">2.2.3. OpenSolaris</h4>
1357
1523
  <div class="paragraph"><p>J Aaron Farr has written a <a href="http://cubiclemuses.com/cm/articles/2009/04/09/rails-passenger-open-solaris-ec2/">guide</a>
1358
1524
  about setting up Ruby on Rails and Phusion Passenger on OpenSolaris and EC2.</p></div>
1359
1525
  </div>
1360
1526
  </div>
1361
1527
  <div class="sect2">
1362
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_upgrading_or_downgrading_phusion_passenger" data-comment-topic="upgrading-or-downgrading-phusion-passenger-1dl8km6">2.3. Upgrading or downgrading Phusion Passenger</h3>
1528
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_upgrading_or_downgrading_phusion_passenger"></span><h3 data-comment-topic="upgrading-or-downgrading-phusion-passenger-1dl8km6" data-anchor="_upgrading_or_downgrading_phusion_passenger">2.3. Upgrading or downgrading Phusion Passenger</h3>
1363
1529
  <div class="paragraph"><p>Upgrading or downgrading Phusion Passenger for Apache involves several steps.</p></div>
1364
- <div class="olist arabic"><ol class="arabic">
1530
+ <div class="olist arabic"><ol class="arabic">
1365
1531
  <li>
1366
1532
  <p>
1367
1533
  First, you have to obtain and install the files associated with the version that you want to upgrade or downgrade to. You can do this in three ways: by using <a href="#upgrade_or_downgrade_with_rubygems">RubyGems</a>, by downloading a <a href="#upgrade_or_downgrade_with_tarball">tarball</a>, or by installing a <a href="#upgrade_or_downgrade_with_linux_packages">native Linux package</a>. If you installed a native Linux package, then skip to the last step. If not, read on.
@@ -1399,7 +1565,7 @@ otherwise Phusion Passenger may malfunction.
1399
1565
  4. Restart Apache. You’re now done.</p></div>
1400
1566
  </li>
1401
1567
  </ol></div>
1402
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="upgrade_or_downgrade_with_rubygems" class="float" data-comment-topic="obtaining-phusion-passenger-files-with-rubygems-8fz7a8">Obtaining Phusion Passenger files with RubyGems</h4>
1568
+ <span class="anchor_helper" id="upgrade_or_downgrade_with_rubygems"></span><h4 class="float" data-anchor="upgrade_or_downgrade_with_rubygems">Obtaining Phusion Passenger files with RubyGems</h4>
1403
1569
  <div class="paragraph">
1404
1570
  <div class="title">Open source</div>
1405
1571
  <p>You can obtain the files associated with the latest <em>open source</em> Phusion Passenger release by invoking the following command:</p>
@@ -1424,16 +1590,16 @@ otherwise Phusion Passenger may malfunction.
1424
1590
  <pre>sudo gem install passenger-enterprise-server-x.x.x.gem</pre>
1425
1591
  </div>
1426
1592
  </div>
1427
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="upgrade_or_downgrade_with_tarball" class="float" data-comment-topic="obtaining-phusion-passenger-files-through-a-tarball-evcm0j">Obtaining Phusion Passenger files through a tarball</h4>
1593
+ <span class="anchor_helper" id="upgrade_or_downgrade_with_tarball"></span><h4 class="float" data-anchor="upgrade_or_downgrade_with_tarball">Obtaining Phusion Passenger files through a tarball</h4>
1428
1594
  <div class="paragraph"><p>You can obtain the files associated with the latest <em>open source</em> Phusion Passenger release by downloading the tarball linked from <a href="https://www.phusionpassenger.com/download">the Phusion Passenger download page</a>. If you want a specific version, please refer to the release archive on <a href="http://rubyforge.org/frs/?group_id=5873&amp;release_id=46919">RubyForge</a>.</p></div>
1429
1595
  <div class="paragraph"><p>If you’re using <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a> then you should obtain the tarball from the <a href="https://www.phusionpassenger.com/orders">Customer Area</a> instead. Login with your order reference and password. The Customer Area will show you a list of files. Download the tarball for the version you want (<span class="monospaced">passenger-enterprise-server-x.x.x.tar.gz</span>).</p></div>
1430
1596
  <div class="paragraph"><p>Once you’ve obtained the tarball, extract it somewhere:</p></div>
1431
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="upgrade_or_downgrade_with_linux_packages" class="float" data-comment-topic="upgrading-with-native-linux-packages-jievu8">Upgrading with native Linux packages</h4>
1597
+ <span class="anchor_helper" id="upgrade_or_downgrade_with_linux_packages"></span><h4 class="float" data-anchor="upgrade_or_downgrade_with_linux_packages">Upgrading with native Linux packages</h4>
1432
1598
  <div class="paragraph"><p>When using native Linux packages, it is only possible to upgrade, not downgrade. Native Linux packages are only available for the open source Phusion Passenger, not for Phusion Passenger Enterprise.</p></div>
1433
1599
  <div class="paragraph"><p>Native Linux packages are contributed by third parties. Although they update pretty quickly, they lag behind gem and tarball releases, perhaps by a few days. Please learn more about native Linux packages <a href="https://www.phusionpassenger.com/native_packages">at the Phusion Passenger website</a>.</p></div>
1434
1600
  </div>
1435
1601
  <div class="sect2">
1436
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_unloading_disabling_phusion_passenger_from_apache_without_uninstalling_it" data-comment-topic="unloading-disabling-phusion-passenger-from-apache-without-uninstalling-it-s1axnx">2.4. Unloading (disabling) Phusion Passenger from Apache without uninstalling it</h3>
1602
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_unloading_disabling_phusion_passenger_from_apache_without_uninstalling_it"></span><h3 data-comment-topic="unloading-disabling-phusion-passenger-from-apache-without-uninstalling-it-s1axnx" data-anchor="_unloading_disabling_phusion_passenger_from_apache_without_uninstalling_it">2.4. Unloading (disabling) Phusion Passenger from Apache without uninstalling it</h3>
1437
1603
  <div class="paragraph"><p>You can temporarily unload (disable) Phusion Passenger from Apache, without
1438
1604
  uninstalling the Phusion Passenger files, so that Apache behaves as if Phusion
1439
1605
  Passenger was never installed in the first place. This might be useful to you if,
@@ -1444,7 +1610,7 @@ Phusion Passenger will not occupy any memory or CPU or otherwise interfere with
1444
1610
  Apache.</p></div>
1445
1611
  <div class="paragraph"><p>To unload Phusion Passenger from Apache, edit your Apache configuration file(s)
1446
1612
  and comment out:</p></div>
1447
- <div class="ulist"><ul>
1613
+ <div class="ulist"><ul>
1448
1614
  <li>
1449
1615
  <p>
1450
1616
  all Phusion Passenger configuration directives.
@@ -1499,11 +1665,11 @@ NameVirtualHosts *:80
1499
1665
  <div class="paragraph"><p>After you’ve done this, save the file and restart Apache.</p></div>
1500
1666
  </div>
1501
1667
  <div class="sect2">
1502
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_uninstalling_phusion_passenger" data-comment-topic="uninstalling-phusion-passenger-1qb4ssq">2.5. Uninstalling Phusion Passenger</h3>
1668
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_uninstalling_phusion_passenger"></span><h3 data-comment-topic="uninstalling-phusion-passenger-1qb4ssq" data-anchor="_uninstalling_phusion_passenger">2.5. Uninstalling Phusion Passenger</h3>
1503
1669
  <div class="paragraph"><p>To uninstall Phusion Passenger, please first remove all Phusion Passenger
1504
1670
  configuration directives from your Apache configuration file(s). After you’ve
1505
1671
  done this, you need to remove the Phusion Passenger files.</p></div>
1506
- <div class="ulist"><ul>
1672
+ <div class="ulist"><ul>
1507
1673
  <li>
1508
1674
  <p>
1509
1675
  If you installed Phusion Passenger via a gem, then type <span class="monospaced">gem uninstall passenger</span>.
@@ -1528,7 +1694,7 @@ If you installed Phusion Passenger via a Debian package, then remove type
1528
1694
  </div>
1529
1695
  </div>
1530
1696
  <div class="sect1">
1531
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_deploying_a_ruby_on_rails_1_x_or_2_x_but_not_rails_gt_3_x_application" data-comment-topic="deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-x-application-9r92hi">3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails &gt;= 3.x) application</h2>
1697
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_a_ruby_on_rails_1_x_or_2_x_but_not_rails_gt_3_x_application"></span><h2 data-comment-topic="deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-x-application-9r92hi" data-anchor="_deploying_a_ruby_on_rails_1_x_or_2_x_but_not_rails_gt_3_x_application">3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails &gt;= 3.x) application</h2>
1532
1698
  <div class="sectionbody">
1533
1699
  <div class="paragraph"><p>Suppose you have a Ruby on Rails application in <em>/webapps/mycook</em>, and you own
1534
1700
  the domain <em>www.mycook.com</em>. You can either deploy your application to the
@@ -1536,20 +1702,20 @@ virtual host’s root (i.e. the application will be accessible from the root URL
1536
1702
  <em>http://www.mycook.com/</em>), or in a sub URI (i.e. the application will be
1537
1703
  accessible from a sub URL, such as <em>http://www.mycook.com/railsapplication</em>).</p></div>
1538
1704
  <div class="admonitionblock">
1539
- <table><tr>
1705
+ <table><tr>
1540
1706
  <td class="icon">
1541
- <img src="./images/icons/note.png" alt="Note">
1707
+ <img src="./images/icons/note.png" alt="Note">
1542
1708
  </td>
1543
1709
  <td class="content">The default <span class="monospaced">RAILS_ENV</span> environment in which deployed Rails applications
1544
1710
  are run, is “production”. You can change this by changing the
1545
1711
  <a href="#rails_env"><em>RailsEnv</em></a> configuration option.</td>
1546
- </tr></table>
1712
+ </tr></table>
1547
1713
  </div>
1548
1714
  <div class="sect2">
1549
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_deploying_to_a_virtual_host_8217_s_root" data-comment-topic="deploying-to-a-virtual-host-s-root-zzo4v7">3.1. Deploying to a virtual host’s root</h3>
1715
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_to_a_virtual_host_8217_s_root"></span><h3 data-comment-topic="deploying-to-a-virtual-host-s-root-zzo4v7" data-anchor="_deploying_to_a_virtual_host_8217_s_root">3.1. Deploying to a virtual host’s root</h3>
1550
1716
  <div class="paragraph"><p>Add a virtual host entry to your Apache configuration file. Make sure that the
1551
1717
  following conditions are met:</p></div>
1552
- <div class="ulist"><ul>
1718
+ <div class="ulist"><ul>
1553
1719
  <li>
1554
1720
  <p>
1555
1721
  The virtual host’s document root must point to your Ruby on Rails application’s
@@ -1582,7 +1748,7 @@ MultiViews must be disabled for this folder.
1582
1748
  </div>
1583
1749
  <div class="paragraph"><p>You may also need to tweak your file/folder permissions. Make sure that the
1584
1750
  following folders are readable and executable by Apache:</p></div>
1585
- <div class="ulist"><ul>
1751
+ <div class="ulist"><ul>
1586
1752
  <li>
1587
1753
  <p>
1588
1754
  this <em>public</em> folder.
@@ -1602,7 +1768,7 @@ all parent folders. That is, /webapps/mycook and /webapps must also be readable
1602
1768
  <div class="paragraph"><p>Then restart Apache. The application has now been deployed.</p></div>
1603
1769
  </div>
1604
1770
  <div class="sect2">
1605
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="deploying_rails_to_sub_uri" data-comment-topic="deploying-to-a-sub-uri-zekba6">3.2. Deploying to a sub URI</h3>
1771
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="deploying_rails_to_sub_uri"></span><h3 data-comment-topic="deploying-to-a-sub-uri-zekba6" data-anchor="deploying_rails_to_sub_uri">3.2. Deploying to a sub URI</h3>
1606
1772
  <div class="paragraph"><p>Suppose that you already have a virtual host:</p></div>
1607
1773
  <div class="listingblock">
1608
1774
  <div class="content monospaced">
@@ -1626,7 +1792,7 @@ point to your Ruby on Rails application’s <em>public</em> folder. For example:
1626
1792
  </div>
1627
1793
  <div class="paragraph"><p>Next, add a <a href="#RailsBaseURI">RailsBaseURI</a> option to the virtual host configuration,
1628
1794
  and also make sure that:</p></div>
1629
- <div class="ulist"><ul>
1795
+ <div class="ulist"><ul>
1630
1796
  <li>
1631
1797
  <p>
1632
1798
  The Apache per-directory permissions allow access to this folder.
@@ -1657,21 +1823,21 @@ MultiViews is disabled for this folder.
1657
1823
  </div>
1658
1824
  <div class="paragraph"><p>Then restart Apache. The application has now been deployed.</p></div>
1659
1825
  <div class="admonitionblock">
1660
- <table><tr>
1826
+ <table><tr>
1661
1827
  <td class="icon">
1662
- <img src="./images/icons/note.png" alt="Note">
1828
+ <img src="./images/icons/note.png" alt="Note">
1663
1829
  </td>
1664
1830
  <td class="content">If you’re deploying to a sub-URI then please make sure that your view
1665
1831
  templates correctly handles references to sub-URI static assets! Otherwise
1666
1832
  you may find broken links to images, CSS files, JavaScripts, etc. Please read
1667
1833
  <a href="#sub_uri_deployment_uri_fix">How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</a>
1668
1834
  for more information.</td>
1669
- </tr></table>
1835
+ </tr></table>
1670
1836
  </div>
1671
1837
  <div class="admonitionblock">
1672
- <table><tr>
1838
+ <table><tr>
1673
1839
  <td class="icon">
1674
- <img src="./images/icons/tip.png" alt="Tip">
1840
+ <img src="./images/icons/tip.png" alt="Tip">
1675
1841
  </td>
1676
1842
  <td class="content">
1677
1843
  <div class="paragraph"><p>You can deploy multiple Rails applications under a virtual host, by specifying
@@ -1687,15 +1853,15 @@ for more information.</td>
1687
1853
  </div>
1688
1854
  </div>
1689
1855
  </td>
1690
- </tr></table>
1856
+ </tr></table>
1691
1857
  </div>
1692
1858
  </div>
1693
1859
  <div class="sect2">
1694
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_redeploying_restarting_the_ruby_on_rails_application" data-comment-topic="redeploying-restarting-the-ruby-on-rails-application--m5zqc6">3.3. Redeploying (restarting the Ruby on Rails application)</h3>
1860
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_redeploying_restarting_the_ruby_on_rails_application"></span><h3 data-comment-topic="redeploying-restarting-the-ruby-on-rails-application--m5zqc6" data-anchor="_redeploying_restarting_the_ruby_on_rails_application">3.3. Redeploying (restarting the Ruby on Rails application)</h3>
1695
1861
  <div class="paragraph"><p>Deploying a new version of a Ruby on Rails application is as simple as
1696
1862
  re-uploading the application files, and restarting the application.</p></div>
1697
1863
  <div class="paragraph"><p>There are two ways to restart the application:</p></div>
1698
- <div class="olist arabic"><ol class="arabic">
1864
+ <div class="olist arabic"><ol class="arabic">
1699
1865
  <li>
1700
1866
  <p>
1701
1867
  By restarting Apache.
@@ -1722,27 +1888,27 @@ of this file has changed in order to determine whether the application should
1722
1888
  be restarted.</p></div>
1723
1889
  </div>
1724
1890
  <div class="sect2">
1725
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_migrations" data-comment-topic="migrations-15238b4">3.4. Migrations</h3>
1891
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_migrations"></span><h3 data-comment-topic="migrations-15238b4" data-anchor="_migrations">3.4. Migrations</h3>
1726
1892
  <div class="paragraph"><p>Phusion Passenger is not related to Ruby on Rails migrations in any way. To
1727
1893
  run migrations on your deployment server, please login to your deployment
1728
1894
  server (e.g. with <em>ssh</em>) and type <span class="monospaced">rake db:migrate RAILS_ENV=production</span> in
1729
1895
  a shell console, just like one would normally run migrations.</p></div>
1730
1896
  </div>
1731
1897
  <div class="sect2">
1732
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_capistrano_integration" data-comment-topic="capistrano-integration-1o4cbyq">3.5. Capistrano integration</h3>
1898
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_capistrano_integration"></span><h3 data-comment-topic="capistrano-integration-1o4cbyq" data-anchor="_capistrano_integration">3.5. Capistrano integration</h3>
1733
1899
  <div class="paragraph"><p>See <a href="#capistrano">Capistrano recipe</a>.</p></div>
1734
1900
  </div>
1735
1901
  </div>
1736
1902
  </div>
1737
1903
  <div class="sect1">
1738
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_deploying_a_rack_based_ruby_application_including_rails_gt_3" data-comment-topic="deploying-a-rack-based-ruby-application-including-rails-3--hcs66f">4. Deploying a Rack-based Ruby application (including Rails &gt;= 3)</h2>
1904
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_a_rack_based_ruby_application_including_rails_gt_3"></span><h2 data-comment-topic="deploying-a-rack-based-ruby-application-including-rails-3--hcs66f" data-anchor="_deploying_a_rack_based_ruby_application_including_rails_gt_3">4. Deploying a Rack-based Ruby application (including Rails &gt;= 3)</h2>
1739
1905
  <div class="sectionbody">
1740
1906
  <div class="paragraph"><p>Phusion Passenger supports arbitrary Ruby web applications that follow the
1741
1907
  <a href="http://rack.rubyforge.org/">Rack</a> interface.</p></div>
1742
1908
  <div class="paragraph"><p>Phusion Passenger assumes that Rack application directories have a certain layout.
1743
1909
  Suppose that you have a Rack application in <em>/webapps/rackapp</em>. Then that
1744
1910
  folder must contain at least three entries:</p></div>
1745
- <div class="ulist"><ul>
1911
+ <div class="ulist"><ul>
1746
1912
  <li>
1747
1913
  <p>
1748
1914
  <em>config.ru</em>, a Rackup file for starting the Rack application. This file must contain
@@ -1778,17 +1944,17 @@ to the virtual host’s root (i.e. the application will be accessible from the r
1778
1944
  <em>http://www.rackapp.com/</em>), or in a sub URI (i.e. the application will be
1779
1945
  accessible from a sub URL, such as <em>http://www.rackapp.com/rackapp</em>).</p></div>
1780
1946
  <div class="admonitionblock">
1781
- <table><tr>
1947
+ <table><tr>
1782
1948
  <td class="icon">
1783
- <img src="./images/icons/note.png" alt="Note">
1949
+ <img src="./images/icons/note.png" alt="Note">
1784
1950
  </td>
1785
1951
  <td class="content">The default <span class="monospaced">RACK_ENV</span> environment in which deployed Rack applications
1786
1952
  are run, is “production”. You can change this by changing the
1787
1953
  <a href="#rack_env"><em>RackEnv</em></a> configuration option.</td>
1788
- </tr></table>
1954
+ </tr></table>
1789
1955
  </div>
1790
1956
  <div class="sect2">
1791
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_tutorial_example_writing_and_deploying_a_hello_world_rack_application" data-comment-topic="tutorial-example-writing-and-deploying-a-hello-world-rack-application-axp5z5">4.1. Tutorial/example: writing and deploying a Hello World Rack application</h3>
1957
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_tutorial_example_writing_and_deploying_a_hello_world_rack_application"></span><h3 data-comment-topic="tutorial-example-writing-and-deploying-a-hello-world-rack-application-axp5z5" data-anchor="_tutorial_example_writing_and_deploying_a_hello_world_rack_application">4.1. Tutorial/example: writing and deploying a Hello World Rack application</h3>
1792
1958
  <div class="paragraph"><p>First we create a Phusion Passenger-compliant Rack directory structure:</p></div>
1793
1959
  <div class="listingblock">
1794
1960
  <div class="content monospaced">
@@ -1828,10 +1994,10 @@ the Apache configuration file:</p></div>
1828
1994
  under the URL <em>http://www.rackexample.com/</em>.</p></div>
1829
1995
  </div>
1830
1996
  <div class="sect2">
1831
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_deploying_to_a_virtual_host_8217_s_root_2" data-comment-topic="deploying-to-a-virtual-host-s-root-ab4zj6">4.2. Deploying to a virtual host’s root</h3>
1997
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deploying_to_a_virtual_host_8217_s_root_2"></span><h3 data-comment-topic="deploying-to-a-virtual-host-s-root-ab4zj6" data-anchor="_deploying_to_a_virtual_host_8217_s_root_2">4.2. Deploying to a virtual host’s root</h3>
1832
1998
  <div class="paragraph"><p>Add a virtual host entry to your Apache configuration file. Make sure that the
1833
1999
  following conditions are met:</p></div>
1834
- <div class="ulist"><ul>
2000
+ <div class="ulist"><ul>
1835
2001
  <li>
1836
2002
  <p>
1837
2003
  The virtual host’s document root must point to your Rack application’s
@@ -1864,7 +2030,7 @@ MultiViews must be disabled for this folder.
1864
2030
  </div>
1865
2031
  <div class="paragraph"><p>You may also need to tweak your file/folder permissions. Make sure that the
1866
2032
  following folders are readable and executable by Apache:</p></div>
1867
- <div class="ulist"><ul>
2033
+ <div class="ulist"><ul>
1868
2034
  <li>
1869
2035
  <p>
1870
2036
  this <em>public</em> folder.
@@ -1884,7 +2050,7 @@ all parent folders. That is, /webapps/rackapp and /webapps must also be readable
1884
2050
  <div class="paragraph"><p>Then restart Apache. The application has now been deployed.</p></div>
1885
2051
  </div>
1886
2052
  <div class="sect2">
1887
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="deploying_rack_to_sub_uri" data-comment-topic="deploying-to-a-sub-uri-13rfygg">4.3. Deploying to a sub URI</h3>
2053
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="deploying_rack_to_sub_uri"></span><h3 data-comment-topic="deploying-to-a-sub-uri-13rfygg" data-anchor="deploying_rack_to_sub_uri">4.3. Deploying to a sub URI</h3>
1888
2054
  <div class="paragraph"><p>Suppose that you already have a virtual host:</p></div>
1889
2055
  <div class="listingblock">
1890
2056
  <div class="content monospaced">
@@ -1908,7 +2074,7 @@ point to your Rack application’s <em>public</em> folder. For example:</p></div
1908
2074
  </div>
1909
2075
  <div class="paragraph"><p>Next, add a <a href="#RackBaseURI">RackBaseURI</a> option to the virtual host configuration,
1910
2076
  and also make sure that:</p></div>
1911
- <div class="ulist"><ul>
2077
+ <div class="ulist"><ul>
1912
2078
  <li>
1913
2079
  <p>
1914
2080
  The Apache per-directory permissions allow access to this folder.
@@ -1939,9 +2105,9 @@ MultiViews is disabled for this folder.
1939
2105
  </div>
1940
2106
  <div class="paragraph"><p>Then restart Apache. The application has now been deployed.</p></div>
1941
2107
  <div class="admonitionblock">
1942
- <table><tr>
2108
+ <table><tr>
1943
2109
  <td class="icon">
1944
- <img src="./images/icons/tip.png" alt="Tip">
2110
+ <img src="./images/icons/tip.png" alt="Tip">
1945
2111
  </td>
1946
2112
  <td class="content">
1947
2113
  <div class="paragraph"><p>You can deploy multiple Rack applications under a virtual host, by specifying
@@ -1957,15 +2123,15 @@ MultiViews is disabled for this folder.
1957
2123
  </div>
1958
2124
  </div>
1959
2125
  </td>
1960
- </tr></table>
2126
+ </tr></table>
1961
2127
  </div>
1962
2128
  </div>
1963
2129
  <div class="sect2">
1964
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_redeploying_restarting_the_rack_application" data-comment-topic="redeploying-restarting-the-rack-application--18m41m1">4.4. Redeploying (restarting the Rack application)</h3>
2130
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_redeploying_restarting_the_rack_application"></span><h3 data-comment-topic="redeploying-restarting-the-rack-application--18m41m1" data-anchor="_redeploying_restarting_the_rack_application">4.4. Redeploying (restarting the Rack application)</h3>
1965
2131
  <div class="paragraph"><p>Deploying a new version of a Rack application is as simple as
1966
2132
  re-uploading the application files, and restarting the application.</p></div>
1967
2133
  <div class="paragraph"><p>There are two ways to restart the application:</p></div>
1968
- <div class="olist arabic"><ol class="arabic">
2134
+ <div class="olist arabic"><ol class="arabic">
1969
2135
  <li>
1970
2136
  <p>
1971
2137
  By restarting Apache.
@@ -1988,10 +2154,10 @@ command line:</p></div>
1988
2154
  </div>
1989
2155
  </div>
1990
2156
  <div class="sect2">
1991
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_rackup_specifications_for_various_web_frameworks" data-comment-topic="rackup-specifications-for-various-web-frameworks-ndsqc2">4.5. Rackup specifications for various web frameworks</h3>
2157
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_rackup_specifications_for_various_web_frameworks"></span><h3 data-comment-topic="rackup-specifications-for-various-web-frameworks-ndsqc2" data-anchor="_rackup_specifications_for_various_web_frameworks">4.5. Rackup specifications for various web frameworks</h3>
1992
2158
  <div class="paragraph"><p>This subsection shows example <em>config.ru</em> files for various web frameworks.</p></div>
1993
2159
  <div class="sect3">
1994
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_camping" data-comment-topic="camping-1kxexk0">4.5.1. Camping</h4>
2160
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_camping"></span><h4 data-comment-topic="camping-1kxexk0" data-anchor="_camping">4.5.1. Camping</h4>
1995
2161
  <div class="listingblock">
1996
2162
  <div class="content monospaced">
1997
2163
  <pre>require 'rubygems'
@@ -2010,7 +2176,7 @@ run Rack::Adapter::Camping.new(Blog)</pre>
2010
2176
  <div class="paragraph"><p>For Camping versions 2.0 and up, using <span class="monospaced">run Blog</span> as the final line will do.</p></div>
2011
2177
  </div>
2012
2178
  <div class="sect3">
2013
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_halcyon" data-comment-topic="halcyon-1ghnpmz">4.5.2. Halcyon</h4>
2179
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_halcyon"></span><h4 data-comment-topic="halcyon-1ghnpmz" data-anchor="_halcyon">4.5.2. Halcyon</h4>
2014
2180
  <div class="listingblock">
2015
2181
  <div class="content monospaced">
2016
2182
  <pre>require 'rubygems'
@@ -2022,7 +2188,7 @@ run Halcyon::Runner.new</pre>
2022
2188
  </div>
2023
2189
  </div>
2024
2190
  <div class="sect3">
2025
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_mack" data-comment-topic="mack-miht6b">4.5.3. Mack</h4>
2191
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_mack"></span><h4 data-comment-topic="mack-miht6b" data-anchor="_mack">4.5.3. Mack</h4>
2026
2192
  <div class="listingblock">
2027
2193
  <div class="content monospaced">
2028
2194
  <pre>ENV["MACK_ENV"] = ENV["RACK_ENV"]
@@ -2034,7 +2200,7 @@ run Mack::Utils::Server.build_app</pre>
2034
2200
  </div>
2035
2201
  </div>
2036
2202
  <div class="sect3">
2037
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_merb" data-comment-topic="merb-iyj7qy">4.5.4. Merb</h4>
2203
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_merb"></span><h4 data-comment-topic="merb-iyj7qy" data-anchor="_merb">4.5.4. Merb</h4>
2038
2204
  <div class="listingblock">
2039
2205
  <div class="content monospaced">
2040
2206
  <pre>require 'rubygems'
@@ -2053,7 +2219,7 @@ run Merb::Rack::Application.new</pre>
2053
2219
  </div>
2054
2220
  </div>
2055
2221
  <div class="sect3">
2056
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_ramaze" data-comment-topic="ramaze-boddtj">4.5.5. Ramaze</h4>
2222
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_ramaze"></span><h4 data-comment-topic="ramaze-boddtj" data-anchor="_ramaze">4.5.5. Ramaze</h4>
2057
2223
  <div class="listingblock">
2058
2224
  <div class="content monospaced">
2059
2225
  <pre>require "rubygems"
@@ -2066,7 +2232,7 @@ run Ramaze::Adapter::Base</pre>
2066
2232
  </div>
2067
2233
  </div>
2068
2234
  <div class="sect3">
2069
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_sinatra" data-comment-topic="sinatra-1hubto4">4.5.6. Sinatra</h4>
2235
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_sinatra"></span><h4 data-comment-topic="sinatra-1hubto4" data-anchor="_sinatra">4.5.6. Sinatra</h4>
2070
2236
  <div class="listingblock">
2071
2237
  <div class="content monospaced">
2072
2238
  <pre>require 'rubygems'
@@ -2081,14 +2247,14 @@ run Sinatra::Application</pre>
2081
2247
  </div>
2082
2248
  </div>
2083
2249
  <div class="sect1">
2084
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_configuring_phusion_passenger" data-comment-topic="configuring-phusion-passenger-11oztoe">5. Configuring Phusion Passenger</h2>
2250
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_configuring_phusion_passenger"></span><h2 data-comment-topic="configuring-phusion-passenger-11oztoe" data-anchor="_configuring_phusion_passenger">5. Configuring Phusion Passenger</h2>
2085
2251
  <div class="sectionbody">
2086
2252
  <div class="paragraph"><p>After installation, Phusion Passenger does not need any further configurations.
2087
2253
  Nevertheless, the system administrator may be interested in changing
2088
2254
  Phusion Passenger’s behavior. Phusion Passenger’s Apache module supports the
2089
2255
  following configuration options:</p></div>
2090
2256
  <div class="sect2">
2091
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_passengerroot_lt_directory_gt" data-comment-topic="passengerroot-directory--sere8l">5.1. PassengerRoot &lt;directory&gt;</h3>
2257
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerroot_lt_directory_gt"></span><h3 data-comment-topic="passengerroot-directory--sere8l" data-anchor="_passengerroot_lt_directory_gt">5.1. PassengerRoot &lt;directory&gt;</h3>
2092
2258
  <div class="paragraph"><p>The location to the Phusion Passenger root directory. This configuration option
2093
2259
  is essential to Phusion Passenger, and allows Phusion Passenger to locate its own
2094
2260
  data files. The correct value is given by the installer.</p></div>
@@ -2098,19 +2264,19 @@ this option as well. Please read
2098
2264
  <div class="paragraph"><p>This required option may only occur once, in the global server configuration.</p></div>
2099
2265
  </div>
2100
2266
  <div class="sect2">
2101
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerRuby" data-comment-topic="passengerruby-filename--1r3fv73">5.2. PassengerRuby &lt;filename&gt;</h3>
2267
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerRuby"></span><h3 data-comment-topic="passengerruby-filename--1r3fv73" data-anchor="PassengerRuby">5.2. PassengerRuby &lt;filename&gt;</h3>
2102
2268
  <div class="paragraph"><p>This option allows one to specify the Ruby interpreter to use.</p></div>
2103
2269
  <div class="paragraph"><p>This option may only occur once, in the global server configuration.
2104
2270
  The default is <em>ruby</em>.</p></div>
2105
2271
  </div>
2106
2272
  <div class="sect2">
2107
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerAppRoot" data-comment-topic="passengerapproot-path-to-root--uf24yd">5.3. PassengerAppRoot &lt;path/to/root&gt;</h3>
2273
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerAppRoot"></span><h3 data-comment-topic="passengerapproot-path-to-root--uf24yd" data-anchor="PassengerAppRoot">5.3. PassengerAppRoot &lt;path/to/root&gt;</h3>
2108
2274
  <div class="paragraph"><p>By default, Phusion Passenger assumes that the application’s root directory
2109
2275
  is the parent directory of the <em>public</em> directory. This option allows one to
2110
2276
  specify the application’s root independently from the DocumentRoot, which
2111
2277
  is useful if the <em>public</em> directory lives in a non-standard place.</p></div>
2112
2278
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
2113
- <div class="ulist"><ul>
2279
+ <div class="ulist"><ul>
2114
2280
  <li>
2115
2281
  <p>
2116
2282
  In the global server configuration.
@@ -2146,11 +2312,11 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
2146
2312
  </div>
2147
2313
  </div>
2148
2314
  <div class="sect2">
2149
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerSpawnMethod" data-comment-topic="passengerspawnmethod-string--sodg2y">5.4. PassengerSpawnMethod &lt;string&gt;</h3>
2315
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerSpawnMethod"></span><h3 data-comment-topic="passengerspawnmethod-string--sodg2y" data-anchor="PassengerSpawnMethod">5.4. PassengerSpawnMethod &lt;string&gt;</h3>
2150
2316
  <div class="admonitionblock">
2151
- <table><tr>
2317
+ <table><tr>
2152
2318
  <td class="icon">
2153
- <img src="./images/icons/tip.png" alt="Tip">
2319
+ <img src="./images/icons/tip.png" alt="Tip">
2154
2320
  </td>
2155
2321
  <td class="content">
2156
2322
  <div class="title">"What spawn method should I use?"</div>
@@ -2165,12 +2331,12 @@ understand it, as it’s mostly a technical detail. You can basically follow thi
2165
2331
  <div class="paragraph"><p>However, we do recommend you to try to understand it. The <em>smart</em> and <em>smart-lv2</em> spawn
2166
2332
  methods bring many benefits.</p></div>
2167
2333
  </td>
2168
- </tr></table>
2334
+ </tr></table>
2169
2335
  </div>
2170
2336
  <div class="paragraph"><p>Internally, Phusion Passenger spawns multiple Ruby application processes in order to handle
2171
2337
  requests. But there are multiple ways with which processes can be spawned, each having
2172
2338
  its own set of pros and cons. Supported spawn methods are:</p></div>
2173
- <div class="dlist"><dl>
2339
+ <div class="dlist"><dl>
2174
2340
  <dt class="hdlist1">
2175
2341
  <em>smart</em>
2176
2342
  </dt>
@@ -2228,7 +2394,7 @@ render <a href="#reducing_memory_usage">Ruby Enterprise Edition’s memory reduc
2228
2394
  </dd>
2229
2395
  </dl></div>
2230
2396
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
2231
- <div class="ulist"><ul>
2397
+ <div class="ulist"><ul>
2232
2398
  <li>
2233
2399
  <p>
2234
2400
  In the global server configuration.
@@ -2243,10 +2409,10 @@ In a virtual host configuration block.
2243
2409
  <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>smart-lv2</em>.</p></div>
2244
2410
  </div>
2245
2411
  <div class="sect2">
2246
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerUseGlobalQueue" data-comment-topic="passengeruseglobalqueue-on-off--1ki369">5.5. PassengerUseGlobalQueue &lt;on|off&gt;</h3>
2412
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerUseGlobalQueue"></span><h3 data-comment-topic="passengeruseglobalqueue-on-off--1ki369" data-anchor="PassengerUseGlobalQueue">5.5. PassengerUseGlobalQueue &lt;on|off&gt;</h3>
2247
2413
  <div class="paragraph"><p>Turns the use of global queuing on or off.</p></div>
2248
2414
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
2249
- <div class="ulist"><ul>
2415
+ <div class="ulist"><ul>
2250
2416
  <li>
2251
2417
  <p>
2252
2418
  In the global server configuration.
@@ -2285,7 +2451,7 @@ process.</p></div>
2285
2451
  long-running requests.</p>
2286
2452
  </div>
2287
2453
  <div class="paragraph"><p>For example suppose that:</p></div>
2288
- <div class="ulist"><ul>
2454
+ <div class="ulist"><ul>
2289
2455
  <li>
2290
2456
  <p>
2291
2457
  global queuing is turned off.
@@ -2340,7 +2506,7 @@ process that becomes available will take from the queue, and so this
2340
2506
  “queuing-behind-long-running-request” problem will never occur.</p></div>
2341
2507
  </div>
2342
2508
  <div class="sect2">
2343
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_passengerenabled_lt_on_off_gt" data-comment-topic="passengerenabled-on-off--74rzth">5.6. PassengerEnabled &lt;on|off&gt;</h3>
2509
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerenabled_lt_on_off_gt"></span><h3 data-comment-topic="passengerenabled-on-off--74rzth" data-anchor="_passengerenabled_lt_on_off_gt">5.6. PassengerEnabled &lt;on|off&gt;</h3>
2344
2510
  <div class="paragraph"><p>You can set this option to <em>off</em> to completely disable Phusion Passenger for
2345
2511
  a certain location. This is useful if, for example, you want to integrate a PHP
2346
2512
  application into the same virtual host as a Rails application.</p></div>
@@ -2362,7 +2528,7 @@ follows:</p></div>
2362
2528
  </div>
2363
2529
  <div class="paragraph"><p>This way, Phusion Passenger will not interfere with Wordpress.</p></div>
2364
2530
  <div class="paragraph"><p><em>PassengerEnabled</em> may occur in the following places:</p></div>
2365
- <div class="ulist"><ul>
2531
+ <div class="ulist"><ul>
2366
2532
  <li>
2367
2533
  <p>
2368
2534
  In the global server configuration.
@@ -2387,7 +2553,7 @@ In <em>.htaccess</em>.
2387
2553
  <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>on</em>.</p></div>
2388
2554
  </div>
2389
2555
  <div class="sect2">
2390
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerTempDir" data-comment-topic="passengertempdir-directory--68h2ng">5.7. PassengerTempDir &lt;directory&gt;</h3>
2556
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerTempDir"></span><h3 data-comment-topic="passengertempdir-directory--68h2ng" data-anchor="PassengerTempDir">5.7. PassengerTempDir &lt;directory&gt;</h3>
2391
2557
  <div class="paragraph"><p>Specifies the directory that Phusion Passenger should use for storing temporary
2392
2558
  files. This includes things such as Unix socket files, buffered file uploads
2393
2559
  (see also <a href="#PassengerUploadBufferDir">PassengerUploadBufferDir</a>), etc.</p></div>
@@ -2416,7 +2582,7 @@ sudo -E passenger-status
2416
2582
  </div>
2417
2583
  </div>
2418
2584
  <div class="sect2">
2419
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerUploadBufferDir" data-comment-topic="passengeruploadbufferdir-directory--kdr8at">5.8. PassengerUploadBufferDir &lt;directory&gt;</h3>
2585
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerUploadBufferDir"></span><h3 data-comment-topic="passengeruploadbufferdir-directory--kdr8at" data-anchor="PassengerUploadBufferDir">5.8. PassengerUploadBufferDir &lt;directory&gt;</h3>
2420
2586
  <div class="paragraph"><p>Phusion Passenger buffers large file uploads to disk in order prevent slow file
2421
2587
  uploads from blocking web applications. By default, a subdirectory in the
2422
2588
  system’s temporary files directory (or a subdirectory in the directory specified
@@ -2434,7 +2600,7 @@ Apache worker processes as different users. So if you’re using apace2-mpm-itk,
2434
2600
  you should set this option to a directory that is writable by all Apache worker
2435
2601
  processes, such as <em>/tmp</em>.</p></div>
2436
2602
  <div class="paragraph"><p>You may specify <em>PassengerUploadBufferDir</em> in the following places:</p></div>
2437
- <div class="ulist"><ul>
2603
+ <div class="ulist"><ul>
2438
2604
  <li>
2439
2605
  <p>
2440
2606
  In the global server configuration.
@@ -2459,7 +2625,7 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverrides Options</span>
2459
2625
  <div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
2460
2626
  </div>
2461
2627
  <div class="sect2">
2462
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_passengerrestartdir_lt_directory_gt" data-comment-topic="passengerrestartdir-directory--1fmhmv0">5.9. PassengerRestartDir &lt;directory&gt;</h3>
2628
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerrestartdir_lt_directory_gt"></span><h3 data-comment-topic="passengerrestartdir-directory--1fmhmv0" data-anchor="_passengerrestartdir_lt_directory_gt">5.9. PassengerRestartDir &lt;directory&gt;</h3>
2463
2629
  <div class="paragraph"><p>As described in the deployment chapters of this document, Phusion Passenger
2464
2630
  checks the file <em>tmp/restart.txt</em> in the applications'
2465
2631
  <a href="#application_root">root directory</a> for restarting applications. Sometimes it
@@ -2467,7 +2633,7 @@ may be desirable for Phusion Passenger to look in a different directory instead,
2467
2633
  for example for security reasons (see below). This option allows you to
2468
2634
  customize the directory in which <em>restart.txt</em> is searched for.</p></div>
2469
2635
  <div class="paragraph"><p>You may specify <em>PassengerRestartDir</em> in the following places:</p></div>
2470
- <div class="ulist"><ul>
2636
+ <div class="ulist"><ul>
2471
2637
  <li>
2472
2638
  <p>
2473
2639
  In the global server configuration.
@@ -2533,7 +2699,7 @@ allow the attacker to cause a Denial-of-Service.</p>
2533
2699
  directory that’s readable by Apache, but only writable by administrators.</p></div>
2534
2700
  </div>
2535
2701
  <div class="sect2">
2536
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerBufferResponse" data-comment-topic="passengerbufferresponse-on-off--1y7ilka">5.10. PassengerBufferResponse &lt;on|off&gt;</h3>
2702
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerBufferResponse"></span><h3 data-comment-topic="passengerbufferresponse-on-off--1y7ilka" data-anchor="PassengerBufferResponse">5.10. PassengerBufferResponse &lt;on|off&gt;</h3>
2537
2703
  <div class="paragraph"><p>When turned on, application-generated responses are buffered in memory. By buffering
2538
2704
  responses, protection is provided against slow HTTP clients that can not read your
2539
2705
  response immediately.</p></div>
@@ -2580,7 +2746,7 @@ after which it receives the entire response at once.
2580
2746
  When response buffering is turned off, it works as expected: the client
2581
2747
  receives an "entry X" message every second for 10 seconds.</p></div>
2582
2748
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
2583
- <div class="ulist"><ul>
2749
+ <div class="ulist"><ul>
2584
2750
  <li>
2585
2751
  <p>
2586
2752
  In the global server configuration.
@@ -2604,19 +2770,19 @@ In <em>.htaccess</em>.
2604
2770
  </ul></div>
2605
2771
  <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>on</em>.</p></div>
2606
2772
  <div class="admonitionblock">
2607
- <table><tr>
2773
+ <table><tr>
2608
2774
  <td class="icon">
2609
- <img src="./images/icons/note.png" alt="Note">
2775
+ <img src="./images/icons/note.png" alt="Note">
2610
2776
  </td>
2611
2777
  <td class="content">
2612
2778
  <div class="paragraph"><p>The <a href="#PassengerBufferResponse">PassengerBufferResponse</a> directive should be turned off
2613
2779
  if responses can be huge. Because entire responses are buffered in memory when turned on.</p></div>
2614
2780
  </td>
2615
- </tr></table>
2781
+ </tr></table>
2616
2782
  </div>
2617
2783
  </div>
2618
2784
  <div class="sect2">
2619
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="PassengerRollingRestarts" data-comment-topic="passengerrollingrestarts">5.11. PassengerRollingRestarts &lt;on|off&gt;</h3>
2785
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerRollingRestarts"></span><h3 data-comment-topic="passengerrollingrestarts" data-anchor="PassengerRollingRestarts">5.11. PassengerRollingRestarts &lt;on|off&gt;</h3>
2620
2786
  <div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
2621
2787
  <div class="paragraph"><p>Enables or disables support for rolling restarts. Normally when you
2622
2788
  restart an application (by touching restart.txt), Phusion Passenger would
@@ -2625,7 +2791,7 @@ of a new application process could take a while, and any requests that
2625
2791
  come in during this time will be blocked until this first application
2626
2792
  process has spawned.</p></div>
2627
2793
  <div class="paragraph"><p>But when rolling restarts are enabled, Phusion Passenger Enterprise will:</p></div>
2628
- <div class="olist arabic"><ol class="arabic">
2794
+ <div class="olist arabic"><ol class="arabic">
2629
2795
  <li>
2630
2796
  <p>
2631
2797
  Spawn a new process in the background.
@@ -2644,7 +2810,7 @@ Step 1 and 2 are repeated until all processes have been replaced.
2644
2810
  </ol></div>
2645
2811
  <div class="paragraph"><p>This way, visitors will not experience any delays when you are restarting your application. This allows you to, for example, upgrade your application often without degrading user experience.</p></div>
2646
2812
  <div class="paragraph"><p>Rolling restarts have a few caveat however that you should be aware of:</p></div>
2647
- <div class="ulist"><ul>
2813
+ <div class="ulist"><ul>
2648
2814
  <li>
2649
2815
  <p>
2650
2816
  Upgrading an application sometimes involves upgrading the database schema.
@@ -2664,7 +2830,7 @@ Because there’s no telling which process will serve a request, users may
2664
2830
  </li>
2665
2831
  </ul></div>
2666
2832
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
2667
- <div class="ulist"><ul>
2833
+ <div class="ulist"><ul>
2668
2834
  <li>
2669
2835
  <p>
2670
2836
  In the global server configuration.
@@ -2689,12 +2855,12 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
2689
2855
  <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
2690
2856
  </div>
2691
2857
  <div class="sect2">
2692
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_passengerresistdeploymenterrors_lt_on_off_gt" data-comment-topic="passengerresistdeploymenterrors">5.12. PassengerResistDeploymentErrors &lt;on|off&gt;</h3>
2858
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerresistdeploymenterrors_lt_on_off_gt"></span><h3 data-comment-topic="passengerresistdeploymenterrors" data-anchor="_passengerresistdeploymenterrors_lt_on_off_gt">5.12. PassengerResistDeploymentErrors &lt;on|off&gt;</h3>
2693
2859
  <div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
2694
2860
  <div class="paragraph"><p>Enables or disables resistance against deployment errors.</p></div>
2695
2861
  <div class="paragraph"><p>Suppose you’ve upgraded your application and you’ve issues a command to restart it (by touching restart.txt), but the application code contains an error that prevents Phusion Passenger from successfully spawning a process (e.g. a syntax error). Phusion Passenger would normally display an error message in response to this.</p></div>
2696
2862
  <div class="paragraph"><p>By enabling deployment error resistance, Phusion Passenger Enterprise would instead do this:</p></div>
2697
- <div class="ulist"><ul>
2863
+ <div class="ulist"><ul>
2698
2864
  <li>
2699
2865
  <p>
2700
2866
  It passes the request to one of the existing application processes (that belong to the previous version of the application). The visitor will not see a Phusion Passenger process spawning error message.
@@ -2714,7 +2880,7 @@ It sets an internal flag so that no processes for this application will be spawn
2714
2880
  <div class="paragraph"><p>This way, visitors will suffer minimally from deployment errors. Phusion Passenger will attempt to restart the application again next time restart.txt is touched.</p></div>
2715
2881
  <div class="paragraph"><p>Enabling deployment error resistance only works if <a href="#PassengerRollingRestarts">rolling restart</a> is also enabled.</p></div>
2716
2882
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
2717
- <div class="ulist"><ul>
2883
+ <div class="ulist"><ul>
2718
2884
  <li>
2719
2885
  <p>
2720
2886
  In the global server configuration.
@@ -2739,22 +2905,22 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
2739
2905
  <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>off</em>.</p></div>
2740
2906
  </div>
2741
2907
  <div class="sect2">
2742
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_security_options" data-comment-topic="security-options-1pb75ho">5.13. Security options</h3>
2908
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_security_options"></span><h3 data-comment-topic="security-options-1pb75ho" data-anchor="_security_options">5.13. Security options</h3>
2743
2909
  <div class="sect3">
2744
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerUserSwitching" data-comment-topic="passengeruserswitching">5.13.1. PassengerUserSwitching &lt;on|off&gt;</h4>
2910
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerUserSwitching"></span><h4 data-comment-topic="passengeruserswitching" data-anchor="PassengerUserSwitching">5.13.1. PassengerUserSwitching &lt;on|off&gt;</h4>
2745
2911
  <div class="paragraph"><p>Whether to enable <a href="#user_switching">user switching support</a>.</p></div>
2746
2912
  <div class="paragraph"><p>This option may only occur once, in the global server configuration.
2747
2913
  The default value is <em>on</em>.</p></div>
2748
2914
  </div>
2749
2915
  <div class="sect3">
2750
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengeruser_lt_username_gt" data-comment-topic="passengeruser">5.13.2. PassengerUser &lt;username&gt;</h4>
2916
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengeruser_lt_username_gt"></span><h4 data-comment-topic="passengeruser" data-anchor="_passengeruser_lt_username_gt">5.13.2. PassengerUser &lt;username&gt;</h4>
2751
2917
  <div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
2752
2918
  by default run the web application as the owner of the file <em>config/environment.rb</em>
2753
2919
  (for Rails apps) or <em>config.ru</em> (for Rack apps). This option allows you to override
2754
2920
  that behavior and explicitly set a user to run the web application as, regardless
2755
2921
  of the ownership of <em>environment.rb</em>/<em>config.ru</em>.</p></div>
2756
2922
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
2757
- <div class="ulist"><ul>
2923
+ <div class="ulist"><ul>
2758
2924
  <li>
2759
2925
  <p>
2760
2926
  In the global server configuration.
@@ -2774,7 +2940,7 @@ In a <span class="monospaced">&lt;Directory&gt;</span> or <span class="monospace
2774
2940
  <div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
2775
2941
  </div>
2776
2942
  <div class="sect3">
2777
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengergroup_lt_group_name_gt" data-comment-topic="passengergroup">5.13.3. PassengerGroup &lt;group name&gt;</h4>
2943
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengergroup_lt_group_name_gt"></span><h4 data-comment-topic="passengergroup" data-anchor="_passengergroup_lt_group_name_gt">5.13.3. PassengerGroup &lt;group name&gt;</h4>
2778
2944
  <div class="paragraph"><p>If <a href="#user_switching">user switching support</a> is enabled, then Phusion Passenger will
2779
2945
  by default run the web application as the primary group of the owner of the file
2780
2946
  <em>config/environment.rb</em> (for Rails apps) or <em>config.ru</em> (for Rack apps). This option
@@ -2783,7 +2949,7 @@ as, regardless of the ownership of <em>environment.rb</em>/<em>config.ru</em>.</
2783
2949
  <div class="paragraph"><p><em>&lt;group name&gt;</em> may also be set to the special value <em>!STARTUP_FILE!</em>, in which case
2784
2950
  the web application’s group will be set to <em>environment.rb</em>/<em>config.ru</em>'s group.</p></div>
2785
2951
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
2786
- <div class="ulist"><ul>
2952
+ <div class="ulist"><ul>
2787
2953
  <li>
2788
2954
  <p>
2789
2955
  In the global server configuration.
@@ -2803,7 +2969,7 @@ In a <span class="monospaced">&lt;Directory&gt;</span> or <span class="monospace
2803
2969
  <div class="paragraph"><p>In each place, it may be specified at most once.</p></div>
2804
2970
  </div>
2805
2971
  <div class="sect3">
2806
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerDefaultUser" data-comment-topic="passengerdefaultuser">5.13.4. PassengerDefaultUser &lt;username&gt;</h4>
2972
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerDefaultUser"></span><h4 data-comment-topic="passengerdefaultuser" data-anchor="PassengerDefaultUser">5.13.4. PassengerDefaultUser &lt;username&gt;</h4>
2807
2973
  <div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
2808
2974
  This configuration option allows one to specify the user that applications must
2809
2975
  run as, if user switching fails or is disabled.</p></div>
@@ -2811,7 +2977,7 @@ run as, if user switching fails or is disabled.</p></div>
2811
2977
  The default value is <em>nobody</em>.</p></div>
2812
2978
  </div>
2813
2979
  <div class="sect3">
2814
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerDefaultGroup" data-comment-topic="passengerdefaultgroup">5.13.5. PassengerDefaultGroup &lt;group name&gt;</h4>
2980
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerDefaultGroup"></span><h4 data-comment-topic="passengerdefaultgroup" data-anchor="PassengerDefaultGroup">5.13.5. PassengerDefaultGroup &lt;group name&gt;</h4>
2815
2981
  <div class="paragraph"><p>Phusion Passenger enables <a href="#user_switching">user switching support</a> by default.
2816
2982
  This configuration option allows one to specify the group that applications must
2817
2983
  run as, if user switching fails or is disabled.</p></div>
@@ -2820,7 +2986,7 @@ The default value is the primary group of the user specifified by
2820
2986
  <a href="#PassengerDefaultUser">PassengerDefaultUser</a>.</p></div>
2821
2987
  </div>
2822
2988
  <div class="sect3">
2823
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengerfriendlyerrorpages_lt_on_off_gt" data-comment-topic="passengerfriendlyerrorpages">5.13.6. PassengerFriendlyErrorPages &lt;on|off&gt;</h4>
2989
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerfriendlyerrorpages_lt_on_off_gt"></span><h4 data-comment-topic="passengerfriendlyerrorpages" data-anchor="_passengerfriendlyerrorpages_lt_on_off_gt">5.13.6. PassengerFriendlyErrorPages &lt;on|off&gt;</h4>
2824
2990
  <div class="paragraph"><p>Phusion Passenger can display friendly error pages whenever an application fails
2825
2991
  to start. This friendly error page presents the startup error message, some
2826
2992
  suggestions for solving the problem, and a backtrace. This feature is very useful
@@ -2829,7 +2995,7 @@ but the page might reveal potentially sensitive information, depending on the
2829
2995
  application. Experienced system administrators who are using Phusion Passenger
2830
2996
  on serious production servers should consider turning this feature off.</p></div>
2831
2997
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
2832
- <div class="ulist"><ul>
2998
+ <div class="ulist"><ul>
2833
2999
  <li>
2834
3000
  <p>
2835
3001
  In the global server configuration.
@@ -2855,9 +3021,9 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
2855
3021
  </div>
2856
3022
  </div>
2857
3023
  <div class="sect2">
2858
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_resource_control_and_optimization_options" data-comment-topic="resource-control-and-optimization-options-zu2f7u">5.14. Resource control and optimization options</h3>
3024
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_resource_control_and_optimization_options"></span><h3 data-comment-topic="resource-control-and-optimization-options-zu2f7u" data-anchor="_resource_control_and_optimization_options">5.14. Resource control and optimization options</h3>
2859
3025
  <div class="sect3">
2860
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengermaxpoolsize_lt_integer_gt" data-comment-topic="passengermaxpoolsize-integer--am64q8">5.14.1. PassengerMaxPoolSize &lt;integer&gt;</h4>
3026
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengermaxpoolsize_lt_integer_gt"></span><h4 data-comment-topic="passengermaxpoolsize-integer--am64q8" data-anchor="_passengermaxpoolsize_lt_integer_gt">5.14.1. PassengerMaxPoolSize &lt;integer&gt;</h4>
2861
3027
  <div class="paragraph"><p>The maximum number of <a href="#application_process">application processes</a> that may
2862
3028
  simultaneously exist. A larger number results in higher memory usage,
2863
3029
  but improved ability to handle concurrent HTTP clients.</p></div>
@@ -2874,24 +3040,24 @@ hardware or getting more servers.)</p></div>
2874
3040
  <div class="paragraph"><p>This option may only occur once, in the global server configuration.
2875
3041
  The default value is <em>6</em>.</p></div>
2876
3042
  <div class="admonitionblock">
2877
- <table><tr>
3043
+ <table><tr>
2878
3044
  <td class="icon">
2879
- <img src="./images/icons/tip.png" alt="Tip">
3045
+ <img src="./images/icons/tip.png" alt="Tip">
2880
3046
  </td>
2881
3047
  <td class="content">We strongly recommend you to <a href="#reducing_memory_usage">use Ruby Enterprise Edition</a>. This allows you to reduce the memory usage of your Ruby on Rails applications
2882
3048
  by about 33%, and it’s not hard to install.</td>
2883
- </tr></table>
3049
+ </tr></table>
2884
3050
  </div>
2885
3051
  </div>
2886
3052
  <div class="sect3">
2887
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMinInstances" data-comment-topic="passengermininstances-integer--wegq6b">5.14.2. PassengerMinInstances &lt;integer&gt;</h4>
3053
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMinInstances"></span><h4 data-comment-topic="passengermininstances-integer--wegq6b" data-anchor="PassengerMinInstances">5.14.2. PassengerMinInstances &lt;integer&gt;</h4>
2888
3054
  <div class="paragraph"><p>This specifies the minimum number of application processes that should exist for a
2889
3055
  given application. You should set this option to a
2890
3056
  non-zero value if you want to avoid potentially long startup times after a website
2891
3057
  has been <a href="#idle_process">idle</a> for an extended period.</p></div>
2892
3058
  <div class="paragraph"><p>Please note that this option does <strong>not</strong> pre-start application processes during Apache
2893
3059
  startup. It just makes sure that when the application is first accessed:</p></div>
2894
- <div class="olist arabic"><ol class="arabic">
3060
+ <div class="olist arabic"><ol class="arabic">
2895
3061
  <li>
2896
3062
  <p>
2897
3063
  at least the given number of processes will be spawned.
@@ -2930,7 +3096,7 @@ simultanously. Phusion Passenger will start 12 more application processes. After
2930
3096
  timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application
2931
3097
  processes, keeping 3 processes around.</p></div>
2932
3098
  <div class="paragraph"><p>The PassengerMinInstances option may occur in the following places:</p></div>
2933
- <div class="ulist"><ul>
3099
+ <div class="ulist"><ul>
2934
3100
  <li>
2935
3101
  <p>
2936
3102
  In the global server configuration.
@@ -2955,7 +3121,7 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Limits</span> i
2955
3121
  <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1</em>.</p></div>
2956
3122
  </div>
2957
3123
  <div class="sect3">
2958
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengermaxinstances_lt_integer_gt" data-comment-topic="passengermaxinstances">5.14.3. PassengerMaxInstances &lt;integer&gt;</h4>
3124
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengermaxinstances_lt_integer_gt"></span><h4 data-comment-topic="passengermaxinstances" data-anchor="_passengermaxinstances_lt_integer_gt">5.14.3. PassengerMaxInstances &lt;integer&gt;</h4>
2959
3125
  <div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
2960
3126
  <div class="paragraph"><p>The maximum number of application processes that may simultaneously exist
2961
3127
  for an application. This helps to make sure that a single application
@@ -2965,7 +3131,7 @@ means that there is no limit placed on the number of processes a single applicat
2965
3131
  may spawn, i.e. only the global limit of <a href="#PassengerMaxPoolSize">PassengerMaxPoolSize</a>
2966
3132
  will be enforced.</p></div>
2967
3133
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
2968
- <div class="ulist"><ul>
3134
+ <div class="ulist"><ul>
2969
3135
  <li>
2970
3136
  <p>
2971
3137
  In the global server configuration.
@@ -2979,9 +3145,9 @@ In a virtual host configuration block.
2979
3145
  </ul></div>
2980
3146
  <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
2981
3147
  <div class="admonitionblock">
2982
- <table><tr>
3148
+ <table><tr>
2983
3149
  <td class="icon">
2984
- <img src="./images/icons/tip.png" alt="Tip">
3150
+ <img src="./images/icons/tip.png" alt="Tip">
2985
3151
  </td>
2986
3152
  <td class="content">
2987
3153
  <div class="title">Practical usage example</div>
@@ -2992,11 +3158,11 @@ to 10. The e-commerce website is more important to you. You can then set
2992
3158
  than 3 processes, even if it suddenly gets a lot of traffic. Your e-commerce website
2993
3159
  on the other hand will be free to spawn up to 10 processes if it gets a lot of traffic.</p></div>
2994
3160
  </td>
2995
- </tr></table>
3161
+ </tr></table>
2996
3162
  </div>
2997
3163
  </div>
2998
3164
  <div class="sect3">
2999
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengermaxinstancesperapp_lt_integer_gt" data-comment-topic="passengermaxinstancesperapp">5.14.4. PassengerMaxInstancesPerApp &lt;integer&gt;</h4>
3165
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengermaxinstancesperapp_lt_integer_gt"></span><h4 data-comment-topic="passengermaxinstancesperapp" data-anchor="_passengermaxinstancesperapp_lt_integer_gt">5.14.4. PassengerMaxInstancesPerApp &lt;integer&gt;</h4>
3000
3166
  <div class="paragraph"><p>The maximum number of application processes that may simultaneously exist
3001
3167
  for a single application. This helps to make sure that a single application
3002
3168
  will not occupy all available slots in the application pool.</p></div>
@@ -3007,9 +3173,9 @@ will be enforced.</p></div>
3007
3173
  <div class="paragraph"><p>This option may only occur once, in the global server configuration.
3008
3174
  The default value is <em>0</em>.</p></div>
3009
3175
  <div class="admonitionblock">
3010
- <table><tr>
3176
+ <table><tr>
3011
3177
  <td class="icon">
3012
- <img src="./images/icons/tip.png" alt="Tip">
3178
+ <img src="./images/icons/tip.png" alt="Tip">
3013
3179
  </td>
3014
3180
  <td class="content">
3015
3181
  <div class="title">Practical usage example</div>
@@ -3023,12 +3189,12 @@ settled down and it has released more pool slots.</p></div>
3023
3189
  <em>PassengerMaxInstancesPerApp</em> to 5. This way, both blogs will never use more
3024
3190
  than 5 pool slots.</p></div>
3025
3191
  </td>
3026
- </tr></table>
3192
+ </tr></table>
3027
3193
  </div>
3028
3194
  <div class="admonitionblock">
3029
- <table><tr>
3195
+ <table><tr>
3030
3196
  <td class="icon">
3031
- <img src="./images/icons/note.png" alt="Note">
3197
+ <img src="./images/icons/note.png" alt="Note">
3032
3198
  </td>
3033
3199
  <td class="content">
3034
3200
  <div class="title">Relation with PassengerMaxInstances</div>
@@ -3045,11 +3211,11 @@ on the other hand will be free to use up all 10 slots if it gets a lot of traffi
3045
3211
  different web applications, while <em>PassengerMaxInstances</em> allows one to divide
3046
3212
  the pool unequally, according to each web application’s relative importance.</p></div>
3047
3213
  </td>
3048
- </tr></table>
3214
+ </tr></table>
3049
3215
  </div>
3050
3216
  </div>
3051
3217
  <div class="sect3">
3052
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerPoolIdleTime" data-comment-topic="passengerpoolidletime-integer--a3gunq">5.14.5. PassengerPoolIdleTime &lt;integer&gt;</h4>
3218
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerPoolIdleTime"></span><h4 data-comment-topic="passengerpoolidletime-integer--a3gunq" data-anchor="PassengerPoolIdleTime">5.14.5. PassengerPoolIdleTime &lt;integer&gt;</h4>
3053
3219
  <div class="paragraph"><p>The maximum number of seconds that an application process may be idle. That is,
3054
3220
  if an application process hasn’t received any traffic after the given number of
3055
3221
  seconds, then it will be shutdown in order to conserve memory.</p></div>
@@ -3071,7 +3237,7 @@ applications, each which must be available at all times.</p></div>
3071
3237
  The default value is <em>300</em>.</p></div>
3072
3238
  </div>
3073
3239
  <div class="sect3">
3074
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMaxRequests" data-comment-topic="passengermaxrequests">5.14.6. PassengerMaxRequests &lt;integer&gt;</h4>
3240
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMaxRequests"></span><h4 data-comment-topic="passengermaxrequests" data-anchor="PassengerMaxRequests">5.14.6. PassengerMaxRequests &lt;integer&gt;</h4>
3075
3241
  <div class="paragraph"><p>The maximum number of requests an application process will process. After
3076
3242
  serving that many requests, the application process will be shut down and
3077
3243
  Phusion Passenger will restart it. A value of 0 means that there is no maximum:
@@ -3081,7 +3247,7 @@ reached.</p></div>
3081
3247
  it down after a certain number of requests, all of its memory is guaranteed
3082
3248
  to be freed by the operating system.</p></div>
3083
3249
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
3084
- <div class="ulist"><ul>
3250
+ <div class="ulist"><ul>
3085
3251
  <li>
3086
3252
  <p>
3087
3253
  In the global server configuration.
@@ -3105,9 +3271,9 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Limits</span> i
3105
3271
  </ul></div>
3106
3272
  <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
3107
3273
  <div class="admonitionblock">
3108
- <table><tr>
3274
+ <table><tr>
3109
3275
  <td class="icon">
3110
- <img src="./images/icons/caution.png" alt="Caution">
3276
+ <img src="./images/icons/caution.png" alt="Caution">
3111
3277
  </td>
3112
3278
  <td class="content">
3113
3279
  <div class="paragraph"><p>The <a href="#PassengerMaxRequests">PassengerMaxRequests</a> directive should be considered
@@ -3115,11 +3281,11 @@ as a workaround for misbehaving applications. It is advised that you fix the
3115
3281
  problem in your application rather than relying on these directives as a
3116
3282
  measure to avoid memory leaks.</p></div>
3117
3283
  </td>
3118
- </tr></table>
3284
+ </tr></table>
3119
3285
  </div>
3120
3286
  </div>
3121
3287
  <div class="sect3">
3122
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMaxRequestTime" data-comment-topic="passengermaxrequesttime-seconds--7qnz3x">5.14.7. PassengerMaxRequestTime &lt;seconds&gt;</h4>
3288
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMaxRequestTime"></span><h4 data-comment-topic="passengermaxrequesttime-seconds--7qnz3x" data-anchor="PassengerMaxRequestTime">5.14.7. PassengerMaxRequestTime &lt;seconds&gt;</h4>
3123
3289
  <div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
3124
3290
  <div class="paragraph"><p>The maximum amount of time, in seconds, that an application process may take
3125
3291
  to process a request. If the request takes longer than this amount of time,
@@ -3128,7 +3294,7 @@ restarted upon the next request. A value of 0 means that there is no time limit.
3128
3294
  <div class="paragraph"><p>This option is useful for preventing your application from freezing for an
3129
3295
  indefinite period of time.</p></div>
3130
3296
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
3131
- <div class="ulist"><ul>
3297
+ <div class="ulist"><ul>
3132
3298
  <li>
3133
3299
  <p>
3134
3300
  In the global server configuration.
@@ -3174,9 +3340,9 @@ to 10 seconds. You can then configure Phusion Passenger as follows:</p>
3174
3340
  or if a request to any other URI takes more than 2 seconds,
3175
3341
  then the corresponding application process will be forced to shutdown.</p></div>
3176
3342
  <div class="admonitionblock">
3177
- <table><tr>
3343
+ <table><tr>
3178
3344
  <td class="icon">
3179
- <img src="./images/icons/caution.png" alt="Caution">
3345
+ <img src="./images/icons/caution.png" alt="Caution">
3180
3346
  </td>
3181
3347
  <td class="content">
3182
3348
  <div class="paragraph"><p>The <a href="#PassengerMaxRequestTime">PassengerMaxRequestTime</a> directive should be
@@ -3184,11 +3350,11 @@ considered as a workaround for misbehaving applications. It is advised that you
3184
3350
  fix the problem in your application rather than relying on these directives as a
3185
3351
  measure to avoid freezing applications.</p></div>
3186
3352
  </td>
3187
- </tr></table>
3353
+ </tr></table>
3188
3354
  </div>
3189
3355
  </div>
3190
3356
  <div class="sect3">
3191
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerMemoryLimit" data-comment-topic="passengermemorylimit">5.14.8. PassengerMemoryLimit &lt;integer&gt;</h4>
3357
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerMemoryLimit"></span><h4 data-comment-topic="passengermemorylimit" data-anchor="PassengerMemoryLimit">5.14.8. PassengerMemoryLimit &lt;integer&gt;</h4>
3192
3358
  <div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
3193
3359
  <div class="paragraph"><p>The maximum amount of memory that an application process may use, in megabytes.
3194
3360
  Once an application process has surpassed its memory limit, it will process
@@ -3198,7 +3364,7 @@ will not be checked.</p></div>
3198
3364
  <div class="paragraph"><p>This option is useful if your application is leaking memory. By shutting
3199
3365
  it down, all of its memory is guaranteed to be freed by the operating system.</p></div>
3200
3366
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
3201
- <div class="ulist"><ul>
3367
+ <div class="ulist"><ul>
3202
3368
  <li>
3203
3369
  <p>
3204
3370
  In the global server configuration.
@@ -3222,9 +3388,9 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Limits</span> i
3222
3388
  </ul></div>
3223
3389
  <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>200</em>.</p></div>
3224
3390
  <div class="admonitionblock">
3225
- <table><tr>
3391
+ <table><tr>
3226
3392
  <td class="icon">
3227
- <img src="./images/icons/note.png" alt="Note">
3393
+ <img src="./images/icons/note.png" alt="Note">
3228
3394
  </td>
3229
3395
  <td class="content">
3230
3396
  <div class="title">A word about permissions</div>
@@ -3237,12 +3403,12 @@ tight permissions on <span class="monospaced">/proc</span>, this directive may n
3237
3403
  this directive and your <span class="monospaced">/proc</span> permissions are too tight, then please consider
3238
3404
  untightening the permissions.</p></div>
3239
3405
  </td>
3240
- </tr></table>
3406
+ </tr></table>
3241
3407
  </div>
3242
3408
  <div class="admonitionblock">
3243
- <table><tr>
3409
+ <table><tr>
3244
3410
  <td class="icon">
3245
- <img src="./images/icons/tip.png" alt="Tip">
3411
+ <img src="./images/icons/tip.png" alt="Tip">
3246
3412
  </td>
3247
3413
  <td class="content">
3248
3414
  <div class="title">FreeBSD and <span class="monospaced">/proc</span>
@@ -3256,12 +3422,12 @@ which is very fast. If you mount <span class="monospaced">/proc</span> with a di
3256
3422
  Phusion Passenger must resort to querying memory information from the <span class="monospaced">ps</span> command,
3257
3423
  which is a lot slower.</p></div>
3258
3424
  </td>
3259
- </tr></table>
3425
+ </tr></table>
3260
3426
  </div>
3261
3427
  <div class="admonitionblock">
3262
- <table><tr>
3428
+ <table><tr>
3263
3429
  <td class="icon">
3264
- <img src="./images/icons/caution.png" alt="Caution">
3430
+ <img src="./images/icons/caution.png" alt="Caution">
3265
3431
  </td>
3266
3432
  <td class="content">
3267
3433
  <div class="paragraph"><p>The <a href="#PassengerMaxRequests">PassengerMaxRequests</a> and
@@ -3270,14 +3436,14 @@ as workarounds for misbehaving applications. It is advised that you fix the
3270
3436
  problem in your application rather than relying on these directives as a
3271
3437
  measure to avoid memory leaks.</p></div>
3272
3438
  </td>
3273
- </tr></table>
3439
+ </tr></table>
3274
3440
  </div>
3275
3441
  </div>
3276
3442
  <div class="sect3">
3277
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengerstatthrottlerate_lt_integer_gt" data-comment-topic="passengerstatthrottlerate">5.14.9. PassengerStatThrottleRate &lt;integer&gt;</h4>
3443
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerstatthrottlerate_lt_integer_gt"></span><h4 data-comment-topic="passengerstatthrottlerate" data-anchor="_passengerstatthrottlerate_lt_integer_gt">5.14.9. PassengerStatThrottleRate &lt;integer&gt;</h4>
3278
3444
  <div class="paragraph"><p>By default, Phusion Passenger performs several filesystem checks (or, in
3279
3445
  programmers jargon, <em>stat() calls</em>) each time a request is processed:</p></div>
3280
- <div class="ulist"><ul>
3446
+ <div class="ulist"><ul>
3281
3447
  <li>
3282
3448
  <p>
3283
3449
  It checks whether <em>config/environment.rb</em>, <em>config.ru</em> or <em>passenger_wsgi.py</em>
@@ -3301,7 +3467,7 @@ seconds. Setting it to a value of <em>0</em> means that no throttling will take
3301
3467
  or in other words, that the above list of filesystem checks will be performed on
3302
3468
  every request.</p></div>
3303
3469
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
3304
- <div class="ulist"><ul>
3470
+ <div class="ulist"><ul>
3305
3471
  <li>
3306
3472
  <p>
3307
3473
  In the global server configuration.
@@ -3326,21 +3492,21 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Limits</span> i
3326
3492
  <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>0</em>.</p></div>
3327
3493
  </div>
3328
3494
  <div class="sect3">
3329
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerPreStart" data-comment-topic="passengerprestart-url--1dvgku9">5.14.10. PassengerPreStart &lt;url&gt;</h4>
3495
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerPreStart"></span><h4 data-comment-topic="passengerprestart-url--1dvgku9" data-anchor="PassengerPreStart">5.14.10. PassengerPreStart &lt;url&gt;</h4>
3330
3496
  <div class="paragraph"><p>By default, Phusion Passenger does not start any application processes until said
3331
3497
  web application is first accessed. The result is that the first visitor of said
3332
3498
  web application might experience a small delay as Phusion Passenger is starting
3333
3499
  the web application on demand. If that is undesirable, then this directive can be
3334
3500
  used to pre-started application processes during Apache startup.</p></div>
3335
3501
  <div class="paragraph"><p>A few things to be careful of:</p></div>
3336
- <div class="ulist"><ul>
3502
+ <div class="ulist"><ul>
3337
3503
  <li>
3338
3504
  <p>
3339
3505
  This directive accepts the <strong>URL</strong> of the web application you want to pre-start,
3340
3506
  not a on/off value! This might seem a bit weird, but read on for rationale. As
3341
3507
  for the specifics of the URL:
3342
3508
  </p>
3343
- <div class="ulist"><ul>
3509
+ <div class="ulist"><ul>
3344
3510
  <li>
3345
3511
  <p>
3346
3512
  The domain part of the URL must be equal to the value of the <em>ServerName</em>
@@ -3371,7 +3537,7 @@ You will probably want to combine this option with
3371
3537
  </li>
3372
3538
  </ul></div>
3373
3539
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
3374
- <div class="ulist"><ul>
3540
+ <div class="ulist"><ul>
3375
3541
  <li>
3376
3542
  <p>
3377
3543
  In the global server configuration.
@@ -3489,7 +3655,7 @@ PassengerPreStart http://bar.com:3500/</pre>
3489
3655
  <div class="paragraph"><p>A directive that accepts a simple on/off flag is definitely more intuitive,
3490
3656
  but due technical difficulties w.r.t. the way Apache works, it’s very hard
3491
3657
  to implement it like that:</p></div>
3492
- <div class="ulist"><ul>
3658
+ <div class="ulist"><ul>
3493
3659
  <li>
3494
3660
  <p>
3495
3661
  It is very hard to obtain a full list of web applications defined in the
@@ -3564,7 +3730,7 @@ the request ending up at a different web server in the cluster.</p></div>
3564
3730
  </div>
3565
3731
  </div>
3566
3732
  <div class="sect3">
3567
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerHighPerformance" data-comment-topic="passengerhighperformance-on-off--zgc547">5.14.11. PassengerHighPerformance &lt;on|off&gt;</h4>
3733
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerHighPerformance"></span><h4 data-comment-topic="passengerhighperformance-on-off--zgc547" data-anchor="PassengerHighPerformance">5.14.11. PassengerHighPerformance &lt;on|off&gt;</h4>
3568
3734
  <div class="paragraph"><p>By default, Phusion Passenger is compatible with mod_rewrite and most other
3569
3735
  Apache modules. However, a lot of effort is required in order to be compatible.
3570
3736
  If you turn <em>PassengerHighPerformance</em> to <em>on</em>, then Phusion Passenger will be
@@ -3577,7 +3743,7 @@ performance mode via testing.</p></div>
3577
3743
  <div class="paragraph"><p>This option is <strong>not</strong> an all-or-nothing global option: you can enable high
3578
3744
  performance mode for certain virtual hosts or certain URLs only.
3579
3745
  The <em>PassengerHighPerformance</em> option may occur in the following places:</p></div>
3580
- <div class="ulist"><ul>
3746
+ <div class="ulist"><ul>
3581
3747
  <li>
3582
3748
  <p>
3583
3749
  In the global server configuration.
@@ -3648,13 +3814,13 @@ then you can enable high performance mode for a certain URL only. For example:</
3648
3814
  </div>
3649
3815
  </div>
3650
3816
  <div class="sect2">
3651
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_compatibility_options" data-comment-topic="compatibility-options-8jve5a">5.15. Compatibility options</h3>
3817
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_compatibility_options"></span><h3 data-comment-topic="compatibility-options-8jve5a" data-anchor="_compatibility_options">5.15. Compatibility options</h3>
3652
3818
  <div class="sect3">
3653
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="PassengerResolveSymlinksInDocumentRoot" data-comment-topic="passengerresolvesymlinksindocumentroot-on-off--1r0qcp8">5.15.1. PassengerResolveSymlinksInDocumentRoot &lt;on|off&gt;</h4>
3819
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="PassengerResolveSymlinksInDocumentRoot"></span><h4 data-comment-topic="passengerresolvesymlinksindocumentroot-on-off--1r0qcp8" data-anchor="PassengerResolveSymlinksInDocumentRoot">5.15.1. PassengerResolveSymlinksInDocumentRoot &lt;on|off&gt;</h4>
3654
3820
  <div class="paragraph"><p>Configures whether Phusion Passenger should resolve symlinks in the document root.
3655
3821
  Please refer to <a href="#application_detection">How Phusion Passenger detects whether a virtual host is a web application</a> for more information.</p></div>
3656
3822
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
3657
- <div class="ulist"><ul>
3823
+ <div class="ulist"><ul>
3658
3824
  <li>
3659
3825
  <p>
3660
3826
  In the global server configuration.
@@ -3679,7 +3845,7 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
3679
3845
  <div class="paragraph"><p>In each place, it may be specified at most once. It is off by default.</p></div>
3680
3846
  </div>
3681
3847
  <div class="sect3">
3682
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengerallowencodedslashes_lt_on_off_gt" data-comment-topic="passengerallowencodedslashes-on-off--1y3s1ww">5.15.2. PassengerAllowEncodedSlashes &lt;on|off&gt;</h4>
3848
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerallowencodedslashes_lt_on_off_gt"></span><h4 data-comment-topic="passengerallowencodedslashes-on-off--1y3s1ww" data-anchor="_passengerallowencodedslashes_lt_on_off_gt">5.15.2. PassengerAllowEncodedSlashes &lt;on|off&gt;</h4>
3683
3849
  <div class="paragraph"><p>By default, Apache doesn’t support URLs with encoded slashes (%2f), e.g. URLs like
3684
3850
  this: <span class="monospaced">/users/fujikura%2fyuu</span>. If you access such an URL then Apache will return a
3685
3851
  404 Not Found error. This can be solved by turning on PassengerAllowEncodedSlashes
@@ -3688,7 +3854,7 @@ as well as Apache’s
3688
3854
  <div class="paragraph"><p>Is it important that you turn on both AllowEncodedSlashes <strong>and</strong> PassengerAllowEncodedSlashes,
3689
3855
  otherwise this feature will not work properly.</p></div>
3690
3856
  <div class="paragraph"><p>PassengerAllowEncodedSlashes may occur in the following places:</p></div>
3691
- <div class="ulist"><ul>
3857
+ <div class="ulist"><ul>
3692
3858
  <li>
3693
3859
  <p>
3694
3860
  In the global server configuration.
@@ -3748,14 +3914,14 @@ displaying maintenance.html will work fine even for URLs starting with "/users".
3748
3914
  </div>
3749
3915
  </div>
3750
3916
  <div class="sect2">
3751
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_logging_and_debugging_options" data-comment-topic="logging-and-debugging-options-el2cuc">5.16. Logging and debugging options</h3>
3917
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_logging_and_debugging_options"></span><h3 data-comment-topic="logging-and-debugging-options-el2cuc" data-anchor="_logging_and_debugging_options">5.16. Logging and debugging options</h3>
3752
3918
  <div class="sect3">
3753
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengerloglevel_lt_integer_gt" data-comment-topic="passengerloglevel-integer--1v67p8l">5.16.1. PassengerLogLevel &lt;integer&gt;</h4>
3919
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerloglevel_lt_integer_gt"></span><h4 data-comment-topic="passengerloglevel-integer--1v67p8l" data-anchor="_passengerloglevel_lt_integer_gt">5.16.1. PassengerLogLevel &lt;integer&gt;</h4>
3754
3920
  <div class="paragraph"><p>This option allows one to specify how much information Phusion Passenger should
3755
3921
  write to the Apache error log file. A higher log level value means that more
3756
3922
  information will be logged.</p></div>
3757
3923
  <div class="paragraph"><p>Possible values are:</p></div>
3758
- <div class="ulist"><ul>
3924
+ <div class="ulist"><ul>
3759
3925
  <li>
3760
3926
  <p>
3761
3927
  <em>0</em>: Show only errors and warnings.
@@ -3783,14 +3949,14 @@ information will be logged.</p></div>
3783
3949
  The default is <em>0</em>.</p></div>
3784
3950
  </div>
3785
3951
  <div class="sect3">
3786
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengerdebuglogfile_lt_filename_gt" data-comment-topic="passengerdebuglogfile-filename--1tfy4z9">5.16.2. PassengerDebugLogFile &lt;filename&gt;</h4>
3952
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerdebuglogfile_lt_filename_gt"></span><h4 data-comment-topic="passengerdebuglogfile-filename--1tfy4z9" data-anchor="_passengerdebuglogfile_lt_filename_gt">5.16.2. PassengerDebugLogFile &lt;filename&gt;</h4>
3787
3953
  <div class="paragraph"><p>By default Phusion Passenger debugging and error messages are written to the global
3788
3954
  web server error log. This option allows one to specify the file that debugging and
3789
3955
  error messages should be written to instead.</p></div>
3790
3956
  <div class="paragraph"><p>This option may only occur once, in the global server configuration.</p></div>
3791
3957
  </div>
3792
3958
  <div class="sect3">
3793
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_passengerdebugger_lt_on_off_gt" data-comment-topic="passengerdebugger-on-off--1lgdk7g">5.16.3. PassengerDebugger &lt;on|off&gt;</h4>
3959
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_passengerdebugger_lt_on_off_gt"></span><h4 data-comment-topic="passengerdebugger-on-off--1lgdk7g" data-anchor="_passengerdebugger_lt_on_off_gt">5.16.3. PassengerDebugger &lt;on|off&gt;</h4>
3794
3960
  <div class="paragraph"><p><strong>This feature is only available in <a href="https://www.phusionpassenger.com/enterprise">Phusion Passenger Enterprise</a>. It was introduced in version 3.0.0. <a href="https://www.phusionpassenger.com/download">Buy Phusion Passenger Enterprise here.</a></strong></p></div>
3795
3961
  <div class="paragraph"><p>Turns support for application debugging on or off. In case of Ruby applications,
3796
3962
  turning this option on will cause them to load the <span class="monospaced">ruby-debug</span> gem (when on Ruby 1.8)
@@ -3804,7 +3970,7 @@ gem 'debugger', :platforms =&gt; :ruby_19</pre>
3804
3970
  </div>
3805
3971
  <div class="paragraph"><p>Once debugging is turned on, you can use the command <span class="monospaced">passenger-irb --debug &lt;PID&gt;</span> to attach an rdebug console to the application process with the given PID. Attaching will succeed once the application process executes a <span class="monospaced">debugger</span> command.</p></div>
3806
3972
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
3807
- <div class="ulist"><ul>
3973
+ <div class="ulist"><ul>
3808
3974
  <li>
3809
3975
  <p>
3810
3976
  In the global server configuration.
@@ -3830,9 +3996,9 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
3830
3996
  </div>
3831
3997
  </div>
3832
3998
  <div class="sect2">
3833
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_ruby_on_rails_specific_options" data-comment-topic="ruby-on-rails-specific-options-1t10wfu">5.17. Ruby on Rails-specific options</h3>
3999
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_ruby_on_rails_specific_options"></span><h3 data-comment-topic="ruby-on-rails-specific-options-1t10wfu" data-anchor="_ruby_on_rails_specific_options">5.17. Ruby on Rails-specific options</h3>
3834
4000
  <div class="sect3">
3835
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsautodetect_lt_on_off_gt" data-comment-topic="railsautodetect-on-off--tpigsd">5.17.1. RailsAutoDetect &lt;on|off&gt;</h4>
4001
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsautodetect_lt_on_off_gt"></span><h4 data-comment-topic="railsautodetect-on-off--tpigsd" data-anchor="_railsautodetect_lt_on_off_gt">5.17.1. RailsAutoDetect &lt;on|off&gt;</h4>
3836
4002
  <div class="paragraph"><p>Whether Phusion Passenger should automatically detect whether a virtual host’s
3837
4003
  document root is a Ruby on Rails application. The default is <em>on</em>.</p></div>
3838
4004
  <div class="paragraph"><p>This option may occur in the global server configuration or in a virtual host
@@ -3864,13 +4030,13 @@ application by using the <a href="#RailsBaseURI">RailsBaseURI</a> configuration
3864
4030
  </div>
3865
4031
  </div>
3866
4032
  <div class="sect3">
3867
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="RailsBaseURI" data-comment-topic="railsbaseuri-uri--1txrw3k">5.17.2. RailsBaseURI &lt;uri&gt;</h4>
4033
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="RailsBaseURI"></span><h4 data-comment-topic="railsbaseuri-uri--1txrw3k" data-anchor="RailsBaseURI">5.17.2. RailsBaseURI &lt;uri&gt;</h4>
3868
4034
  <div class="paragraph"><p>Used to specify that the given URI is a Rails application. See
3869
4035
  <a href="#deploying_rails_to_sub_uri">Deploying Rails to a sub URI</a> for an example.</p></div>
3870
4036
  <div class="paragraph"><p>It is allowed to specify this option multiple times. Do this to deploy multiple
3871
4037
  Rails applications in different sub-URIs under the same virtual host.</p></div>
3872
4038
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
3873
- <div class="ulist"><ul>
4039
+ <div class="ulist"><ul>
3874
4040
  <li>
3875
4041
  <p>
3876
4042
  In the global server configuration.
@@ -3894,10 +4060,10 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
3894
4060
  </ul></div>
3895
4061
  </div>
3896
4062
  <div class="sect3">
3897
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="rails_env" data-comment-topic="railsenv-string--1b0xxvu">5.17.3. RailsEnv &lt;string&gt;</h4>
4063
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="rails_env"></span><h4 data-comment-topic="railsenv-string--1b0xxvu" data-anchor="rails_env">5.17.3. RailsEnv &lt;string&gt;</h4>
3898
4064
  <div class="paragraph"><p>This option allows one to specify the default <span class="monospaced">RAILS_ENV</span> value.</p></div>
3899
4065
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
3900
- <div class="ulist"><ul>
4066
+ <div class="ulist"><ul>
3901
4067
  <li>
3902
4068
  <p>
3903
4069
  In the global server configuration.
@@ -3922,7 +4088,7 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
3922
4088
  <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>production</em>.</p></div>
3923
4089
  </div>
3924
4090
  <div class="sect3">
3925
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsframeworkspawneridletime_lt_integer_gt" data-comment-topic="railsframeworkspawneridletime-integer--1ai8dgq">5.17.4. RailsFrameworkSpawnerIdleTime &lt;integer&gt;</h4>
4091
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsframeworkspawneridletime_lt_integer_gt"></span><h4 data-comment-topic="railsframeworkspawneridletime-integer--1ai8dgq" data-anchor="_railsframeworkspawneridletime_lt_integer_gt">5.17.4. RailsFrameworkSpawnerIdleTime &lt;integer&gt;</h4>
3926
4092
  <div class="paragraph"><p>The FrameworkSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
3927
4093
  Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
3928
4094
  anything for a given period.</p></div>
@@ -3936,7 +4102,7 @@ you’re using the <em>smart</em> <a href="#PassengerSpawnMethod">spawning metho
3936
4102
  system has enough memory, is it recommended that you set this option to a high
3937
4103
  value or to <em>0</em>.</p></div>
3938
4104
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
3939
- <div class="ulist"><ul>
4105
+ <div class="ulist"><ul>
3940
4106
  <li>
3941
4107
  <p>
3942
4108
  In the global server configuration.
@@ -3951,7 +4117,7 @@ In a virtual host configuration block.
3951
4117
  <div class="paragraph"><p>In each place, it may be specified at most once. The default value is <em>1800</em> (30 minutes).</p></div>
3952
4118
  </div>
3953
4119
  <div class="sect3">
3954
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsappspawneridletime_lt_integer_gt" data-comment-topic="railsappspawneridletime-integer--1awgog1">5.17.5. RailsAppSpawnerIdleTime &lt;integer&gt;</h4>
4120
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsappspawneridletime_lt_integer_gt"></span><h4 data-comment-topic="railsappspawneridletime-integer--1awgog1" data-anchor="_railsappspawneridletime_lt_integer_gt">5.17.5. RailsAppSpawnerIdleTime &lt;integer&gt;</h4>
3955
4121
  <div class="paragraph"><p>The ApplicationSpawner server (explained in <a href="#spawning_methods_explained">Spawning methods explained</a>) has an idle timeout, just like the backend processes spawned by
3956
4122
  Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done
3957
4123
  anything for a given period.</p></div>
@@ -3965,7 +4131,7 @@ you’re using the <em>smart</em> or <em>smart-lv2</em> <a href="#PassengerSpawn
3965
4131
  system has enough memory, is it recommended that you set this option to a high
3966
4132
  value or to <em>0</em>.</p></div>
3967
4133
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
3968
- <div class="ulist"><ul>
4134
+ <div class="ulist"><ul>
3969
4135
  <li>
3970
4136
  <p>
3971
4137
  In the global server configuration.
@@ -3981,9 +4147,9 @@ In a virtual host configuration block.
3981
4147
  </div>
3982
4148
  </div>
3983
4149
  <div class="sect2">
3984
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_rack_and_rails_gt_3_specific_options" data-comment-topic="rack-specific-options-wk9qzt">5.18. Rack and Rails &gt;= 3 specific options</h3>
4150
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_rack_and_rails_gt_3_specific_options"></span><h3 data-comment-topic="rack-specific-options-wk9qzt" data-anchor="_rack_and_rails_gt_3_specific_options">5.18. Rack and Rails &gt;= 3 specific options</h3>
3985
4151
  <div class="sect3">
3986
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_rackautodetect_lt_on_off_gt" data-comment-topic="rackautodetect-on-off--vl1lxy">5.18.1. RackAutoDetect &lt;on|off&gt;</h4>
4152
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_rackautodetect_lt_on_off_gt"></span><h4 data-comment-topic="rackautodetect-on-off--vl1lxy" data-anchor="_rackautodetect_lt_on_off_gt">5.18.1. RackAutoDetect &lt;on|off&gt;</h4>
3987
4153
  <div class="paragraph"><p>Whether Phusion Passenger should automatically detect whether a virtual host’s
3988
4154
  document root is a Rack application. The default is <em>on</em>.</p></div>
3989
4155
  <div class="paragraph"><p>This option may occur in the global server configuration or in a virtual host
@@ -4015,13 +4181,13 @@ application by using the <a href="#RackBaseURI">RackBaseURI</a> configuration op
4015
4181
  </div>
4016
4182
  </div>
4017
4183
  <div class="sect3">
4018
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="RackBaseURI" data-comment-topic="rackbaseuri-uri--1to24pj">5.18.2. RackBaseURI &lt;uri&gt;</h4>
4184
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="RackBaseURI"></span><h4 data-comment-topic="rackbaseuri-uri--1to24pj" data-anchor="RackBaseURI">5.18.2. RackBaseURI &lt;uri&gt;</h4>
4019
4185
  <div class="paragraph"><p>Used to specify that the given URI is a Rack application. See
4020
4186
  <a href="#deploying_rack_to_sub_uri">Deploying Rack to a sub URI</a> for an example.</p></div>
4021
4187
  <div class="paragraph"><p>It is allowed to specify this option multiple times. Do this to deploy multiple
4022
4188
  Rack applications in different sub-URIs under the same virtual host.</p></div>
4023
4189
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
4024
- <div class="ulist"><ul>
4190
+ <div class="ulist"><ul>
4025
4191
  <li>
4026
4192
  <p>
4027
4193
  In the global server configuration.
@@ -4045,12 +4211,12 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
4045
4211
  </ul></div>
4046
4212
  </div>
4047
4213
  <div class="sect3">
4048
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="rack_env" data-comment-topic="rackenv-string--vve9py">5.18.3. RackEnv &lt;string&gt;</h4>
4214
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="rack_env"></span><h4 data-comment-topic="rackenv-string--vve9py" data-anchor="rack_env">5.18.3. RackEnv &lt;string&gt;</h4>
4049
4215
  <div class="paragraph"><p>The given value will be accessible in Rack applications in the <span class="monospaced">RACK_ENV</span>
4050
4216
  environment variable. This allows one to define the environment in which
4051
4217
  Rack applications are run, very similar to <span class="monospaced">RAILS_ENV</span>.</p></div>
4052
4218
  <div class="paragraph"><p>This option may occur in the following places:</p></div>
4053
- <div class="ulist"><ul>
4219
+ <div class="ulist"><ul>
4054
4220
  <li>
4055
4221
  <p>
4056
4222
  In the global server configuration.
@@ -4076,39 +4242,39 @@ In <em>.htaccess</em>, if <span class="monospaced">AllowOverride Options</span>
4076
4242
  </div>
4077
4243
  </div>
4078
4244
  <div class="sect2">
4079
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_deprecated_options" data-comment-topic="deprecated-options-pm9m57">5.19. Deprecated options</h3>
4245
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_deprecated_options"></span><h3 data-comment-topic="deprecated-options-pm9m57" data-anchor="_deprecated_options">5.19. Deprecated options</h3>
4080
4246
  <div class="paragraph"><p>The following options have been deprecated, but are still supported for backwards
4081
4247
  compatibility reasons.</p></div>
4082
4248
  <div class="sect3">
4083
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsruby" data-comment-topic="railsruby-ht09ei">5.19.1. RailsRuby</h4>
4249
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsruby"></span><h4 data-comment-topic="railsruby-ht09ei" data-anchor="_railsruby">5.19.1. RailsRuby</h4>
4084
4250
  <div class="paragraph"><p>Deprecated in favor of <a href="#PassengerRuby">PassengerRuby</a>.</p></div>
4085
4251
  </div>
4086
4252
  <div class="sect3">
4087
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsuserswitching" data-comment-topic="railsuserswitching-1npx8y4">5.19.2. RailsUserSwitching</h4>
4253
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsuserswitching"></span><h4 data-comment-topic="railsuserswitching-1npx8y4" data-anchor="_railsuserswitching">5.19.2. RailsUserSwitching</h4>
4088
4254
  <div class="paragraph"><p>Deprecated in favor of <a href="#PassengerUserSwitching">PassengerUserSwitching</a>.</p></div>
4089
4255
  </div>
4090
4256
  <div class="sect3">
4091
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsdefaultuser" data-comment-topic="railsdefaultuser-19j7n3m">5.19.3. RailsDefaultUser</h4>
4257
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsdefaultuser"></span><h4 data-comment-topic="railsdefaultuser-19j7n3m" data-anchor="_railsdefaultuser">5.19.3. RailsDefaultUser</h4>
4092
4258
  <div class="paragraph"><p>Deprecated in favor of <a href="#PassengerDefaultUser">PassengerDefaultUser</a>.</p></div>
4093
4259
  </div>
4094
4260
  <div class="sect3">
4095
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsallowmodrewrite" data-comment-topic="railsallowmodrewrite-1vkziro">5.19.4. RailsAllowModRewrite</h4>
4261
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsallowmodrewrite"></span><h4 data-comment-topic="railsallowmodrewrite-1vkziro" data-anchor="_railsallowmodrewrite">5.19.4. RailsAllowModRewrite</h4>
4096
4262
  <div class="paragraph"><p>This option doesn’t do anything anymore in recent versions of Phusion Passenger.</p></div>
4097
4263
  </div>
4098
4264
  <div class="sect3">
4099
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_railsspawnmethod" data-comment-topic="railsspawnmethod-1aljgpa">5.19.5. RailsSpawnMethod</h4>
4265
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_railsspawnmethod"></span><h4 data-comment-topic="railsspawnmethod-1aljgpa" data-anchor="_railsspawnmethod">5.19.5. RailsSpawnMethod</h4>
4100
4266
  <div class="paragraph"><p>Deprecated in favor of <a href="#PassengerSpawnMethod">PassengerSpawnMethod</a>.</p></div>
4101
4267
  </div>
4102
4268
  </div>
4103
4269
  </div>
4104
4270
  </div>
4105
4271
  <div class="sect1">
4106
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_troubleshooting" data-comment-topic="troubleshooting-2ihihi">6. Troubleshooting</h2>
4272
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_troubleshooting"></span><h2 data-comment-topic="troubleshooting-2ihihi" data-anchor="_troubleshooting">6. Troubleshooting</h2>
4107
4273
  <div class="sectionbody">
4108
4274
  <div class="sect2">
4109
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_operating_system_specific_problems" data-comment-topic="operating-system-specific-problems-327gbk">6.1. Operating system-specific problems</h3>
4275
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_operating_system_specific_problems"></span><h3 data-comment-topic="operating-system-specific-problems-327gbk" data-anchor="_operating_system_specific_problems">6.1. Operating system-specific problems</h3>
4110
4276
  <div class="sect3">
4111
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_macos_x_the_installer_cannot_locate_mamp_8217_s_apache" data-comment-topic="macos-x-the-installer-cannot-locate-mamp-s-apache-or908n">6.1.1. MacOS X: The installer cannot locate MAMP’s Apache</h4>
4277
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_macos_x_the_installer_cannot_locate_mamp_8217_s_apache"></span><h4 data-comment-topic="macos-x-the-installer-cannot-locate-mamp-s-apache-or908n" data-anchor="_macos_x_the_installer_cannot_locate_mamp_8217_s_apache">6.1.1. MacOS X: The installer cannot locate MAMP’s Apache</h4>
4112
4278
  <div class="sidebarblock">
4113
4279
  <div class="content">
4114
4280
  <div class="title">Symptoms</div>
@@ -4129,14 +4295,14 @@ to fix this problem.</p></div>
4129
4295
  </div>
4130
4296
  </div>
4131
4297
  <div class="sect2">
4132
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_problems_during_installation" data-comment-topic="problems-during-installation-q1vlsu">6.2. Problems during installation</h3>
4298
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_problems_during_installation"></span><h3 data-comment-topic="problems-during-installation-q1vlsu" data-anchor="_problems_during_installation">6.2. Problems during installation</h3>
4133
4299
  <div class="sect3">
4134
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="installing_ruby_dev" data-comment-topic="ruby-development-headers-aren-t-installed-1yqrom8">6.2.1. Ruby development headers aren’t installed</h4>
4300
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="installing_ruby_dev"></span><h4 data-comment-topic="ruby-development-headers-aren-t-installed-1yqrom8" data-anchor="installing_ruby_dev">6.2.1. Ruby development headers aren’t installed</h4>
4135
4301
  <div class="sidebarblock">
4136
4302
  <div class="content">
4137
4303
  <div class="title">Symptoms</div>
4138
4304
  <div class="paragraph"><p>Installing Phusion Passenger fails because of one of the following errors:</p></div>
4139
- <div class="ulist"><ul>
4305
+ <div class="ulist"><ul>
4140
4306
  <li>
4141
4307
  <p>
4142
4308
  The Phusion Passenger installer tells you that the Ruby development headers
@@ -4161,7 +4327,7 @@ must be installed. On most Linux systems, Ruby and the Ruby development headers
4161
4327
  are contained in separate packages, so having Ruby installed does not
4162
4328
  automatically imply having the development headers installed.</p></div>
4163
4329
  <div class="paragraph"><p>Here’s how you can install the development headers:</p></div>
4164
- <div class="dlist"><dl>
4330
+ <div class="dlist"><dl>
4165
4331
  <dt class="hdlist1">
4166
4332
  Ubuntu/Debian
4167
4333
  </dt>
@@ -4217,24 +4383,24 @@ Other operating systems
4217
4383
  </dd>
4218
4384
  </dl></div>
4219
4385
  <div class="admonitionblock">
4220
- <table><tr>
4386
+ <table><tr>
4221
4387
  <td class="icon">
4222
- <img src="./images/icons/note.png" alt="Note">
4388
+ <img src="./images/icons/note.png" alt="Note">
4223
4389
  </td>
4224
4390
  <td class="content">If you’ve installed a new Ruby version (i.e. your system now contains
4225
4391
  multiple Ruby installations), then you will need to tell Phusion Passenger
4226
4392
  which Ruby installation you want to use. Please read
4227
4393
  <a href="#specifying_ruby_installation">Specifying the correct Ruby installation</a>.</td>
4228
- </tr></table>
4394
+ </tr></table>
4229
4395
  </div>
4230
4396
  </div>
4231
4397
  <div class="sect3">
4232
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_apache_development_headers_aren_8217_t_installed" data-comment-topic="apache-development-headers-aren-t-installed-x2473y">6.2.2. Apache development headers aren’t installed</h4>
4398
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_apache_development_headers_aren_8217_t_installed"></span><h4 data-comment-topic="apache-development-headers-aren-t-installed-x2473y" data-anchor="_apache_development_headers_aren_8217_t_installed">6.2.2. Apache development headers aren’t installed</h4>
4233
4399
  <div class="sidebarblock">
4234
4400
  <div class="content">
4235
4401
  <div class="title">Symptoms</div>
4236
4402
  <div class="paragraph"><p>Installing Phusion Passenger fails because of one of the following errors:</p></div>
4237
- <div class="ulist"><ul>
4403
+ <div class="ulist"><ul>
4238
4404
  <li>
4239
4405
  <p>
4240
4406
  The installer says that the Apache development headers aren’t installed.
@@ -4250,7 +4416,7 @@ else similar to <em>http_*.h</em>.)</p></div>
4250
4416
  </ul></div>
4251
4417
  </div>
4252
4418
  </div>
4253
- <div class="dlist"><dl>
4419
+ <div class="dlist"><dl>
4254
4420
  <dt class="hdlist1">
4255
4421
  Ubuntu
4256
4422
  </dt>
@@ -4320,12 +4486,12 @@ Other operating systems
4320
4486
  </dl></div>
4321
4487
  </div>
4322
4488
  <div class="sect3">
4323
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_apr_development_headers_aren_8217_t_installed" data-comment-topic="apr-development-headers-aren-t-installed-13bk976">6.2.3. APR development headers aren’t installed</h4>
4489
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_apr_development_headers_aren_8217_t_installed"></span><h4 data-comment-topic="apr-development-headers-aren-t-installed-13bk976" data-anchor="_apr_development_headers_aren_8217_t_installed">6.2.3. APR development headers aren’t installed</h4>
4324
4490
  <div class="sidebarblock">
4325
4491
  <div class="content">
4326
4492
  <div class="title">Symptoms</div>
4327
4493
  <div class="paragraph"><p>Installing Phusion Passenger fails because one of the following errors:</p></div>
4328
- <div class="ulist"><ul>
4494
+ <div class="ulist"><ul>
4329
4495
  <li>
4330
4496
  <p>
4331
4497
  The installer tells you that APR development headers aren’t installed.
@@ -4344,7 +4510,7 @@ The error message “'apr_strings.h: No such file or directory”' occurs.
4344
4510
  </ul></div>
4345
4511
  </div>
4346
4512
  </div>
4347
- <div class="dlist"><dl>
4513
+ <div class="dlist"><dl>
4348
4514
  <dt class="hdlist1">
4349
4515
  Ubuntu
4350
4516
  </dt>
@@ -4406,20 +4572,20 @@ Other operating systems
4406
4572
  </dl></div>
4407
4573
  </div>
4408
4574
  <div class="sect3">
4409
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_phusion_passenger_is_using_the_wrong_apache_during_installation" data-comment-topic="phusion-passenger-is-using-the-wrong-apache-during-installation-82qnt4">6.2.4. Phusion Passenger is using the wrong Apache during installation</h4>
4575
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_phusion_passenger_is_using_the_wrong_apache_during_installation"></span><h4 data-comment-topic="phusion-passenger-is-using-the-wrong-apache-during-installation-82qnt4" data-anchor="_phusion_passenger_is_using_the_wrong_apache_during_installation">6.2.4. Phusion Passenger is using the wrong Apache during installation</h4>
4410
4576
  <div class="paragraph"><p>Please <a href="#specifying_correct_apache_install">Specifying the correct Apache installation</a>, and re-run the Phusion Passenger installer.</p></div>
4411
4577
  </div>
4412
4578
  <div class="sect3">
4413
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_phusion_passenger_is_using_the_wrong_ruby_during_installation" data-comment-topic="phusion-passenger-is-using-the-wrong-ruby-during-installation-1nh3zml">6.2.5. Phusion Passenger is using the wrong Ruby during installation</h4>
4579
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_phusion_passenger_is_using_the_wrong_ruby_during_installation"></span><h4 data-comment-topic="phusion-passenger-is-using-the-wrong-ruby-during-installation-1nh3zml" data-anchor="_phusion_passenger_is_using_the_wrong_ruby_during_installation">6.2.5. Phusion Passenger is using the wrong Ruby during installation</h4>
4414
4580
  <div class="paragraph"><p>Please <a href="#specifying_ruby_installation">Specifying the correct Ruby installation</a>, and re-run the Phusion Passenger installer.</p></div>
4415
4581
  </div>
4416
4582
  </div>
4417
4583
  <div class="sect2">
4418
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_problems_after_installation" data-comment-topic="problems-after-installation-fwd23q">6.3. Problems after installation</h3>
4584
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_problems_after_installation"></span><h3 data-comment-topic="problems-after-installation-fwd23q" data-anchor="_problems_after_installation">6.3. Problems after installation</h3>
4419
4585
  <div class="admonitionblock">
4420
- <table><tr>
4586
+ <table><tr>
4421
4587
  <td class="icon">
4422
- <img src="./images/icons/tip.png" alt="Tip">
4588
+ <img src="./images/icons/tip.png" alt="Tip">
4423
4589
  </td>
4424
4590
  <td class="content">
4425
4591
  <div class="title">The golden tip: read your Apache error logs!</div>
@@ -4427,14 +4593,14 @@ Other operating systems
4427
4593
  you’re experiencing post-installation problems, please look
4428
4594
  inside the Apache error logs. It will tell you what exactly went wrong.</p></div>
4429
4595
  </td>
4430
- </tr></table>
4596
+ </tr></table>
4431
4597
  </div>
4432
4598
  <div class="sect3">
4433
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_my_rails_application_works_on_mongrel_but_not_on_phusion_passenger" data-comment-topic="my-rails-application-works-on-mongrel-but-not-on-phusion-passenger-1f28drx">6.3.1. My Rails application works on Mongrel, but not on Phusion Passenger</h4>
4599
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_my_rails_application_works_on_mongrel_but_not_on_phusion_passenger"></span><h4 data-comment-topic="my-rails-application-works-on-mongrel-but-not-on-phusion-passenger-1f28drx" data-anchor="_my_rails_application_works_on_mongrel_but_not_on_phusion_passenger">6.3.1. My Rails application works on Mongrel, but not on Phusion Passenger</h4>
4434
4600
  <div class="paragraph"><p>Please try setting <a href="#PassengerSpawnMethod">PassengerSpawnMethod</a> to <em>conservative</em>.</p></div>
4435
4601
  </div>
4436
4602
  <div class="sect3">
4437
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_phusion_passenger_has_been_compiled_against_the_wrong_apache_installation" data-comment-topic="phusion-passenger-has-been-compiled-against-the-wrong-apache-installation-n74ce0">6.3.2. Phusion Passenger has been compiled against the wrong Apache installation</h4>
4603
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_phusion_passenger_has_been_compiled_against_the_wrong_apache_installation"></span><h4 data-comment-topic="phusion-passenger-has-been-compiled-against-the-wrong-apache-installation-n74ce0" data-anchor="_phusion_passenger_has_been_compiled_against_the_wrong_apache_installation">6.3.2. Phusion Passenger has been compiled against the wrong Apache installation</h4>
4438
4604
  <div class="sidebarblock">
4439
4605
  <div class="content">
4440
4606
  <div class="title">Symptoms</div>
@@ -4447,15 +4613,15 @@ Apache installations on their system.</p></div>
4447
4613
  <div class="paragraph"><p>To solve this problem, please <a href="#specifying_correct_apache_install">specify the correct Apache installation</a>, and <a href="#install_passenger">reinstall Phusion Passenger</a>.</p></div>
4448
4614
  </div>
4449
4615
  <div class="sect3">
4450
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_i_get_a_403_forbidden_error" data-comment-topic="i-get-a-403-forbidden-error-m0rlay">6.3.3. I get a "403 Forbidden" error</h4>
4616
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_i_get_a_403_forbidden_error"></span><h4 data-comment-topic="i-get-a-403-forbidden-error-m0rlay" data-anchor="_i_get_a_403_forbidden_error">6.3.3. I get a "403 Forbidden" error</h4>
4451
4617
  <div class="paragraph"><p>See next subsection.</p></div>
4452
4618
  </div>
4453
4619
  <div class="sect3">
4454
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_static_assets_such_as_images_and_stylesheets_aren_8217_t_being_displayed" data-comment-topic="static-assets-such-as-images-and-stylesheets-aren-t-being-displayed-uaptpi">6.3.4. Static assets such as images and stylesheets aren’t being displayed</h4>
4620
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_static_assets_such_as_images_and_stylesheets_aren_8217_t_being_displayed"></span><h4 data-comment-topic="static-assets-such-as-images-and-stylesheets-aren-t-being-displayed-uaptpi" data-anchor="_static_assets_such_as_images_and_stylesheets_aren_8217_t_being_displayed">6.3.4. Static assets such as images and stylesheets aren’t being displayed</h4>
4455
4621
  <div class="paragraph"><p>Static assets are accelerated, i.e. they are served directly by Apache and do not
4456
4622
  go through the Rails stack. There are two reasons why Apache doesn’t serve static
4457
4623
  assets correctly:</p></div>
4458
- <div class="olist arabic"><ol class="arabic">
4624
+ <div class="olist arabic"><ol class="arabic">
4459
4625
  <li>
4460
4626
  <p>
4461
4627
  Your Apache configuration is too strict, and does not allow HTTP clients to
@@ -4484,14 +4650,14 @@ The Apache process doesn’t have permission to access your Rails application’
4484
4650
  </ol></div>
4485
4651
  </div>
4486
4652
  <div class="sect3">
4487
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it" data-comment-topic="the-apache-error-log-says-that-the-spawn-manager-script-does-not-exist-or-that-it-does-not-have-permission-to-execute-it-1fmoozk">6.3.5. The Apache error log says that the spawn manager script does not exist, or that it does not have permission to execute it</h4>
4653
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it"></span><h4 data-comment-topic="the-apache-error-log-says-that-the-spawn-manager-script-does-not-exist-or-that-it-does-not-have-permission-to-execute-it-1fmoozk" data-anchor="_the_apache_error_log_says_that_the_spawn_manager_script_does_not_exist_or_that_it_does_not_have_permission_to_execute_it">6.3.5. The Apache error log says that the spawn manager script does not exist, or that it does not have permission to execute it</h4>
4488
4654
  <div class="paragraph"><p>If you are sure that the <em>PassengerRoot</em> configuration option is set correctly,
4489
4655
  then this problem is most likely caused by the fact that you’re running Apache
4490
4656
  with SELinux. On Fedora, CentOS and RedHat Enterprise Linux, Apache is locked
4491
4657
  down by SELinux policies.</p></div>
4492
4658
  <div class="paragraph"><p>To solve this problem, you must set some permissions on the Phusion Passenger files
4493
4659
  and folders, so that Apache can access them.</p></div>
4494
- <div class="ulist"><ul>
4660
+ <div class="ulist"><ul>
4495
4661
  <li>
4496
4662
  <p>
4497
4663
  If you’ve installed Phusion Passenger via a gem, then run this command to determine
@@ -4526,7 +4692,7 @@ If you’ve installed Phusion Passenger via the source tarball, then run the fol
4526
4692
  <div class="paragraph"><p>Once the permissions are fixed, restart Apache.</p></div>
4527
4693
  </div>
4528
4694
  <div class="sect3">
4529
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_the_rails_application_reports_that_it_8217_s_unable_to_start_because_of_a_permission_error" data-comment-topic="the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error-v53i6s">6.3.6. The Rails application reports that it’s unable to start because of a permission error</h4>
4695
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_the_rails_application_reports_that_it_8217_s_unable_to_start_because_of_a_permission_error"></span><h4 data-comment-topic="the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error-v53i6s" data-anchor="_the_rails_application_reports_that_it_8217_s_unable_to_start_because_of_a_permission_error">6.3.6. The Rails application reports that it’s unable to start because of a permission error</h4>
4530
4696
  <div class="paragraph"><p>Please check whether your Rails application’s folder has the correct
4531
4697
  permissions. By default, Rails applications are started as the owner of the
4532
4698
  file <em>config/environment.rb</em>, except if the file is owned by root. If the
@@ -4536,9 +4702,9 @@ specified).</p></div>
4536
4702
  <div class="paragraph"><p>Please read <a href="#user_switching">User switching (security)</a> for details.</p></div>
4537
4703
  </div>
4538
4704
  <div class="sect3">
4539
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_my_rails_application_8217_s_log_file_is_not_being_written_to" data-comment-topic="my-rails-application-s-log-file-is-not-being-written-to-3i747l">6.3.7. My Rails application’s log file is not being written to</h4>
4705
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_my_rails_application_8217_s_log_file_is_not_being_written_to"></span><h4 data-comment-topic="my-rails-application-s-log-file-is-not-being-written-to-3i747l" data-anchor="_my_rails_application_8217_s_log_file_is_not_being_written_to">6.3.7. My Rails application’s log file is not being written to</h4>
4540
4706
  <div class="paragraph"><p>There are a couple things that you should be aware of:</p></div>
4541
- <div class="ulist"><ul>
4707
+ <div class="ulist"><ul>
4542
4708
  <li>
4543
4709
  <p>
4544
4710
  By default, Phusion Passenger runs Rails applications in <em>production</em> mode,
@@ -4567,7 +4733,7 @@ following command to give your Rails application folder that context:</p></div>
4567
4733
  </div>
4568
4734
  </div>
4569
4735
  <div class="sect3">
4570
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_i_8217_ve_deployed_my_app_on_ssl_but_the_app_thinks_its_not_on_ssl" data-comment-topic="i-ve-deployed-my-app-on-ssl-but-the-app-thinks-its-not-on-ssl-10rvgnr">6.3.8. I’ve deployed my app on SSL, but the app thinks its not on SSL</h4>
4736
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_i_8217_ve_deployed_my_app_on_ssl_but_the_app_thinks_its_not_on_ssl"></span><h4 data-comment-topic="i-ve-deployed-my-app-on-ssl-but-the-app-thinks-its-not-on-ssl-10rvgnr" data-anchor="_i_8217_ve_deployed_my_app_on_ssl_but_the_app_thinks_its_not_on_ssl">6.3.8. I’ve deployed my app on SSL, but the app thinks its not on SSL</h4>
4571
4737
  <div class="paragraph"><p>Rails and many other frameworks infers whether it’s running on SSL through the CGI
4572
4738
  environment variable <span class="monospaced">HTTPS</span>. Apache always sets this variable when on SSL,
4573
4739
  except when SSL is incorrectly configured.</p></div>
@@ -4608,30 +4774,30 @@ the corrected example:</p></div>
4608
4774
  </div>
4609
4775
  </div>
4610
4776
  <div class="sect2">
4611
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="conflicting_apache_modules" data-comment-topic="conflicting-apache-modules-1uwpixk">6.4. Conflicting Apache modules</h3>
4777
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="conflicting_apache_modules"></span><h3 data-comment-topic="conflicting-apache-modules-1uwpixk" data-anchor="conflicting_apache_modules">6.4. Conflicting Apache modules</h3>
4612
4778
  <div class="sect3">
4613
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_mod_userdir" data-comment-topic="mod-userdir-x5e2te">6.4.1. mod_userdir</h4>
4779
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_mod_userdir"></span><h4 data-comment-topic="mod-userdir-x5e2te" data-anchor="_mod_userdir">6.4.1. mod_userdir</h4>
4614
4780
  <div class="paragraph"><p><em>mod_userdir</em> is not compatible with Phusion Passenger at the moment.</p></div>
4615
4781
  </div>
4616
4782
  <div class="sect3">
4617
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_multiviews_mod_negotiation" data-comment-topic="multiviews-mod-negotiation--zchfg0">6.4.2. MultiViews (mod_negotiation)</h4>
4783
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_multiviews_mod_negotiation"></span><h4 data-comment-topic="multiviews-mod-negotiation--zchfg0" data-anchor="_multiviews_mod_negotiation">6.4.2. MultiViews (mod_negotiation)</h4>
4618
4784
  <div class="paragraph"><p>MultiViews is not compatible with Phusion Passenger. You should disable MultiViews
4619
4785
  for all Phusion Passenger hosts.</p></div>
4620
4786
  </div>
4621
4787
  <div class="sect3">
4622
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_virtualdocumentroot" data-comment-topic="virtualdocumentroot-14cwd7l">6.4.3. VirtualDocumentRoot</h4>
4788
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_virtualdocumentroot"></span><h4 data-comment-topic="virtualdocumentroot-14cwd7l" data-anchor="_virtualdocumentroot">6.4.3. VirtualDocumentRoot</h4>
4623
4789
  <div class="paragraph"><p>VirtualDocumentRoot is not compatible with Phusion Passenger at the moment.</p></div>
4624
4790
  </div>
4625
4791
  </div>
4626
4792
  </div>
4627
4793
  </div>
4628
4794
  <div class="sect1">
4629
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_analysis_and_system_maintenance" data-comment-topic="analysis-and-system-maintenance-qvkwzr">7. Analysis and system maintenance</h2>
4795
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_analysis_and_system_maintenance"></span><h2 data-comment-topic="analysis-and-system-maintenance-qvkwzr" data-anchor="_analysis_and_system_maintenance">7. Analysis and system maintenance</h2>
4630
4796
  <div class="sectionbody">
4631
4797
  <div class="paragraph"><p>Phusion Passenger provides a set of tools, which are useful for system analysis,
4632
4798
  maintenance and troubleshooting.</p></div>
4633
4799
  <div class="sect2">
4634
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_inspecting_memory_usage" data-comment-topic="inspecting-memory-usage-1bkis6i">7.1. Inspecting memory usage</h3>
4800
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_inspecting_memory_usage"></span><h3 data-comment-topic="inspecting-memory-usage-1bkis6i" data-anchor="_inspecting_memory_usage">7.1. Inspecting memory usage</h3>
4635
4801
  <div class="paragraph"><p>Process inspection tools such as <span class="monospaced">ps</span> and <span class="monospaced">top</span> are useful, but they
4636
4802
  <a href="http://groups.google.com/group/phusion-passenger/msg/1fd1c233456d3180">rarely show the correct memory usage</a>.
4637
4803
  The real memory usage is usually lower than what <span class="monospaced">ps</span> and <span class="monospaced">top</span> report.</p></div>
@@ -4673,18 +4839,18 @@ we see that all the Apache worker processes only take less than 1 MB memory each
4673
4839
  This is a lot less than the 50 MB-ish memory usage as shown in the <em>VMSize</em> column
4674
4840
  (which is what a lot of people think is the real memory usage, but is actually not).</p></div>
4675
4841
  <div class="admonitionblock">
4676
- <table><tr>
4842
+ <table><tr>
4677
4843
  <td class="icon">
4678
- <img src="./images/icons/note.png" alt="Note">
4844
+ <img src="./images/icons/note.png" alt="Note">
4679
4845
  </td>
4680
4846
  <td class="content">Private dirty RSS reporting only works on Linux. Unfortunately other operating systems
4681
4847
  don’t provide facilities for determining processes' private dirty RSS. On non-Linux systems,
4682
4848
  the Resident Set Size is reported instead.</td>
4683
- </tr></table>
4849
+ </tr></table>
4684
4850
  </div>
4685
4851
  </div>
4686
4852
  <div class="sect2">
4687
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_inspecting_phusion_passenger_8217_s_internal_status" data-comment-topic="inspecting-phusion-passenger-s-internal-status-ukekf7">7.2. Inspecting Phusion Passenger’s internal status</h3>
4853
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_inspecting_phusion_passenger_8217_s_internal_status"></span><h3 data-comment-topic="inspecting-phusion-passenger-s-internal-status-ukekf7" data-anchor="_inspecting_phusion_passenger_8217_s_internal_status">7.2. Inspecting Phusion Passenger’s internal status</h3>
4688
4854
  <div class="paragraph"><p>One can inspect Phusion Passenger’s internal status with the tool <span class="monospaced">passenger-status</span>.
4689
4855
  This tool must typically be run as root. For example:</p></div>
4690
4856
  <div class="listingblock">
@@ -4702,7 +4868,7 @@ inactive = 1
4702
4868
  </div>
4703
4869
  </div>
4704
4870
  <div class="paragraph"><p>The <em>general information</em> section shows the following information:</p></div>
4705
- <div class="dlist"><dl>
4871
+ <div class="dlist"><dl>
4706
4872
  <dt class="hdlist1">
4707
4873
  max
4708
4874
  </dt>
@@ -4746,7 +4912,7 @@ time). The value of <em>inactive</em> equals <span class="monospaced">count - ac
4746
4912
  </dl></div>
4747
4913
  <div class="paragraph"><p>The <em>domains</em> section shows, for each application directory, information about running
4748
4914
  application instances:</p></div>
4749
- <div class="dlist"><dl>
4915
+ <div class="dlist"><dl>
4750
4916
  <dt class="hdlist1">
4751
4917
  Sessions
4752
4918
  </dt>
@@ -4799,7 +4965,7 @@ sessions compared to the others, then there might be a problem:</p></div>
4799
4965
  </div>
4800
4966
  </div>
4801
4967
  <div class="paragraph"><p>Possible reasons why spikes can occur:</p></div>
4802
- <div class="olist arabic"><ol class="arabic">
4968
+ <div class="olist arabic"><ol class="arabic">
4803
4969
  <li>
4804
4970
  <p>
4805
4971
  Your application is busy processing a request that takes a very long time.
@@ -4816,7 +4982,7 @@ Your application is frozen, i.e. has stopped responding. See
4816
4982
  </ol></div>
4817
4983
  </div>
4818
4984
  <div class="sect2">
4819
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="debugging_frozen" data-comment-topic="debugging-frozen-applications-1qsjqq7">7.3. Debugging frozen applications</h3>
4985
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="debugging_frozen"></span><h3 data-comment-topic="debugging-frozen-applications-1qsjqq7" data-anchor="debugging_frozen">7.3. Debugging frozen applications</h3>
4820
4986
  <div class="paragraph"><p>If one of your application instances is frozen (stopped responding), then you
4821
4987
  can figure out where it is frozen by killing it with <em>SIGABRT</em>. This will cause the
4822
4988
  application to raise an exception, with a backtrace.</p></div>
@@ -4828,22 +4994,22 @@ This is the case with Ruby on Rails. So if you kill a Ruby on Rails application
4828
4994
  running it in a <em>production</em> environment). If you don’t see a backtrace there, check
4829
4995
  the Apache error log.</p></div>
4830
4996
  <div class="admonitionblock">
4831
- <table><tr>
4997
+ <table><tr>
4832
4998
  <td class="icon">
4833
- <img src="./images/icons/note.png" alt="Note">
4999
+ <img src="./images/icons/note.png" alt="Note">
4834
5000
  </td>
4835
5001
  <td class="content">It is safe to kill application instances, even in live environments. Phusion Passenger
4836
5002
  will restart killed application instances, as if nothing bad happened.</td>
4837
- </tr></table>
5003
+ </tr></table>
4838
5004
  </div>
4839
5005
  </div>
4840
5006
  <div class="sect2">
4841
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_accessing_individual_application_processes" data-comment-topic="accessing-individual-application-processes-1p0j4jb">7.4. Accessing individual application processes</h3>
5007
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_accessing_individual_application_processes"></span><h3 data-comment-topic="accessing-individual-application-processes-1p0j4jb" data-anchor="_accessing_individual_application_processes">7.4. Accessing individual application processes</h3>
4842
5008
  <div class="paragraph"><p>When a request is sent to the web server, Phusion Passenger will automatically forward
4843
5009
  the request to the most suitable application process, but sometimes it is desirable to
4844
5010
  be able to directly access the individual application processes. Use cases include, but
4845
5011
  are not limited to:</p></div>
4846
- <div class="ulist"><ul>
5012
+ <div class="ulist"><ul>
4847
5013
  <li>
4848
5014
  <p>
4849
5015
  One wants to debug a memory leak or memory bloat problem that only seems to appear on
@@ -4904,17 +5070,17 @@ through the <em>X-Passenger-Connect-Password</em> HTTP header, like this:</p></d
4904
5070
  </div>
4905
5071
  </div>
4906
5072
  <div class="sect2">
4907
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_attaching_an_irb_console_to_an_application_process" data-comment-topic="attaching-an-irb-console-to-an-application-process-1cma32j">7.5. Attaching an IRB console to an application process</h3>
5073
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_attaching_an_irb_console_to_an_application_process"></span><h3 data-comment-topic="attaching-an-irb-console-to-an-application-process-1cma32j" data-anchor="_attaching_an_irb_console_to_an_application_process">7.5. Attaching an IRB console to an application process</h3>
4908
5074
  <div class="paragraph"><p><strong>Available in Phusion Passenger Enterprise since version 3.0.0.</strong></p></div>
4909
5075
  <div class="paragraph"><p>You can attach an IRB console to any application process and inspect its state by executing arbitrary Ruby code. Do this by invoking <span class="monospaced">passenger-irb &lt;PID&gt;</span> where <em>&lt;PID&gt;</em> is the PID of the application process you wish to inspect. Note that the IRB console is currently only available for Ruby apps, not for apps in any other languages.</p></div>
4910
5076
  </div>
4911
5077
  </div>
4912
5078
  </div>
4913
5079
  <div class="sect1">
4914
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_tips" data-comment-topic="tips-19cwwf7">8. Tips</h2>
5080
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_tips"></span><h2 data-comment-topic="tips-19cwwf7" data-anchor="_tips">8. Tips</h2>
4915
5081
  <div class="sectionbody">
4916
5082
  <div class="sect2">
4917
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="user_switching" data-comment-topic="user-switching-security--8njx1x">8.1. User switching (security)</h3>
5083
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="user_switching"></span><h3 data-comment-topic="user-switching-security--8njx1x" data-anchor="user_switching">8.1. User switching (security)</h3>
4918
5084
  <div class="paragraph"><p>There is a problem that plagues most PHP web hosts, namely the fact that all PHP
4919
5085
  applications are run in the same user context as the web server. So for
4920
5086
  example, Joe’s PHP application will be able to read Jane’s PHP application’s
@@ -4926,7 +5092,7 @@ So if <em>/home/webapps/foo/config/environment.rb</em> is owned by <em>joe</em>,
4926
5092
  Passenger will launch the corresponding Rails application as <em>joe</em> as well.</p></div>
4927
5093
  <div class="paragraph"><p>This behavior is the default, and you don’t need to configure anything. But
4928
5094
  there are things that you should keep in mind:</p></div>
4929
- <div class="ulist"><ul>
5095
+ <div class="ulist"><ul>
4930
5096
  <li>
4931
5097
  <p>
4932
5098
  The owner of <em>environment.rb</em>/<em>config.ru</em> must have read access to the application’s
@@ -4954,14 +5120,14 @@ Under no circumstances will applications be run as <em>root</em>. If
4954
5120
  option.</p></div>
4955
5121
  </div>
4956
5122
  <div class="sect2">
4957
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="reducing_memory_usage" data-comment-topic="reducing-memory-consumption-of-ruby-on-rails-applications-by-33--1ubxnq0">8.2. Reducing memory consumption of Ruby on Rails applications by 33%</h3>
5123
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="reducing_memory_usage"></span><h3 data-comment-topic="reducing-memory-consumption-of-ruby-on-rails-applications-by-33--1ubxnq0" data-anchor="reducing_memory_usage">8.2. Reducing memory consumption of Ruby on Rails applications by 33%</h3>
4958
5124
  <div class="paragraph"><p>Is it possible to reduce memory consumption of your Rails applications by 33% on average,
4959
5125
  by using <a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a>.
4960
5126
  Please visit the website for details.</p></div>
4961
5127
  <div class="paragraph"><p>Note that this feature does not apply to Rack applications.</p></div>
4962
5128
  </div>
4963
5129
  <div class="sect2">
4964
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="capistrano" data-comment-topic="capistrano-recipe-syzgo7">8.3. Capistrano recipe</h3>
5130
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="capistrano"></span><h3 data-comment-topic="capistrano-recipe-syzgo7" data-anchor="capistrano">8.3. Capistrano recipe</h3>
4965
5131
  <div class="paragraph"><p>Phusion Passenger can be combined with <a href="http://capify.org/">Capistrano</a>.
4966
5132
  The following Capistrano recipe demonstrates Phusion Passenger support.
4967
5133
  It assumes that you’re using Git as version control system.</p></div>
@@ -4996,10 +5162,10 @@ end</pre>
4996
5162
  </div>
4997
5163
  </div>
4998
5164
  <div class="sect2">
4999
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="bundler_support" data-comment-topic="bundler-support-cf72ih">8.4. Bundler support</h3>
5165
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="bundler_support"></span><h3 data-comment-topic="bundler-support-cf72ih" data-anchor="bundler_support">8.4. Bundler support</h3>
5000
5166
  <div class="paragraph"><p>Phusion Passenger has automatic support for <a href="http://gembundler.com/git.html">Bundler</a>.
5001
5167
  It works as follows:</p></div>
5002
- <div class="ulist"><ul>
5168
+ <div class="ulist"><ul>
5003
5169
  <li>
5004
5170
  <p>
5005
5171
  If you have a <em>.bundle/environment.rb</em> in your application root, then Phusion
@@ -5029,10 +5195,10 @@ the application startup file. In this file you can do whatever you need to setup
5029
5195
  or a similar system.</p></div>
5030
5196
  </div>
5031
5197
  <div class="sect2">
5032
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="moving_phusion_passenger" data-comment-topic="moving-phusion-passenger-to-a-different-directory-16fapwo">8.5. Moving Phusion Passenger to a different directory</h3>
5198
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="moving_phusion_passenger"></span><h3 data-comment-topic="moving-phusion-passenger-to-a-different-directory-16fapwo" data-anchor="moving_phusion_passenger">8.5. Moving Phusion Passenger to a different directory</h3>
5033
5199
  <div class="paragraph"><p>It is possible to relocate the Phusion Passenger files to a different directory. It
5034
5200
  involves two steps:</p></div>
5035
- <div class="olist arabic"><ol class="arabic">
5201
+ <div class="olist arabic"><ol class="arabic">
5036
5202
  <li>
5037
5203
  <p>
5038
5204
  Moving the directory.
@@ -5046,7 +5212,7 @@ Updating the “PassengerRoot” configuration option in Apache.
5046
5212
  </ol></div>
5047
5213
  <div class="paragraph"><p>For example, if Phusion Passenger is located in <em>/opt/passenger/</em>, and you’d like to
5048
5214
  move it to <em>/usr/local/passenger/</em>, then do this:</p></div>
5049
- <div class="olist arabic"><ol class="arabic">
5215
+ <div class="olist arabic"><ol class="arabic">
5050
5216
  <li>
5051
5217
  <p>
5052
5218
  Run the following command:
@@ -5070,7 +5236,7 @@ Edit your Apache configuration file, and set:
5070
5236
  </ol></div>
5071
5237
  </div>
5072
5238
  <div class="sect2">
5073
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_installing_multiple_ruby_on_rails_versions" data-comment-topic="installing-multiple-ruby-on-rails-versions-mi5j14">8.6. Installing multiple Ruby on Rails versions</h3>
5239
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_installing_multiple_ruby_on_rails_versions"></span><h3 data-comment-topic="installing-multiple-ruby-on-rails-versions-mi5j14" data-anchor="_installing_multiple_ruby_on_rails_versions">8.6. Installing multiple Ruby on Rails versions</h3>
5074
5240
  <div class="paragraph"><p>Each Ruby on Rails applications that are going to be deployed may require a
5075
5241
  specific Ruby on Rails version. You can install a specific version with
5076
5242
  this command:</p></div>
@@ -5084,7 +5250,7 @@ this command:</p></div>
5084
5250
  other. Phusion Passenger will automatically make use of the correct version.</p></div>
5085
5251
  </div>
5086
5252
  <div class="sect2">
5087
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_making_the_application_restart_after_each_request" data-comment-topic="making-the-application-restart-after-each-request-183bezx">8.7. Making the application restart after each request</h3>
5253
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_making_the_application_restart_after_each_request"></span><h3 data-comment-topic="making-the-application-restart-after-each-request-183bezx" data-anchor="_making_the_application_restart_after_each_request">8.7. Making the application restart after each request</h3>
5088
5254
  <div class="paragraph"><p>In some situations it might be desirable to restart the web application after
5089
5255
  each request, for example when developing a non-Rails application that doesn’t
5090
5256
  support code reloading, or when developing a web framework.</p></div>
@@ -5093,9 +5259,9 @@ application’s root folder. Unlike <em>restart.txt</em>, Phusion Passenger does
5093
5259
  check for this file’s timestamp: Phusion Passenger will always restart the
5094
5260
  application, as long as <em>always_restart.txt</em> exists.</p></div>
5095
5261
  <div class="admonitionblock">
5096
- <table><tr>
5262
+ <table><tr>
5097
5263
  <td class="icon">
5098
- <img src="./images/icons/note.png" alt="Note">
5264
+ <img src="./images/icons/note.png" alt="Note">
5099
5265
  </td>
5100
5266
  <td class="content">If you’re just developing a Rails application then you probably don’t need
5101
5267
  this feature. If you set <em>RailsEnv development</em> in your Apache configuration,
@@ -5103,11 +5269,11 @@ then Rails will automatically reload your application code after each request.
5103
5269
  <em>always_restart.txt</em> is only useful if you’re working on Ruby on Rails itself,
5104
5270
  or when you’re not developing a Rails application and your web framework
5105
5271
  does not support code reloading.</td>
5106
- </tr></table>
5272
+ </tr></table>
5107
5273
  </div>
5108
5274
  </div>
5109
5275
  <div class="sect2">
5110
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="sub_uri_deployment_uri_fix" data-comment-topic="how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-a63b6r">8.8. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</h3>
5276
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="sub_uri_deployment_uri_fix"></span><h3 data-comment-topic="how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-a63b6r" data-anchor="sub_uri_deployment_uri_fix">8.8. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments</h3>
5111
5277
  <div class="paragraph"><p>Some people experience broken images and other broken static assets when they
5112
5278
  deploy their application to a sub-URI (i.e. <em>http://mysite.com/railsapp/</em>).
5113
5279
  The reason for this usually is that you used a
@@ -5145,12 +5311,12 @@ please refer to
5145
5311
  <a href="http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html">the Rails API docs</a>.</p></div>
5146
5312
  </div>
5147
5313
  <div class="sect2">
5148
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_x_sendfile_support" data-comment-topic="x-sendfile-support-1cgyykw">8.9. X-Sendfile support</h3>
5314
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_x_sendfile_support"></span><h3 data-comment-topic="x-sendfile-support-1cgyykw" data-anchor="_x_sendfile_support">8.9. X-Sendfile support</h3>
5149
5315
  <div class="paragraph"><p>Phusion Passenger does not provide X-Sendfile support by itself. Please install
5150
5316
  <a href="http://tn123.ath.cx/mod_xsendfile/">mod_xsendfile</a> for X-Sendfile support.</p></div>
5151
5317
  </div>
5152
5318
  <div class="sect2">
5153
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_upload_progress" data-comment-topic="upload-progress-71cyl7">8.10. Upload progress</h3>
5319
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_upload_progress"></span><h3 data-comment-topic="upload-progress-71cyl7" data-anchor="_upload_progress">8.10. Upload progress</h3>
5154
5320
  <div class="paragraph"><p>Phusion Passenger does not provide upload progress support by itself. Please
5155
5321
  try drogus’s <a href="http://github.com/drogus/apache-upload-progress-module/tree/master">
5156
5322
  Apache upload progress module</a> instead.</p></div>
@@ -5158,13 +5324,13 @@ Apache upload progress module</a> instead.</p></div>
5158
5324
  </div>
5159
5325
  </div>
5160
5326
  <div class="sect1">
5161
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_under_the_hood" data-comment-topic="under-the-hood-21ue5t">9. Under the hood</h2>
5327
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_under_the_hood"></span><h2 data-comment-topic="under-the-hood-21ue5t" data-anchor="_under_the_hood">9. Under the hood</h2>
5162
5328
  <div class="sectionbody">
5163
5329
  <div class="paragraph"><p>Phusion Passenger hides a lot of complexity for the end user (i.e. the web server
5164
5330
  system administrator), but sometimes it is desirable to know what is going on.
5165
5331
  This section describes a few things that Phusion Passenger does under the hood.</p></div>
5166
5332
  <div class="sect2">
5167
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_static_assets_serving" data-comment-topic="static-assets-serving-wo2d9v">9.1. Static assets serving</h3>
5333
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_static_assets_serving"></span><h3 data-comment-topic="static-assets-serving-wo2d9v" data-anchor="_static_assets_serving">9.1. Static assets serving</h3>
5168
5334
  <div class="paragraph"><p>Phusion Passenger accelerates serving of static files. This means that, if an URI
5169
5335
  maps to a file that exists, then Phusion Passenger will let Apache serve that file
5170
5336
  directly, without hitting the web application.</p></div>
@@ -5184,7 +5350,7 @@ RewriteRule ^(.*)$ balancer://mongrel%{REQUEST_URI} [P,QSA,L]</pre>
5184
5350
  them.</p></div>
5185
5351
  </div>
5186
5352
  <div class="sect2">
5187
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_page_caching_support" data-comment-topic="page-caching-support-kwq9b9">9.2. Page caching support</h3>
5353
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_page_caching_support"></span><h3 data-comment-topic="page-caching-support-kwq9b9" data-anchor="_page_caching_support">9.2. Page caching support</h3>
5188
5354
  <div class="paragraph"><p>For each HTTP request, Phusion Passenger will automatically look for a corresponding
5189
5355
  page cache file, and serve that if it exists. It does this by appending ".html" to
5190
5356
  the filename that the URI normally maps to, and checking whether that file exists.
@@ -5192,7 +5358,7 @@ This check occurs after checking whether the original mapped filename exists (as
5192
5358
  of static asset serving). All this is done without the need for special mod_rewrite
5193
5359
  rules.</p></div>
5194
5360
  <div class="paragraph"><p>For example, suppose that the browser requests <em>/foo/bar</em>.</p></div>
5195
- <div class="olist arabic"><ol class="arabic">
5361
+ <div class="olist arabic"><ol class="arabic">
5196
5362
  <li>
5197
5363
  <p>
5198
5364
  Phusion Passenger will first check whether this URI maps to a static file, i.e.
@@ -5220,7 +5386,7 @@ the <em>public</em> directory. In that case you’ll need to use mod_rewrite to
5220
5386
  page cache files.</p></div>
5221
5387
  </div>
5222
5388
  <div class="sect2">
5223
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="application_detection" data-comment-topic="how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-179mp8m">9.3. How Phusion Passenger detects whether a virtual host is a web application</h3>
5389
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="application_detection"></span><h3 data-comment-topic="how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-179mp8m" data-anchor="application_detection">9.3. How Phusion Passenger detects whether a virtual host is a web application</h3>
5224
5390
  <div class="paragraph"><p>After you’ve read the deployment instructions you might wonder how Phusion Passenger
5225
5391
  knows that the DocumentRoot points to a web application that Phusion Passenger is
5226
5392
  able to serve, and how it knows what kind of web application it is (e.g. Rails or Rack).</p></div>
@@ -5233,7 +5399,7 @@ whether the following file exists:</p></div>
5233
5399
  </div>
5234
5400
  <div class="paragraph"><p>If you’re not a programmer and don’t understand the above pseudo-code snippet, it means
5235
5401
  that Phusion Passenger will:</p></div>
5236
- <div class="olist arabic"><ol class="arabic">
5402
+ <div class="olist arabic"><ol class="arabic">
5237
5403
  <li>
5238
5404
  <p>
5239
5405
  Extract the parent directory filename from the value of the DocumentRoot directory.
@@ -5269,28 +5435,30 @@ Phusion Passenger will look for <em>config.ru</em> instead of <em>config/environ
5269
5435
  </div>
5270
5436
  </div>
5271
5437
  <div class="sect1">
5272
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_appendix_a_about_this_document" data-comment-topic="appendix-a-about-this-document-103toqs">10. Appendix A: About this document</h2>
5438
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_appendix_a_about_this_document"></span><h2 data-comment-topic="appendix-a-about-this-document-103toqs" data-anchor="_appendix_a_about_this_document">10. Appendix A: About this document</h2>
5273
5439
  <div class="sectionbody">
5274
5440
  <div class="paragraph"><p>The text of this document is licensed under the
5275
5441
  <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons
5276
5442
  Attribution-Share Alike 3.0 Unported License</a>.</p></div>
5277
5443
  <div class="paragraph"><p><span class="image">
5278
5444
  <a class="image" href="http://creativecommons.org/licenses/by-sa/3.0/">
5279
- <img src="images/by_sa.png" alt="images/by_sa.png"></a>
5445
+ <img src="images/by_sa.png" alt="images/by_sa.png">
5446
+ </a>
5280
5447
  </span></p></div>
5281
5448
  <div class="paragraph"><p>Phusion Passenger is brought to you by <a href="http://www.phusion.nl/">Phusion</a>.</p></div>
5282
5449
  <div class="paragraph"><p><span class="image">
5283
5450
  <a class="image" href="http://www.phusion.nl/">
5284
- <img src="images/phusion_banner.png" alt="images/phusion_banner.png"></a>
5451
+ <img src="images/phusion_banner.png" alt="images/phusion_banner.png">
5452
+ </a>
5285
5453
  </span></p></div>
5286
5454
  <div class="paragraph"><p>Phusion Passenger is a trademark of Hongli Lai &amp; Ninh Bui.</p></div>
5287
5455
  </div>
5288
5456
  </div>
5289
5457
  <div class="sect1">
5290
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="_appendix_b_terminology" data-comment-topic="appendix-b-terminology-h4eaf4">11. Appendix B: Terminology</h2>
5458
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_appendix_b_terminology"></span><h2 data-comment-topic="appendix-b-terminology-h4eaf4" data-anchor="_appendix_b_terminology">11. Appendix B: Terminology</h2>
5291
5459
  <div class="sectionbody">
5292
5460
  <div class="sect2">
5293
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="application_root" data-comment-topic="application-root-otx6xf">11.1. Application root</h3>
5461
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="application_root"></span><h3 data-comment-topic="application-root-otx6xf" data-anchor="application_root">11.1. Application root</h3>
5294
5462
  <div class="paragraph"><p>The root directory of an application that’s served by Phusion Passenger.</p></div>
5295
5463
  <div class="paragraph"><p>In case of Ruby on Rails applications, this is the directory that contains
5296
5464
  <em>Rakefile</em>, <em>app/</em>, <em>config/</em>, <em>public/</em>, etc. In other words, the directory
@@ -5352,17 +5520,17 @@ For example, take the following directory structure:</p></div>
5352
5520
  </div>
5353
5521
  </div>
5354
5522
  <div class="sect2">
5355
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="idle_process" data-comment-topic="idle-process-potb6g">11.2. Idle process</h3>
5523
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="idle_process"></span><h3 data-comment-topic="idle-process-potb6g" data-anchor="idle_process">11.2. Idle process</h3>
5356
5524
  <div class="paragraph"><p>An "idle process" refers to a process that hasn’t processed any requests for a while.</p></div>
5357
5525
  </div>
5358
5526
  <div class="sect2">
5359
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="inactive_process" data-comment-topic="inactive-process-16gjv2e">11.3. Inactive process</h3>
5527
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="inactive_process"></span><h3 data-comment-topic="inactive-process-16gjv2e" data-anchor="inactive_process">11.3. Inactive process</h3>
5360
5528
  <div class="paragraph"><p>An "inactive process" refers to a process that’s current not processing any requests. An idle process is always inactive, but an inactive process is not always considered idle.</p></div>
5361
5529
  </div>
5362
5530
  </div>
5363
5531
  </div>
5364
5532
  <div class="sect1">
5365
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h2 id="spawning_methods_explained" data-comment-topic="appendix-c-spawning-methods-explained-owghi9">12. Appendix C: Spawning methods explained</h2>
5533
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="spawning_methods_explained"></span><h2 data-comment-topic="appendix-c-spawning-methods-explained-owghi9" data-anchor="spawning_methods_explained">12. Appendix C: Spawning methods explained</h2>
5366
5534
  <div class="sectionbody">
5367
5535
  <div class="paragraph"><p>At its core, Phusion Passenger is an HTTP proxy and process manager. It spawns
5368
5536
  Ruby on Rails/Rack/WSGI worker processes (which may also be referred to as
@@ -5372,7 +5540,7 @@ processes.</p></div>
5372
5540
  Let’s go over the different spawning methods. For simplicity’s sake, let’s
5373
5541
  assume that we’re only talking about Ruby on Rails applications.</p></div>
5374
5542
  <div class="sect2">
5375
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_the_most_straightforward_and_traditional_way_conservative_spawning" data-comment-topic="the-most-straightforward-and-traditional-way-conservative-spawning-1ybbli2">12.1. The most straightforward and traditional way: conservative spawning</h3>
5543
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_the_most_straightforward_and_traditional_way_conservative_spawning"></span><h3 data-comment-topic="the-most-straightforward-and-traditional-way-conservative-spawning-1ybbli2" data-anchor="_the_most_straightforward_and_traditional_way_conservative_spawning">12.1. The most straightforward and traditional way: conservative spawning</h3>
5376
5544
  <div class="paragraph"><p>Phusion Passenger could create a new Ruby process, which will then load the
5377
5545
  Rails application along with the entire Rails framework. This process will then
5378
5546
  enter an request handling main loop.</p></div>
@@ -5389,20 +5557,22 @@ other hand creates processes that reuse the already loaded Ruby interpreter. In
5389
5557
  programmers jargon, Phusion Passenger calls fork(), but not exec().</p></div>
5390
5558
  </div>
5391
5559
  <div class="sect2">
5392
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_the_smart_spawning_method" data-comment-topic="the-smart-spawning-method-1cvu9dd">12.2. The smart spawning method</h3>
5560
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_the_smart_spawning_method"></span><h3 data-comment-topic="the-smart-spawning-method-1cvu9dd" data-anchor="_the_smart_spawning_method">12.2. The smart spawning method</h3>
5393
5561
  <div class="admonitionblock">
5394
- <table><tr>
5562
+ <table><tr>
5395
5563
  <td class="icon">
5396
- <img src="./images/icons/note.png" alt="Note">
5564
+ <img src="./images/icons/note.png" alt="Note">
5397
5565
  </td>
5398
5566
  <td class="content">Smart spawning is supported for all Ruby applications but not for WSGI applications.</td>
5399
- </tr></table>
5567
+ </tr></table>
5400
5568
  </div>
5401
5569
  <div class="paragraph"><p>While conservative spawning works well, it’s not as efficient as it could be
5402
5570
  because each worker process has its own private copy of the Rails application
5403
5571
  as well as the Rails framework. This wastes memory as well as startup time.</p></div>
5404
5572
  <div class="paragraph"><p><span class="image">
5405
- <img src="images/conservative_spawning.png" alt="Worker processes and conservative spawning"></span><br><em>Figure: Worker processes and conservative spawning. Each worker process has its
5573
+ <img src="images/conservative_spawning.png" alt="Worker processes and conservative spawning">
5574
+ </span><br>
5575
+ <em>Figure: Worker processes and conservative spawning. Each worker process has its
5406
5576
  own private copy of the application code and Rails framework code.</em></p></div>
5407
5577
  <div class="paragraph"><p>It is possible to make the different worker processes share the memory occupied
5408
5578
  by application and Rails framework code, by utilizing so-called
@@ -5410,7 +5580,7 @@ copy-on-write semantics of the virtual memory system on modern operating
5410
5580
  systems. As a side effect, the startup time is also reduced. This is technique
5411
5581
  is exploited by Phusion Passenger’s <em>smart</em> and <em>smart-lv2</em> spawn methods.</p></div>
5412
5582
  <div class="sect3">
5413
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_how_it_works" data-comment-topic="how-it-works-672zja">12.2.1. How it works</h4>
5583
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_how_it_works"></span><h4 data-comment-topic="how-it-works-672zja" data-anchor="_how_it_works">12.2.1. How it works</h4>
5414
5584
  <div class="paragraph"><p>When the <em>smart-lv2</em> spawn method is being used, Phusion Passenger will first
5415
5585
  create a so-called <em>ApplicationSpawner server</em> process. This process loads the
5416
5586
  entire Rails application along with the Rails framework, by loading
@@ -5426,7 +5596,9 @@ processes will share as much common
5426
5596
  memory as possible. That is, they will all share the same application and Rails
5427
5597
  framework code.</p></div>
5428
5598
  <div class="paragraph"><p><span class="image">
5429
- <img src="images/smart-lv2.png" alt="images/smart-lv2.png"></span><br><em>Figure: Worker processes and the smart-lv2 spawn method. All worker processes,
5599
+ <img src="images/smart-lv2.png" alt="images/smart-lv2.png">
5600
+ </span><br>
5601
+ <em>Figure: Worker processes and the smart-lv2 spawn method. All worker processes,
5430
5602
  as well as the ApplicationSpawner, share the same application code and Rails
5431
5603
  framework code.</em></p></div>
5432
5604
  <div class="paragraph"><p>The <em>smart</em> spawn method goes even further, by caching the Rails framework in
@@ -5441,7 +5613,7 @@ application to share memory. The <em>smart</em> method allows different worker
5441
5613
  processes - that happen to use the same Rails version - to share memory, even if
5442
5614
  they don’t belong to the same application.</p></div>
5443
5615
  <div class="paragraph"><p>Notes:</p></div>
5444
- <div class="ulist"><ul>
5616
+ <div class="ulist"><ul>
5445
5617
  <li>
5446
5618
  <p>
5447
5619
  Vendored Rails frameworks cannot be shared by different applications, even if
@@ -5460,10 +5632,10 @@ ApplicationSpawner and FrameworkSpawner servers have an idle timeout just
5460
5632
  </ul></div>
5461
5633
  </div>
5462
5634
  <div class="sect3">
5463
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_summary_of_benefits" data-comment-topic="summary-of-benefits-1yrihfb">12.2.2. Summary of benefits</h4>
5635
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_summary_of_benefits"></span><h4 data-comment-topic="summary-of-benefits-1yrihfb" data-anchor="_summary_of_benefits">12.2.2. Summary of benefits</h4>
5464
5636
  <div class="paragraph"><p>Suppose that Phusion Passenger needs a new worker process for an application
5465
5637
  that uses Rails 2.2.1.</p></div>
5466
- <div class="ulist"><ul>
5638
+ <div class="ulist"><ul>
5467
5639
  <li>
5468
5640
  <p>
5469
5641
  If the <em>smart-lv2</em> spawning method is used, and an ApplicationSpawner server
@@ -5497,7 +5669,7 @@ gotchas you can easily reap the benefits of smart spawning.</p></div>
5497
5669
  </div>
5498
5670
  </div>
5499
5671
  <div class="sect2">
5500
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing" data-comment-topic="smart-spawning-gotcha-1-unintentional-file-descriptor-sharing-z1y55l">12.3. Smart spawning gotcha #1: unintentional file descriptor sharing</h3>
5672
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing"></span><h3 data-comment-topic="smart-spawning-gotcha-1-unintentional-file-descriptor-sharing-z1y55l" data-anchor="_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing">12.3. Smart spawning gotcha #1: unintentional file descriptor sharing</h3>
5501
5673
  <div class="paragraph"><p>Because worker processes are created by forking from an ApplicationSpawner
5502
5674
  server, it will share all file descriptors that are opened by the
5503
5675
  ApplicationSpawner server. (This is part of the semantics of the Unix
@@ -5533,7 +5705,7 @@ http://www.gnu.org/software/src-highlite -->
5533
5705
  database upon creating a new worker process, which is why you normally do not
5534
5706
  encounter any database issues when using smart spawning mode.</p></div>
5535
5707
  <div class="sect3">
5536
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_example_1_memcached_connection_sharing_harmful" data-comment-topic="example-1-memcached-connection-sharing-harmful--c71wqw">12.3.1. Example 1: Memcached connection sharing (harmful)</h4>
5708
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_example_1_memcached_connection_sharing_harmful"></span><h4 data-comment-topic="example-1-memcached-connection-sharing-harmful--c71wqw" data-anchor="_example_1_memcached_connection_sharing_harmful">12.3.1. Example 1: Memcached connection sharing (harmful)</h4>
5537
5709
  <div class="paragraph"><p>Suppose we have a Rails application that connects to a Memcached server in
5538
5710
  <em>environment.rb</em>. This causes the ApplicationSpawner to have a socket connection
5539
5711
  (file descriptor) to the Memcached server, as shown in the following figure:</p></div>
@@ -5632,7 +5804,7 @@ http://www.gnu.org/software/src-highlite -->
5632
5804
  </div>
5633
5805
  </div>
5634
5806
  <div class="sect3">
5635
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h4 id="_example_2_log_file_sharing_not_harmful" data-comment-topic="example-2-log-file-sharing-not-harmful--1p2yuol">12.3.2. Example 2: Log file sharing (not harmful)</h4>
5807
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_example_2_log_file_sharing_not_harmful"></span><h4 data-comment-topic="example-2-log-file-sharing-not-harmful--1p2yuol" data-anchor="_example_2_log_file_sharing_not_harmful">12.3.2. Example 2: Log file sharing (not harmful)</h4>
5636
5808
  <div class="paragraph"><p>There are also cases in which unintentional file descriptor sharing is not harmful.
5637
5809
  One such case is log file file descriptor sharing. Even if two processes write
5638
5810
  to the log file at the same time, the worst thing that can happen is that the
@@ -5644,7 +5816,7 @@ Memcached example, doesn’t help.</p></div>
5644
5816
  </div>
5645
5817
  </div>
5646
5818
  <div class="sect2">
5647
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_smart_spawning_gotcha_2_the_need_to_revive_threads" data-comment-topic="smart-spawning-gotcha-2-the-need-to-revive-threads-1k6cj7d">12.4. Smart spawning gotcha #2: the need to revive threads</h3>
5819
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_smart_spawning_gotcha_2_the_need_to_revive_threads"></span><h3 data-comment-topic="smart-spawning-gotcha-2-the-need-to-revive-threads-1k6cj7d" data-anchor="_smart_spawning_gotcha_2_the_need_to_revive_threads">12.4. Smart spawning gotcha #2: the need to revive threads</h3>
5648
5820
  <div class="paragraph"><p>Another part of the <em>fork()</em> system call’s semantics is the fact that threads
5649
5821
  disappear after a fork call. So if you’ve created any threads in environment.rb,
5650
5822
  then those threads will no longer be running in newly created worker process.
@@ -5670,7 +5842,7 @@ http://www.gnu.org/software/src-highlite -->
5670
5842
  </div>
5671
5843
  </div>
5672
5844
  <div class="sect2">
5673
- <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><h3 id="_smart_spawning_gotcha_3_code_load_order" data-comment-topic="smart-spawning-gotcha-3-code-load-order-nkotiy">12.5. Smart spawning gotcha #3: code load order</h3>
5845
+ <a href="javascript:void(0)" class="comments empty" title="Add a comment"><span class="count"></span></a><span class="anchor_helper" id="_smart_spawning_gotcha_3_code_load_order"></span><h3 data-comment-topic="smart-spawning-gotcha-3-code-load-order-nkotiy" data-anchor="_smart_spawning_gotcha_3_code_load_order">12.5. Smart spawning gotcha #3: code load order</h3>
5674
5846
  <div class="paragraph"><p>This gotcha is only applicable to the <em>smart</em> spawn method, not the <em>smart-lv2</em>
5675
5847
  spawn method.</p></div>
5676
5848
  <div class="paragraph"><p>If your application expects the Rails framework to be not loaded during the
@@ -5692,9 +5864,7 @@ has no effect.</p></div>
5692
5864
  </div>
5693
5865
  <div id="footnotes"><hr></div>
5694
5866
  <div id="footer">
5695
- <div id="footer-text">
5696
- Last updated 2013-01-08 23:47:06 CET
5697
- </div>
5867
+
5698
5868
  </div>
5699
5869
  <script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */
5700
5870
  (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
@@ -6031,6 +6201,7 @@ Mizuho.initializeTopBar = $.proxy(function() {
6031
6201
  var isMobileDevice = this.isMobileDevice();
6032
6202
  var timerId;
6033
6203
 
6204
+ // Create the floating table of contents used in the top bar.
6034
6205
  var $floattoc = $('<div id="floattoc"></div>').html($('#toc').html());
6035
6206
  $floattoc.find('#toctitle').remove();
6036
6207
  $floattoc.find('.comments').remove();
@@ -6049,6 +6220,8 @@ Mizuho.initializeTopBar = $.proxy(function() {
6049
6220
  self.internalLinkClicked(this, event);
6050
6221
  });
6051
6222
 
6223
+ // Callback for when the user clicks on the Table of Contents
6224
+ // button on the top bar.
6052
6225
  function showFloatingToc() {
6053
6226
  var scrollUpdateTimerId;
6054
6227
 
@@ -6141,6 +6314,9 @@ Mizuho.initializeTopBar = $.proxy(function() {
6141
6314
  $window.bind('scroll', onScroll);
6142
6315
  }
6143
6316
 
6317
+ // Called whenever the user scrolls. Updates the title of the
6318
+ // Table of Contents button in the top bar to the section that
6319
+ // the user is currently reading.
6144
6320
  function update() {
6145
6321
  if ($title.offset().top + $title.height() < $document.scrollTop()) {
6146
6322
  if (!$topbar.is(':visible')) {
@@ -6184,6 +6360,7 @@ Mizuho.initializeTopBar = $.proxy(function() {
6184
6360
  }, 100);
6185
6361
  }
6186
6362
 
6363
+
6187
6364
  if (isMobileDevice) {
6188
6365
  // Mobile devices don't support position fixed.
6189
6366
  $topbar.css('position', 'absolute');
@@ -6367,5 +6544,5 @@ Mizuho.topicListReceived = $.proxy(function(result) {
6367
6544
  $(document).ready(Mizuho.initializeCommenting);
6368
6545
 
6369
6546
  </script>
6370
- </body>
6547
+ </body>
6371
6548
  </html>