passenger 3.9.2.beta → 4.0.0.rc4

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.

Files changed (159) hide show
  1. data/.travis.yml +3 -0
  2. data/NEWS +77 -7
  3. data/README.md +3 -11
  4. data/bin/passenger-install-apache2-module +24 -20
  5. data/bin/passenger-install-nginx-module +25 -23
  6. data/build/agents.rb +11 -0
  7. data/build/apache2.rb +9 -5
  8. data/build/basics.rb +37 -30
  9. data/build/common_library.rb +4 -1
  10. data/build/cplusplus_support.rb +5 -5
  11. data/build/cxx_tests.rb +28 -8
  12. data/build/integration_tests.rb +6 -3
  13. data/build/nginx.rb +3 -3
  14. data/build/packaging.rb +95 -57
  15. data/build/ruby_extension.rb +34 -21
  16. data/build/ruby_tests.rb +4 -2
  17. data/build/test_basics.rb +1 -1
  18. data/dev/run_travis.sh +36 -1
  19. data/doc/Users guide Apache.html +425 -308
  20. data/doc/Users guide Apache.idmap.txt +78 -70
  21. data/doc/Users guide Apache.index.sqlite3 +0 -0
  22. data/doc/Users guide Apache.txt +33 -92
  23. data/doc/Users guide Nginx.html +519 -220
  24. data/doc/Users guide Nginx.idmap.txt +78 -60
  25. data/doc/Users guide Nginx.txt +115 -26
  26. data/doc/Users guide Standalone.html +8 -2
  27. data/doc/users_guide_snippets/analysis_and_system_maintenance.txt +1 -7
  28. data/doc/users_guide_snippets/installation.txt +167 -22
  29. data/doc/users_guide_snippets/rackup_specifications.txt +4 -0
  30. data/doc/users_guide_snippets/since_version.txt +1 -0
  31. data/doc/users_guide_snippets/support_information.txt +3 -7
  32. data/doc/users_guide_snippets/tips.txt +0 -24
  33. data/ext/apache2/Configuration.cpp +11 -33
  34. data/ext/apache2/Configuration.hpp +3 -18
  35. data/ext/apache2/DirectoryMapper.h +20 -70
  36. data/ext/apache2/Hooks.cpp +2 -2
  37. data/ext/common/AgentsStarter.cpp +0 -2
  38. data/ext/common/AgentsStarter.h +0 -1
  39. data/ext/common/AgentsStarter.hpp +1 -3
  40. data/ext/common/ApplicationPool2/AppTypes.cpp +74 -0
  41. data/ext/common/ApplicationPool2/AppTypes.h +202 -0
  42. data/ext/common/ApplicationPool2/Common.h +12 -10
  43. data/ext/common/ApplicationPool2/DirectSpawner.h +256 -0
  44. data/ext/common/ApplicationPool2/DummySpawner.h +90 -0
  45. data/ext/common/ApplicationPool2/Group.h +311 -94
  46. data/ext/common/ApplicationPool2/Implementation.cpp +405 -145
  47. data/ext/common/ApplicationPool2/Options.h +24 -26
  48. data/ext/common/ApplicationPool2/PipeWatcher.h +20 -13
  49. data/ext/common/ApplicationPool2/Pool.h +326 -183
  50. data/ext/common/ApplicationPool2/Process.h +205 -55
  51. data/ext/common/ApplicationPool2/README.md +1 -1
  52. data/ext/common/ApplicationPool2/Session.h +21 -10
  53. data/ext/common/ApplicationPool2/SmartSpawner.h +801 -0
  54. data/ext/common/ApplicationPool2/Spawner.h +141 -1149
  55. data/ext/common/ApplicationPool2/SpawnerFactory.h +132 -0
  56. data/ext/common/ApplicationPool2/SuperGroup.h +146 -223
  57. data/ext/common/Constants.h +4 -2
  58. data/ext/common/Exceptions.h +23 -1
  59. data/ext/common/Logging.cpp +17 -6
  60. data/ext/common/Logging.h +37 -7
  61. data/ext/common/ResourceLocator.h +1 -1
  62. data/ext/common/Utils.cpp +49 -1
  63. data/ext/common/Utils.h +13 -4
  64. data/ext/common/{AnsiColorConstants.h → Utils/AnsiColorConstants.h} +0 -0
  65. data/ext/common/{BCrypt.cpp → Utils/BCrypt.cpp} +0 -0
  66. data/ext/common/{BCrypt.h → Utils/BCrypt.h} +0 -0
  67. data/ext/common/{Blowfish.c → Utils/Blowfish.c} +0 -0
  68. data/ext/common/{Blowfish.h → Utils/Blowfish.h} +0 -0
  69. data/ext/common/Utils/CachedFileStat.hpp +27 -25
  70. data/ext/common/Utils/Curl.h +184 -0
  71. data/ext/common/{HttpConstants.h → Utils/HttpConstants.h} +3 -0
  72. data/ext/common/Utils/IOUtils.cpp +6 -2
  73. data/ext/common/{IniFile.h → Utils/IniFile.h} +0 -0
  74. data/ext/common/Utils/LargeFiles.cpp +30 -0
  75. data/ext/common/Utils/LargeFiles.h +40 -0
  76. data/ext/common/Utils/StrIntUtils.cpp +72 -8
  77. data/ext/common/Utils/StrIntUtils.h +24 -2
  78. data/ext/common/Utils/StringMap.h +12 -2
  79. data/ext/common/Utils/VariantMap.h +51 -2
  80. data/ext/common/Utils/jsoncpp.cpp +1 -1
  81. data/ext/common/agents/Base.cpp +147 -11
  82. data/ext/common/agents/HelperAgent/AgentOptions.h +14 -6
  83. data/ext/common/agents/HelperAgent/Main.cpp +79 -19
  84. data/ext/common/agents/HelperAgent/RequestHandler.h +36 -16
  85. data/ext/common/agents/LoggingAgent/LoggingServer.h +3 -5
  86. data/ext/common/agents/LoggingAgent/Main.cpp +2 -4
  87. data/ext/common/agents/LoggingAgent/RemoteSender.h +18 -24
  88. data/ext/common/agents/SpawnPreparer.cpp +7 -0
  89. data/ext/common/agents/Watchdog/Main.cpp +96 -38
  90. data/ext/nginx/Configuration.c +26 -22
  91. data/ext/nginx/Configuration.h +4 -2
  92. data/ext/nginx/ContentHandler.c +23 -52
  93. data/ext/nginx/ContentHandler.h +5 -11
  94. data/ext/nginx/config +10 -3
  95. data/ext/nginx/ngx_http_passenger_module.c +21 -6
  96. data/ext/nginx/ngx_http_passenger_module.h +4 -1
  97. data/ext/oxt/dynamic_thread_group.hpp +9 -1
  98. data/ext/oxt/system_calls.cpp +2 -2
  99. data/ext/ruby/extconf.rb +2 -1
  100. data/helper-scripts/backtrace-sanitizer.rb +2 -0
  101. data/helper-scripts/wsgi-loader.py +54 -21
  102. data/lib/phusion_passenger.rb +5 -3
  103. data/lib/phusion_passenger/abstract_installer.rb +18 -41
  104. data/lib/phusion_passenger/admin_tools/memory_stats.rb +2 -2
  105. data/lib/phusion_passenger/admin_tools/server_instance.rb +2 -2
  106. data/lib/phusion_passenger/common_library.rb +23 -3
  107. data/lib/phusion_passenger/debug_logging.rb +10 -3
  108. data/lib/phusion_passenger/packaging.rb +1 -0
  109. data/lib/phusion_passenger/platform_info.rb +113 -115
  110. data/lib/phusion_passenger/platform_info/compiler.rb +224 -134
  111. data/lib/phusion_passenger/platform_info/cxx_portability.rb +143 -0
  112. data/lib/phusion_passenger/platform_info/depcheck.rb +371 -0
  113. data/lib/phusion_passenger/platform_info/depcheck_specs/apache2.rb +124 -0
  114. data/lib/phusion_passenger/platform_info/depcheck_specs/compiler_toolchain.rb +97 -0
  115. data/lib/phusion_passenger/platform_info/depcheck_specs/gems.rb +39 -0
  116. data/lib/phusion_passenger/platform_info/depcheck_specs/libs.rb +118 -0
  117. data/lib/phusion_passenger/platform_info/depcheck_specs/ruby.rb +137 -0
  118. data/lib/phusion_passenger/platform_info/depcheck_specs/utilities.rb +15 -0
  119. data/lib/phusion_passenger/platform_info/operating_system.rb +6 -5
  120. data/lib/phusion_passenger/platform_info/ruby.rb +45 -34
  121. data/lib/phusion_passenger/request_handler.rb +35 -22
  122. data/lib/phusion_passenger/request_handler/thread_handler.rb +5 -6
  123. data/lib/phusion_passenger/ruby_core_enhancements.rb +7 -1
  124. data/lib/phusion_passenger/standalone/runtime_installer.rb +43 -34
  125. data/lib/phusion_passenger/utils/robust_interruption.rb +34 -18
  126. data/passenger.gemspec +25 -0
  127. data/resources/templates/standalone/config.erb +3 -1
  128. data/test/config.json.travis +2 -2
  129. data/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp +37 -5
  130. data/test/cxx/ApplicationPool2/PoolTest.cpp +143 -50
  131. data/test/cxx/ApplicationPool2/ProcessTest.cpp +8 -0
  132. data/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp +28 -17
  133. data/test/cxx/ApplicationPool2/SpawnerTestCases.cpp +31 -26
  134. data/test/cxx/RequestHandlerTest.cpp +17 -1
  135. data/test/cxx/UtilsTest.cpp +84 -10
  136. data/test/integration_tests/apache2_tests.rb +49 -163
  137. data/test/integration_tests/hello_world_wsgi_spec.rb +2 -2
  138. data/test/integration_tests/mycook_spec.rb +1 -1
  139. data/test/integration_tests/nginx_tests.rb +37 -19
  140. data/test/ruby/request_handler_spec.rb +1 -0
  141. data/test/ruby/spec_helper.rb +52 -1
  142. data/test/stub/nginx/nginx.conf.erb +2 -0
  143. data/test/stub/rack/start.rb +5 -0
  144. data/test/stub/rails3.0/Gemfile.lock +30 -30
  145. data/test/stub/rails3.1/Gemfile +1 -1
  146. data/test/stub/rails3.1/Gemfile.lock +3 -3
  147. data/test/stub/rails3.2/Gemfile +1 -1
  148. data/test/stub/rails3.2/Gemfile.lock +4 -4
  149. data/test/stub/rails_apps/2.3/mycook/app/controllers/welcome_controller.rb +1 -1
  150. data/test/stub/rails_apps/2.3/mycook/app/helpers/recipes_helper.rb +2 -0
  151. data/test/stub/rails_apps/2.3/mycook/app/helpers/test_helper.rb +2 -0
  152. data/test/stub/rails_apps/2.3/mycook/app/helpers/uploads_helper.rb +2 -0
  153. data/test/stub/rails_apps/2.3/mycook/app/helpers/welcome_helper.rb +2 -0
  154. data/test/support/nginx_controller.rb +2 -1
  155. metadata +160 -156
  156. data/build/gempackagetask.rb +0 -99
  157. data/build/packagetask.rb +0 -186
  158. data/ext/common/StringListCreator.h +0 -83
  159. data/lib/phusion_passenger/dependencies.rb +0 -657
@@ -20,25 +20,37 @@
20
20
 
21
21
  2. Installation => installing-phusion-passenger-hn03ac
22
22
 
23
- 2.1. Generic installation, upgrade and downgrade method: via RubyGems => generic-installation-upgrade-and-downgrade-method-via-rubygems-76uol7
23
+ 2.1. Synopsis => synopsis-1uu3sqp
24
24
 
25
- 2.2. Generic installation, upgrade and downgrade method: via tarball => generic-installation-upgrade-and-downgrade-method-via-tarball-2gkx43
25
+ 2.2. Generic installation, upgrade and downgrade method: via RubyGems => generic-installation-upgrade-and-downgrade-method-via-rubygems-76uol7
26
26
 
27
- 2.3. Installing or upgrading on Ubuntu => installing-or-upgrading-on-ubuntu-fw5fvp
27
+ 2.3. Generic installation, upgrade and downgrade method: via tarball => generic-installation-upgrade-and-downgrade-method-via-tarball-2gkx43
28
28
 
29
- 2.4. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux => installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1uus5a1
29
+ 2.4. Installing or upgrading on Debian 6 or Ubuntu => installing-or-upgrading-on-ubuntu-fw5fvp
30
30
 
31
- 2.5. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-1a58c2b
31
+ 2.5. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux => installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1uus5a1
32
32
 
33
- 2.6. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-834ymv
33
+ 2.6. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-1a58c2b
34
34
 
35
- 2.7. Installing as a normal Nginx module without using the installer => installing-as-a-normal-nginx-module-without-using-the-installer-1kkpes5
35
+ 2.7. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-834ymv
36
36
 
37
- 2.8. Disabling without uninstalling => disabling-without-uninstalling-1t5tqan
37
+ 2.8. Customizing the compilation process => customizing-the-compilation-process-u4cdcf
38
38
 
39
- 2.9. Uninstalling => uninstalling-phusion-passenger-wuycvb
39
+ 2.8.1. Setting the compiler => setting-the-compiler-1l6dpe1
40
40
 
41
- 2.10. Moving to a different directory => moving-to-a-different-directory-gif3wo
41
+ 2.8.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-1jehjon
42
+
43
+ 2.8.3. Forcing location of certain command line tools => forcing-location-of-certain-command-line-tools-1j93cki
44
+
45
+ 2.9. Installing as a normal Nginx module without using the installer => installing-as-a-normal-nginx-module-without-using-the-installer-1kkpes5
46
+
47
+ 2.10. Creating an Nginx init script => creating-an-nginx-init-script-1kd8zg5
48
+
49
+ 2.11. Disabling without uninstalling => disabling-without-uninstalling-1t5tqan
50
+
51
+ 2.12. Uninstalling => uninstalling-phusion-passenger-wuycvb
52
+
53
+ 2.13. Moving to a different directory => moving-to-a-different-directory-gif3wo
42
54
 
43
55
  3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3) application => deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-application-b69gqa
44
56
 
@@ -90,93 +102,101 @@
90
102
 
91
103
  6.2. passenger_ruby <filename> => passenger-ruby-filename--1gnok5k
92
104
 
93
- 6.3. passenger_spawn_method <string> => passenger-spawn-method-string--1sc6njl
105
+ 6.3. passenger_python <filename> => passenger-python-filename--14p554
94
106
 
95
- 6.4. passenger_rolling_restarts <on|off> => passenger-rolling-restarts
107
+ 6.4. passenger_app_root <path/to/root> => passenger-app-root-path-to-root--1dbudc6
96
108
 
97
- 6.5. passenger_resist_deployment_errors <on|off> => passenger-resist-deployment-errors-on-off--k9yf1
109
+ 6.5. passenger_spawn_method <string> => passenger-spawn-method-string--1sc6njl
98
110
 
99
- 6.6. Important deployment options => important-deployment-options-av567
111
+ 6.6. passenger_rolling_restarts <on|off> => passenger-rolling-restarts
100
112
 
101
- 6.6.1. passenger_enabled <on|off> => passenger-enabled-on-off--1rpb2t7
113
+ 6.7. passenger_resist_deployment_errors <on|off> => passenger-resist-deployment-errors-on-off--k9yf1
102
114
 
103
- 6.6.2. passenger_base_uri <uri> => passenger-base-uri-uri--1xtuo50
115
+ 6.8. passenger_temp_dir <directory> => passenger-temp-dir-directory--1t3opri
104
116
 
105
- 6.7. Connection handling options => connection-handling-options-8jgq90
117
+ 6.9. Important deployment options => important-deployment-options-av567
106
118
 
107
- 6.7.1. passenger_ignore_client_abort <on|off> => passenger-ignore-client-abort
119
+ 6.9.1. passenger_enabled <on|off> => passenger-enabled-on-off--1rpb2t7
108
120
 
109
- 6.7.2. passenger_set_cgi_param <CGI environment name> <value> => passenger-set-cgi-param-cgi-environment-name-value--rx9gc0
121
+ 6.9.2. passenger_base_uri <uri> => passenger-base-uri-uri--1xtuo50
110
122
 
111
- 6.7.3. passenger_pass_header <header name> => passenger-pass-header-header-name--1cg31je
123
+ 6.10. Connection handling options => connection-handling-options-8jgq90
112
124
 
113
- 6.7.4. passenger_buffer_response <on|off> => passenger-buffer-response
125
+ 6.10.1. passenger_ignore_client_abort <on|off> => passenger-ignore-client-abort
114
126
 
115
- 6.7.5. passenger_buffer_size => passenger-buffer-size-1jfkq87
127
+ 6.10.2. passenger_set_cgi_param <CGI environment name> <value> => passenger-set-cgi-param-cgi-environment-name-value--rx9gc0
116
128
 
117
- 6.7.6. passenger_buffers => passenger-busy-buffers
129
+ 6.10.3. passenger_pass_header <header name> => passenger-pass-header-header-name--1cg31je
118
130
 
119
- 6.7.7. passenger_busy_buffer_size => passenger-busy-buffer-size-124sj61
131
+ 6.10.4. passenger_buffer_response <on|off> => passenger-buffer-response
120
132
 
121
- 6.8. Security options => security-options-1bv93g4
133
+ 6.10.5. passenger_buffer_size => passenger-buffer-size-1jfkq87
122
134
 
123
- 6.8.1. passenger_user_switching <on|off> => passenger-user-switching-on-off--1p37u3l
135
+ 6.10.6. passenger_buffers => passenger-busy-buffers
124
136
 
125
- 6.8.2. passenger_user <username> => passenger-user-username--b06ur7
137
+ 6.10.7. passenger_busy_buffer_size => passenger-busy-buffer-size-124sj61
126
138
 
127
- 6.8.3. passenger_group <group name> => passenger-user-group-name--1fco4j7
139
+ 6.11. Security options => security-options-1bv93g4
128
140
 
129
- 6.8.4. passenger_default_user <username> => passenger-default-user-username--1h6cdmf
141
+ 6.11.1. passenger_user_switching <on|off> => passenger-user-switching-on-off--1p37u3l
130
142
 
131
- 6.8.5. Passenger_default_group <group name> => passenger-default-group-group-name--1qxn2qa
143
+ 6.11.2. passenger_user <username> => passenger-user-username--b06ur7
132
144
 
133
- 6.8.6. passenger_friendly_error_pages <on|off> => passenger-friendly-error-pages-on-off--1ti1a0e
145
+ 6.11.3. passenger_group <group name> => passenger-user-group-name--1fco4j7
134
146
 
135
- 6.9. Resource control and optimization options => resource-control-and-optimization-options-xd7evs
147
+ 6.11.4. passenger_default_user <username> => passenger-default-user-username--1h6cdmf
136
148
 
137
- 6.9.1. passenger_max_pool_size <integer> => passenger-max-pool-size-integer--3jzefs
149
+ 6.11.5. Passenger_default_group <group name> => passenger-default-group-group-name--1qxn2qa
138
150
 
139
- 6.9.2. passenger_min_instances <integer> => passenger-min-instances-integer--uclykt
151
+ 6.11.6. passenger_show_version_in_header <on|off> => passenger-show-version-in-header-on-off--2h49av
140
152
 
141
- 6.9.3. passenger_max_instances <integer> => passenger-max-instances
153
+ 6.11.7. passenger_friendly_error_pages <on|off> => passenger-friendly-error-pages-on-off--1ti1a0e
142
154
 
143
- 6.9.4. passenger_max_instances_per_app <integer> => passenger-max-instances-per-app-integer--1xhbbne
155
+ 6.12. Resource control and optimization options => resource-control-and-optimization-options-xd7evs
144
156
 
145
- 6.9.5. passenger_pool_idle_time <integer> => passenger-pool-idle-time-integer--xcw65o
157
+ 6.12.1. passenger_max_pool_size <integer> => passenger-max-pool-size-integer--3jzefs
146
158
 
147
- 6.9.6. passenger_max_preloader_idle_time <integer> => rails-app-spawner-idle-time-integer--1xjqe4b
159
+ 6.12.2. passenger_min_instances <integer> => passenger-min-instances-integer--uclykt
148
160
 
149
- 6.9.7. passenger_concurrency_model <process|thread> => passenger-concurrency-model-process-thread--brcvkk
161
+ 6.12.3. passenger_max_instances <integer> => passenger-max-instances
150
162
 
151
- 6.9.8. passenger_thread_count <number> => passenger-thread-count-number--1kd6ffy
163
+ 6.12.4. passenger_max_instances_per_app <integer> => passenger-max-instances-per-app-integer--1xhbbne
152
164
 
153
- 6.9.9. passenger_max_requests <integer> => passenger-max-requests-integer--sgzint
165
+ 6.12.5. passenger_pool_idle_time <integer> => passenger-pool-idle-time-integer--xcw65o
154
166
 
155
- 6.9.10. passenger_max_request_time <seconds> => passenger-max-request-time-seconds--1htog2g
167
+ 6.12.6. passenger_max_preloader_idle_time <integer> => rails-app-spawner-idle-time-integer--1xjqe4b
156
168
 
157
- 6.9.11. passenger_memory_limit <integer> => passenger-memory-limit-integer--1ry7dwx
169
+ 6.12.7. passenger_concurrency_model <process|thread> => passenger-concurrency-model-process-thread--brcvkk
158
170
 
159
- 6.9.12. passenger_pre_start <url> => passenger-pre-start-url--npldeb
171
+ 6.12.8. passenger_thread_count <number> => passenger-thread-count-number--1kd6ffy
160
172
 
161
- 6.10. Logging and debugging options => logging-and-debugging-options-14e91ni
173
+ 6.12.9. passenger_max_requests <integer> => passenger-max-requests-integer--sgzint
162
174
 
163
- 6.10.1. passenger_log_level <integer> => passenger-log-level-integer--17snhon
175
+ 6.12.10. passenger_max_request_time <seconds> => passenger-max-request-time-seconds--1htog2g
164
176
 
165
- 6.10.2. passenger_debug_log_file <filename> => passenger-debug-log-file-filename--21ubaj
177
+ 6.12.11. passenger_memory_limit <integer> => passenger-memory-limit-integer--1ry7dwx
166
178
 
167
- 6.10.3. passenger_debugger <on|off> => passenger-debugger-on-off--1wkuq85
179
+ 6.12.12. passenger_pre_start <url> => passenger-pre-start-url--npldeb
168
180
 
169
- 6.11. Ruby on Rails-specific options => ruby-on-rails-specific-options-12vfokt
181
+ 6.13. Logging and debugging options => logging-and-debugging-options-14e91ni
170
182
 
171
- 6.11.1. rails_env <string> => rails-env-string--jlh7v9
183
+ 6.13.1. passenger_log_level <integer> => passenger-log-level-integer--17snhon
172
184
 
173
- 6.12. Rack and Rails >= 3 specific options => rack-specific-options-13yvdxs
185
+ 6.13.2. passenger_debug_log_file <filename> => passenger-debug-log-file-filename--21ubaj
174
186
 
175
- 6.12.1. rack_env <string> => rack-env-string--tqmrt0
187
+ 6.13.3. passenger_debugger <on|off> => passenger-debugger-on-off--1wkuq85
176
188
 
177
- 6.13. Deprecated options => deprecated-options-1dtzo0g
189
+ 6.14. Ruby on Rails-specific options => ruby-on-rails-specific-options-12vfokt
178
190
 
179
- 6.13.1. rails_spawn_method => rails-spawn-method-17vdnpt
191
+ 6.14.1. rails_env <string> => rails-env-string--jlh7v9
192
+
193
+ 6.15. Rack and Rails >= 3 specific options => rack-specific-options-13yvdxs
194
+
195
+ 6.15.1. rack_env <string> => rack-env-string--tqmrt0
196
+
197
+ 6.16. Deprecated options => deprecated-options-1dtzo0g
198
+
199
+ 6.16.1. rails_spawn_method => rails-spawn-method-17vdnpt
180
200
 
181
201
  7. Analysis and system maintenance => analysis-and-system-maintenance-1nnlnj8
182
202
 
@@ -200,15 +220,13 @@
200
220
 
201
221
  8.4. Bundler support => bundler-support-19v1h43
202
222
 
203
- 8.5. Moving Phusion Passenger to a different directory => moving-phusion-passenger-to-a-different-directory-1hel5cp
204
-
205
- 8.6. Installing multiple Ruby on Rails versions => installing-multiple-ruby-on-rails-versions-1bp1fff
223
+ 8.5. Installing multiple Ruby on Rails versions => installing-multiple-ruby-on-rails-versions-1bp1fff
206
224
 
207
- 8.7. Making the application restart after each request => making-the-application-restart-after-each-request-vimy48
225
+ 8.6. Making the application restart after each request => making-the-application-restart-after-each-request-vimy48
208
226
 
209
- 8.8. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments => how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-11mzwt6
227
+ 8.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments => how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-11mzwt6
210
228
 
211
- 8.9. Out-of-Band Garbage Work and Out-of-Band Garbage Collection => out-of-band-garbage-work-and-out-of-band-garbage-collection-v89lu2
229
+ 8.8. Out-of-Band Garbage Work and Out-of-Band Garbage Collection => out-of-band-garbage-work-and-out-of-band-garbage-collection-v89lu2
212
230
 
213
231
  9. Under the hood => under-the-hood-8uney
214
232
 
@@ -463,12 +463,64 @@ This required option may only occur once, in the 'http' configuration block.
463
463
  === passenger_ruby <filename> ===
464
464
  This option allows one to specify the Ruby interpreter to use.
465
465
 
466
- * In the 'http' configuration block.
466
+ Since version 4.0.0, this option may occur in the following places:
467
+
468
+ * In the 'http' configuration block.
469
+ * In a 'server' configuration block.
470
+ * In a 'location' configuration block.
471
+ * In an 'if' configuration scope.
472
+
473
+ If you want to use a different Ruby interpreter for two different applications then you should define different `passenger_ruby` directives in different 'http' blocks.
474
+
475
+ In versions prior to 4.0.0, only a single Ruby version is supported for the entire Nginx instance, so `passenger_ruby` may only occur in the 'http' configuration block.
476
+
477
+ The default value is 'ruby', meaning that the Ruby interpreter will be looked up according to the `PATH` environment variable.
478
+
479
+ === passenger_python <filename> ===
480
+ :version: 4.0.0
481
+ include::users_guide_snippets/since_version.txt[]
482
+
483
+ This option allows one to specify the Python interpreter to use. It may occur in the following places:
484
+
485
+ * In the 'http' configuration block.
467
486
  * In a 'server' configuration block.
468
487
  * In a 'location' configuration block.
469
488
  * In an 'if' configuration scope.
470
489
 
471
- In each place, it may be specified at most once. The default value is 'ruby', meaning that the Ruby interpreter will be looked up according to the `PATH` environment variable.
490
+ If you want to use a different Python interpreter for two different applications then you should define different `passenger_python` directives in different 'http' blocks.
491
+
492
+ The default value is 'python', meaning that the Python interpreter will be looked up according to the `PATH` environment variable.
493
+
494
+ [[PassengerAppRoot]]
495
+ === passenger_app_root <path/to/root> ===
496
+ :version: 4.0.0
497
+ include::users_guide_snippets/since_version.txt[]
498
+ By default, Phusion Passenger assumes that the application's root directory
499
+ is the parent directory of the 'public' directory. This option allows one to
500
+ specify the application's root independently from the Nginx 'root', which
501
+ is useful if the 'public' directory lives in a non-standard place.
502
+
503
+ This option may occur in the following places:
504
+
505
+ * In the 'http' configuration block.
506
+ * In a 'server' configuration block.
507
+ * In a 'location' configuration block.
508
+ * In an 'if' configuration scope.
509
+
510
+ In each place, it may be specified at most once.
511
+
512
+ Example:
513
+
514
+ -----------------------------
515
+ server {
516
+ server_name test.host;
517
+ root /var/rails/zena/sites/example.com/public;
518
+ # normally Phusion Passenger would
519
+ # have assumed that the application
520
+ # root is "/var/rails/zena/sites/example.com"
521
+ passenger_app_root /var/rails/zena;
522
+ }
523
+ -----------------------------
472
524
 
473
525
  [[PassengerSpawnMethod]]
474
526
  === passenger_spawn_method <string> ===
@@ -566,6 +618,35 @@ This option may occur in the following places:
566
618
 
567
619
  In each place, it may be specified at most once. The default value is 'off'.
568
620
 
621
+ [[PassengerTempDir]]
622
+ === passenger_temp_dir <directory> ===
623
+ Specifies the directory that Phusion Passenger should use for storing temporary
624
+ files. This includes things such as Unix socket files.
625
+
626
+ This option may only be specified in the 'http' configuration block. The
627
+ default temp directory that Phusion Passenger uses is '/tmp'.
628
+
629
+ This option is especially useful if Nginx is not allowed to write to /tmp
630
+ (which is the case on some systems with strict SELinux policies) or if the
631
+ partition that /tmp lives on doesn't have enough disk space.
632
+
633
+ .Command line tools
634
+ Some Phusion Passenger command line administration tools, such as
635
+ `passenger-status`, must know what Phusion Passenger's temp directory is
636
+ in order to function properly. You can pass the directory through the
637
+ `PASSENGER_TMPDIR` environment variable, or the `TMPDIR` environment variable
638
+ (the former will be used if both are specified).
639
+
640
+ For example, if you set 'passenger_temp_dir' to '/my_temp_dir', then invoke
641
+ `passenger-status` after you've set the `PASSENGER_TMPDIR` or `TMPDIR`
642
+ environment variable, like this:
643
+
644
+ ----------------------------------------------------------
645
+ export PASSENGER_TMPDIR=/my_temp-dir
646
+ sudo -E passenger-status
647
+ # The -E option tells 'sudo' to preserve environment variables.
648
+ ----------------------------------------------------------
649
+
569
650
  === Important deployment options ===
570
651
  ==== passenger_enabled <on|off> ====
571
652
  This option may be specified in the 'http' configuration block, a
@@ -811,6 +892,30 @@ This option may only occur once, in the 'http' configuration block.
811
892
  The default value is the primary group of the user specifified by
812
893
  <<PassengerDefaultUser,passenger_default_user>>.
813
894
 
895
+ ==== passenger_show_version_in_header <on|off> ====
896
+ When turned on, Phusion Passenger will output its version number in the `Server` and `X-Powered-By` header in all Phusion Passenger-served requests:
897
+
898
+ ----------------------------------------------------
899
+ Server: nginx/1.3.11 + Phusion Passenger 4.0.0
900
+ X-Powered-By: Phusion Passenger 4.0.0
901
+ ----------------------------------------------------
902
+
903
+ When turned off, the version number will be hidden:
904
+
905
+ ----------------------------------------------------
906
+ Server: nginx/1.3.11 + Phusion Passenger
907
+ X-Powered-By: Phusion Passenger
908
+ ----------------------------------------------------
909
+
910
+ This option may occur in the following places:
911
+
912
+ * In the 'http' configuration block.
913
+ * In a 'server' configuration block.
914
+ * In a 'location' configuration block.
915
+ * In an 'if' configuration scope.
916
+
917
+ In each place, it may be specified at most once. The default value is 'on'.
918
+
814
919
  ==== passenger_friendly_error_pages <on|off> ====
815
920
  Phusion Passenger can display friendly error pages whenever an application fails
816
921
  to start. This friendly error page presents the startup error message, some
@@ -848,7 +953,7 @@ If you find that your server is unable to handle the load on your Rails/Rack web
848
953
  sites are really that popular, then you should strongly consider upgrading your
849
954
  hardware or getting more servers.)
850
955
 
851
- This option may only occur once, in the 'http' configuration bock.
956
+ This option may only occur once, in the 'http' configuration block.
852
957
  The default value is '6'.
853
958
 
854
959
  TIP: We strongly recommend you to <<reducing_memory_usage,use Ruby Enterprise
@@ -1146,33 +1251,17 @@ This option may occur in the following places:
1146
1251
  * In a 'location' configuration block.
1147
1252
  * In an 'if' configuration scope.
1148
1253
 
1149
- In each place, it may be specified at most once. The default value is '200'.
1254
+ In each place, it may be specified at most once. The default value is '0'.
1150
1255
 
1151
1256
  [NOTE]
1152
1257
  .A word about permissions
1153
1258
  =====================================================
1154
- The <<PassengerMemoryLimit,passenger_memory_limit>> directive requires that the
1155
- user that the application is running as (see <<PassengerUserSwitching,passenger_user_switching>>)
1156
- to have access to the `/proc` file system, or to be able to inspect its status
1157
- with `ps` (which on Linux and FreeBSD systems basically means the same thing, since `ps`
1158
- reads process information from `/proc`). Therefore, on servers running with
1159
- tight permissions on `/proc`, this directive may not work. If you wish to use
1160
- this directive and your `/proc` permissions are too tight, then please consider
1161
- untightening the permissions.
1162
- =====================================================
1163
-
1164
- [TIP]
1165
- .FreeBSD and `/proc`
1166
- =====================================================
1167
- On many FreeBSD systems, `/proc` is not mounted by default. `/proc` *must* be
1168
- mounted in order for <<PassengerMemoryLimit,passenger_memory_limit>> to work.
1169
-
1170
- It is also advised that you mount `/proc` with the `linprocfs` filesystem type
1171
- instead of the regular FreeBSD `proc` filesystem type. The `linprocfs` filesystem
1172
- type allows Phusion Passenger to read memory information from `/proc` directly,
1173
- which is very fast. If you mount `/proc` with a different filesystem type, then
1174
- Phusion Passenger must resort to querying memory information from the `ps` command,
1175
- which is a lot slower.
1259
+ The <<PassengerMemoryLimit,passenger_memory_limit>> directive uses the
1260
+ `ps` command to query memory usage information. On Linux, it further
1261
+ queries `/proc` to obtain additional memory usage information that's
1262
+ not obtainable through `ps`. You should ensure that the `ps` works
1263
+ correctly and that the `/proc` filesystem is accessible by the
1264
+ `PassengerHelperAgent` process.
1176
1265
  =====================================================
1177
1266
 
1178
1267
  [CAUTION]
@@ -1122,7 +1122,8 @@ Can listen on a Unix socket, for use in reverse proxy setups.
1122
1122
  words: practically any operating system on earth, except Microsoft Windows.</p></div>
1123
1123
  <div class="paragraph"><p>Phusion Passenger is confirmed on a large number of operating systems and Linux
1124
1124
  distributions, including, but not limited to, Ubuntu, Debian, CentOS/Fedora/RHEL,
1125
- Gentoo, Mac OS X, FreeBSD and Solaris. Both 32-bit and 64-bit platforms are supported.</p></div>
1125
+ Gentoo, Mac OS X, FreeBSD and Solaris. OpenBSD is supported since version 5.2.
1126
+ Both 32-bit and 64-bit platforms are supported.</p></div>
1126
1127
  <div class="paragraph"><p>Please
1127
1128
  <a href="http://code.google.com/p/phusion-passenger/issues/list">report a bug</a>
1128
1129
  or
@@ -1154,6 +1155,11 @@ Email <a href="mailto:support@phusion.nl">support@phusion.nl</a> if you are a <a
1154
1155
  <a href="https://www.phusionpassenger.com/commercial_support">Commercial support contracts</a> are also available.
1155
1156
  </p>
1156
1157
  </li>
1158
+ <li>
1159
+ <p>
1160
+ Report security vulnerabilities to <a href="mailto:support@phusion.nl">support@phusion.nl</a>. We will do our best to respond to you as quickly as we can, so please do not disclose the vulnerability until then.
1161
+ </p>
1162
+ </li>
1157
1163
  </ul></div>
1158
1164
  <div class="paragraph"><p>Please consult <a href="https://www.phusionpassenger.com/support">the Phusion Passenger website</a> for a full list of support resources.</p></div>
1159
1165
  </div>
@@ -1192,7 +1198,7 @@ use the <span class="monospaced">-p</span> option, e.g.:</p></div>
1192
1198
  <div id="footnotes"><hr></div>
1193
1199
  <div id="footer">
1194
1200
  <div id="footer-text">
1195
- Last updated 2013-01-23 15:31:31 CET
1201
+ Last updated 2013-03-03 11:14:55 CET
1196
1202
  </div>
1197
1203
  </div>
1198
1204
  <script>/*! jQuery v1.7.1 jquery.com | jquery.org/license */
@@ -116,13 +116,7 @@ sessions compared to the others, then there might be a problem:
116
116
  +---- "spike"
117
117
  --------------------------------
118
118
 
119
- Possible reasons why spikes can occur:
120
-
121
- . Your application is busy processing a request that takes a very long time.
122
- If this is the case, then you might want to turn
123
- <<PassengerUseGlobalQueue,global queuing>> on.
124
- . Your application is frozen, i.e. has stopped responding. See
125
- <<debugging_frozen,Debugging frozen applications>> for tips.
119
+ The most likely reason why a spike occurs is because your application is frozen, i.e. it has stopped responding. See <<debugging_frozen,Debugging frozen applications>> for tips.
126
120
 
127
121
 
128
122
  [[debugging_frozen]]
@@ -1,9 +1,11 @@
1
+ === Synopsis
2
+
1
3
  The Phusion Passenger installation process consists of two steps:
2
4
 
3
5
  1. The *obtainment step*, where you download the Phusion Passenger files puts them somewhere on your system. This can be done through downloading the source tarball, installing the Ruby gem or installing a native OS package via APT or YUM.
4
6
  2. The *integration step*, where you configure Phusion Passenger so that it works properly with other system components such as Apache, Nginx, Ruby, Python, etc.
5
7
 
6
- Because Phusion Passenger is designed to run in a wide variety of operating systems and configurations, both steps can be done in multiple ways. Most users will be satisfied with the generic installation instructions which covers both steps, but some users may prefer OS-specific installation instructions in order to integrate better.
8
+ Because Phusion Passenger is designed to run in a wide variety of operating systems and configurations, both steps can be done in multiple ways. Most users -- especially first-time users -- will be satisfied with the _generic installation instructions_ which covers both steps. However some users may prefer _OS-specific installation instructions_, which allow Phusion Passenger to better integrate into the operating system. Better integration is characterized by following OS-specific conventions.
7
9
 
8
10
  If you are not familiar with system administration and do not understand all the choices, then we recommend you to go with the <<rubygems_generic_install,RubyGems generic installation method>> (if you're a Ruby user) or the <<tarball_generic_install,tarball generic installation method>> (if you're not a Ruby user).
9
11
 
@@ -13,6 +15,8 @@ The steps for upgrading or downgrading Phusion Passenger is almost the same as t
13
15
  [[rubygems_generic_install]]
14
16
  === Generic installation, upgrade and downgrade method: via RubyGems
15
17
 
18
+ RubyGems is only used as a method to obtain the Phusion Passenger files, so in case you have multiple Ruby versions it does not matter which Ruby's RubyGems you use for installation. Once installed, Phusion Passenger can work with all other Ruby versions on your system.
19
+
16
20
  [[is_ruby_home_or_system_wide_installed]]
17
21
  [float]
18
22
  ==== Step 1: figuring out whether your Ruby is installed the home directory or system-wide
@@ -78,7 +82,7 @@ gem install passenger-enterprise-server-x.x.x.gem
78
82
  [float]
79
83
  ==== Step 3: add the RubyGems bin directory to your $PATH
80
84
 
81
- If you all the following are applicable to you:
85
+ If you all of the following are applicable to you:
82
86
 
83
87
  - You are on Debian or Ubuntu,
84
88
  - and you installed RubyGems through APT,
@@ -129,7 +133,7 @@ passenger-install-apache2-module
129
133
 
130
134
  At the end of the installation process, you will be asked to copy and paste a configuration snippet (containing `LoadModule`, `PassengerRoot`, etc.) into your Apache configuration file. If you're upgrading, then you already had a similar configuration snippet. Be sure to remove the old one before pasting the new one.
131
135
 
132
- If you have trouble finding the Apache configuration file, see <<locating_apache_conf,Locating the Apache configuration file>>. If you're on OS X Server >= 10.8 (Mountain Lion) and you're running Web Services, then you should definitely read that section because the configuration file may not be where you think it is.
136
+ Different operating systems and Apache installations have different conventions with regard to where the Apache configuration file is and how it is organized. Please read <<working_with_apache_conf,Working with the Apache configuration file>> if you're not familiar with it. That section is especially of interest for OS X Server >= 10.8 users because the configuration file may not be at a surprising location.
133
137
 
134
138
  If compilation doesn't succeed, then please consult the <<troubleshooting,Troubleshooting>> section.
135
139
 
@@ -172,6 +176,9 @@ passenger-memory-stats
172
176
  ---------------------------
173
177
 
174
178
  You should see the web server processes as well as a number of Phusion Passenger processes (e.g. PassengerWatchdog, PassengerHelperAgent). Congratulations, Phusion Passenger is now installed and running!
179
+ ifdef::nginx[]
180
+ At this point you may be interested in <<nginx_init_script,creating an Nginx init script>>.
181
+ endif::[]
175
182
 
176
183
  If the output is not as expected, then please refer to the <<troubleshooting,Troubleshooting>> section.
177
184
 
@@ -263,7 +270,7 @@ sudo apt-add-repository ppa:brightbox/passenger
263
270
  sudo apt-get update
264
271
  -----------------------------
265
272
 
266
- If you're on the older Ubuntu 8.04 Hardy release, the 'apt-add-repository' command isn't available so you have to install the repository and the key by hand:
273
+ If you're on the older Ubuntu 8.04 Hardy release, the `apt-add-repository` command isn't available so you have to install the repository and the key by hand:
267
274
 
268
275
  -----------------------------
269
276
  sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger.list'
@@ -301,37 +308,103 @@ endif::[]
301
308
  Please refer to <<verify_passenger_running,this section>>. Note that all Phusion Passenger administration scripts are located inside the 'bin' subdirectory of the Phusion Passenger source directory, so you would have to run something like '/opt/passenger/passenger-x.x.x/bin/passenger-memory-stats'.
302
309
 
303
310
 
304
- === Installing or upgrading on Ubuntu
311
+ === Installing or upgrading on Debian 6 or Ubuntu
305
312
 
306
- John Leach from Brightbox has kindly provided a Ubuntu packages for Phusion Passenger. The packages are available from the link:http://wiki.brightbox.co.uk/docs:phusion-passenger[Brightbox repository]. Only packages for the open source version of Phusion Passenger are provided. link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] customers should use the <<rubygems_generic_install,generic RubyGems installation method>> or <<tarball_generic_install,the generic tarball installation method>> instead.
313
+ John Leach from Brightbox has kindly provided Ubuntu packages for Phusion Passenger. The Ubuntu Lucid packages are compatible with Debian 6. The packages are available from the link:http://wiki.brightbox.co.uk/docs:phusion-passenger[Brightbox repository]. Only packages for the open source version of Phusion Passenger are provided. link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] customers should use the <<rubygems_generic_install,generic RubyGems installation method>> or <<tarball_generic_install,the generic tarball installation method>> instead.
307
314
 
308
- Add the following line to the Third Party Software Sources:
315
+ If you use these packages to install Phusion Passenger then you do not need to run `passenger-install-apache2-module` or `passenger-install-nginx-module`. These packages contain all the binaries that you need.
309
316
 
310
- ---------------------------------------------
311
- deb http://apt.brightbox.net hardy main
312
- ---------------------------------------------
317
+ .Apache
318
+
319
+ On Ubuntu versions newer than 8.04 Hardy, register the Brightbox Apache PPA as follows:
320
+
321
+ -----------------------------
322
+ sudo apt-add-repository ppa:brightbox/passenger
323
+ sudo apt-get update
324
+ -----------------------------
325
+
326
+ On Ubuntu 8.04 Hardy and on Debian, the `apt-add-repository` command isn't available so you have to install the repository and the key by hand.
327
+
328
+ Debian 6:
329
+
330
+ -----------------------------
331
+ sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger/ubuntu lucid main" > /etc/apt/sources.list.d/brightbox-passenger.list'
332
+ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
333
+ sudo apt-get update
334
+ -----------------------------
335
+
336
+ Ubuntu 8.04 Hardy:
313
337
 
314
- The simplest way to do that is to create a file in '/etc/apt/sources.list.d' containing the deb instruction, and then run `sudo apt-get update`.
338
+ -----------------------------
339
+ sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger.list'
340
+ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
341
+ sudo apt-get update
342
+ -----------------------------
315
343
 
316
- Once you've done that, you can proceed with installing Phusion Passenger by running:
344
+ You can proceed with installing Phusion Passenger by running:
317
345
 
318
346
  ---------------------------------------------
319
347
  sudo apt-get install libapache2-mod-passenger
320
348
  ---------------------------------------------
321
349
 
322
- or, for the Nginx version:
350
+ The Apache package provides configuration snippets for you, so you don't need to modify any Apache configuration to get it to load Phusion Passenger.
351
+
352
+ .Nginx
353
+
354
+ On Ubuntu versions newer than 8.04 Hardy, register the Brightbox Apache PPA as follows:
355
+
356
+ -----------------------------
357
+ sudo apt-add-repository ppa:brightbox/passenger-nginx
358
+ sudo apt-get update
359
+ -----------------------------
360
+
361
+ On Ubuntu 8.04 Hardy and on Debian, the `apt-add-repository` command isn't available so you have to install the repository and the key by hand.
362
+
363
+ Debian 6:
364
+
365
+ -----------------------------
366
+ sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger-nginx/ubuntu lucid main" > /etc/apt/sources.list.d/brightbox-passenger-nginx.list'
367
+ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
368
+ sudo apt-get update
369
+ -----------------------------
370
+
371
+ Ubuntu 8.04 Hardy:
372
+
373
+ -----------------------------
374
+ sudo sh -c 'echo "deb http://ppa.launchpad.net/brightbox/passenger/ubuntu hardy main" > /etc/apt/sources.list.d/brightbox-passenger-nginx.list'
375
+ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
376
+ sudo apt-get update
377
+ -----------------------------
378
+
379
+ Then:
323
380
 
324
381
  ---------------------------------------------
325
- sudo apt-get install nginx-brightbox
382
+ sudo apt-get install nginx-full
326
383
  ---------------------------------------------
327
384
 
328
- Please also visit link:http://wiki.brightbox.co.uk/docs:phusion-passenger[the package's wiki page] for more documentation about this package.
385
+ You'll then need to enable the Phusion Passenger module in Nginx by creating the following configuration file:
386
+
387
+ -----------------------------------------------
388
+ sudo sh -c 'echo "passenger_root /usr/lib/phusion-passenger;" > /etc/nginx/conf.d/passenger.conf'
389
+ -----------------------------------------------
390
+
391
+ Then restart Nginx to apply the changes:
392
+
393
+ ----------------------------------------
394
+ sudo /etc/init.d/nginx restart
395
+ ----------------------------------------
396
+
397
+ .Standalone
398
+
399
+ Unfortunately, no packages are provided for Phusion Passenger Standalone.
329
400
 
330
401
 
331
402
  === Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux
332
403
 
333
404
  YUM repositories with RPMs are maintained by link:https://github.com/erikogan/passenger[Erik Ogan] and link:http://stealthymonkeys.com/[Stealthy Monkeys Consulting]. Only packages for the open source version of Phusion Passenger are provided. link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] customers should use the <<rubygems_generic_install,generic RubyGems installation method>> or <<tarball_generic_install,the generic tarball installation method>> instead.
334
405
 
406
+ If you use YUM to install Phusion Passenger then you do not need to run `passenger-install-apache2-module` or `passenger-install-nginx-module`. The YUM packages contain all the binaries that you need. You also don't need to modify any Apache or Nginx configuration to get them to load Phusion Passenger, the packages provide configuration snippets for you as well.
407
+
335
408
  [float]
336
409
  ==== Step 1: Install the release package
337
410
 
@@ -365,13 +438,13 @@ From there you can use link:http://prefetch.net/articles/yum.html[YUM] to instal
365
438
  Phusion Passenger for Apache:
366
439
 
367
440
  ---------------------------------------------
368
- yum install nginx-passenger
441
+ yum install mod_passenger
369
442
  ---------------------------------------------
370
443
 
371
444
  Phusion Passenger for Nginx:
372
445
 
373
446
  ---------------------------------------------
374
- yum install mod_passenger
447
+ yum install nginx-passenger
375
448
  ---------------------------------------------
376
449
 
377
450
  Phusion Passenger Standalone:
@@ -408,13 +481,73 @@ By default, the installer (`passenger-install-nginx-module`) is interactive. If
408
481
  endif::[]
409
482
 
410
483
 
484
+ === Customizing the compilation process
485
+
486
+ ==== Setting the compiler
487
+
488
+ You can force the Phusion Passenger build system to use a specific C or C++ compiler by setting the `CC` and `CXX` environment variables. These may be set to any arbitrary shell commands.
489
+
490
+ For example, contributors who want to hack on Phusion Passenger may want to use Clang for faster compilation and link:http://ccache.samba.org/[ccache] for faster recompilation, and may want to enable more error-catching compilation flags:
491
+
492
+ ----------------------
493
+ export CC='ccache clang -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
494
+ export CXX='ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
495
+ ----------------------
496
+
497
+ ==== Adding additional compiler or linker flags
498
+
499
+ On some systems, C/C++ libraries and headers that Phusion Passenger requires may be located in a non-standard directory. You can force the Phusion Passenger build system to look in those locations by injecting compiler and linker flags using the following environment variables:
500
+
501
+ `EXTRA_PRE_CFLAGS`::
502
+ These flags are injected into all C compiler invocations that involve compiling C or C++ source files. This includes compiler invocations that compile *and* link. The flags are injected at the beginning of the command string, even before `EXTRA_PRE_LDFLAGS`.
503
+ `EXTRA_CFLAGS`::
504
+ Similar to `EXTRA_PRE_CFLAGS`, but injected at the end of the command string, before `EXTRA_LDFLAGS`.
505
+ `EXTRA_PRE_CXXFLAGS`::
506
+ Similar to `EXTRA_PRE_CFLAGS`, but for C++ compiler invocations.
507
+ `EXTRA_CXXFLAGS`::
508
+ Similar to `EXTRA_CFLAGS`, but for C++ compiler invocations.
509
+ `EXTRA_PRE_LDFLAGS`::
510
+ These flags are injected into all C/C++ compiler invocations that involve linking. This includes compiler invocations that compile *and* link. The flags are injected at the beginning of the command string, but after `EXTRA_PRE_CFLAGS` and `EXTRA_PRE_CXXFLAGS`.
511
+ `EXTRA_LDFLAGS`::
512
+ Similar to `EXTRA_PRE_LDFLAGS`, but injected at the very end of the command string, even after `EXTRA_CFLAGS` and `EXTRA_CXXFLAGS`.
513
+
514
+ ==== Forcing location of certain command line tools
515
+
516
+ The Phusion Passenger build system attempts to autodetect many things by locating relevant helper tools. For example, to find out which compiler flags it should use for compiling Apache modules, it locates the `apxs2` command and queries it. To find out which compiler flags it should use for libcurl, it queries the `curl-config` command. These commands may not be in `$PATH`, or even when they are you may want to use a different one.
517
+
518
+ You can often force the build to find certain command line tools at certain locations by using the following environment variables:
519
+
520
+ `HTTPD`::
521
+ The location of the `httpd` executable (the Apache server executable).
522
+ `APXS2`::
523
+ The location of the `apxs2` executable (the Apache module developer tool).
524
+ `APR_CONFIG`::
525
+ The location of the `apr-config` executable (the Apache Portable Runtime developer tool).
526
+ `APU_CONFIG`::
527
+ The location of the `apu-config` executable (the Apache Portable Runtime Utility developer tool).
528
+ `MAKE`::
529
+ The location of a `make` tool. It does not matter which implementation of `make` this is.
530
+ `GMAKE`::
531
+ The location of the GNU-compatible `make` tool.
532
+
533
+
411
534
  ifdef::apache[]
412
- [[locating_apache_conf]]
413
- === Locating the Apache configuration file
535
+ [[working_with_apache_conf]]
536
+ === Working with the Apache configuration file
414
537
 
415
- On most systems, the Apache configuration file is located in either '/etc/apache2/httpd.conf' or '/etc/apache2/apache2.conf'.
538
+ On most systems the Apache configuration file is located in either '/etc/apache2/httpd.conf' or '/etc/apache2/apache2.conf'. However, to allow better organization, many operating systems and Apache distributions also read configuration files in the 'conf.d', 'mods-enabled' and 'sites-enabled' subdirectories.
416
539
 
417
- Not so on OS X Server >= 10.8 Mountain Lion with Web Services. If you do not use Web Services then the configuration file *is* in '/etc', but if you do use Web Services then the configuration file is in '/Library/Server/Web/Config/apache2/httpd_server_app.conf'.
540
+ 'mods-enabled' contains symlinks to files in 'mods-available'. This latter subdirectory contains config files for all available modules, while 'mods-enabled' contains only a subset, namely the modules that should actually be enabled. The symlinks are created using the `a2enmod` tool. '*.load' files contain `LoadModule` directives, while '*.conf' files contain all other configuration directives.
541
+
542
+ Use 'mods-enabled'/'mods-available' to store Phusion Passenger configuration if you can:
543
+
544
+ - Create '/etc/apache2/mods-available/passenger.load' and paste the `LoadModule ...` directive that `passenger-install-apache2-module` outputs.
545
+ - Create '/etc/apache2/mods-available/passenger.conf' and paste the `PassengerRoot` and other Phusion Passenger options.
546
+ - Enable by running `sudo a2enmod passenger`.
547
+
548
+ If the 'mods-enabled' mechanism is not available then you can paste configuration snippets into 'httpd.conf' or 'apache2.conf' directly.
549
+
550
+ On OS X Server >= 10.8 Mountain Lion the location of the Apache configuration file depends on whether you use Web Services or not. If you do, then the configuration file is in '/Library/Server/Web/Config/apache2/httpd_server_app.conf'. If you do not, then the configuration file is in '/etc/apache2/httpd.conf'.
418
551
  endif::[]
419
552
 
420
553
 
@@ -445,6 +578,18 @@ passenger_root /path-to-passenger-root;
445
578
  ------------------------------------------
446
579
 
447
580
  After having done so, restart Nginx.
581
+
582
+ [[nginx_init_script]]
583
+ === Creating an Nginx init script
584
+
585
+ If you installed Nginx with one of the generic installation methods then you won't have an init script to start, stop and restart Nginx with. A bare Nginx installation works with signals: you start it by invoking it from the command line, you stop it by sending SIGTERM to it and you gracefully restart it by sending SIGHUP to it.
586
+
587
+ If you prefer to use an init script then please refer to the following resources:
588
+
589
+ - link:http://wiki.nginx.org/Nginx-init-ubuntu[Init script for Ubuntu]
590
+ - link:http://wiki.nginx.org/RedHatNginxInitScript[Init script for Red Hat, Fedora and CentOS]
591
+
592
+ When using one of those init scripts, please make sure that the paths inside the init script are correct. In particular, the paths to the Nginx binary, to the PID file and to the configuration file must match the actual locations of your Nginx installation.
448
593
  endif::[]
449
594
 
450
595
 
@@ -587,7 +732,7 @@ mv /opt/passenger/passenger-4.0.0 /usr/local/passenger-4.0.0
587
732
 
588
733
  Next you must tell your web server that Phusion Passenger has moved.
589
734
  ifdef::apache[]
590
- Open your <<locating_apache_conf,Apache configuration file>> and set the 'PassengerRoot' directive to the new location:
735
+ Open your <<working_with_apache_conf,Apache configuration file>> and set the 'PassengerRoot' directive to the new location:
591
736
 
592
737
  ---------------------------------------------
593
738
  PassengerRoot /usr/local/passenger-4.0.0