passenger 5.1.10 → 5.1.11

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 (200) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +18 -0
  3. data/Rakefile +20 -17
  4. data/bin/passenger-install-apache2-module +14 -11
  5. data/build/agent.rb +45 -18
  6. data/build/apache2.rb +32 -16
  7. data/build/basics.rb +29 -40
  8. data/build/common_library.rb +70 -54
  9. data/build/cxx_tests.rb +34 -43
  10. data/build/integration_tests.rb +10 -10
  11. data/build/misc.rb +6 -6
  12. data/build/node_tests.rb +1 -2
  13. data/build/oxt_tests.rb +7 -5
  14. data/build/packaging.rb +11 -441
  15. data/build/ruby_extension.rb +1 -1
  16. data/build/ruby_tests.rb +1 -2
  17. data/build/support/cplusplus.rb +6 -5
  18. data/build/support/cxx_dependency_map.rb +357 -833
  19. data/build/support/general.rb +23 -1
  20. data/build/test_basics.rb +3 -28
  21. data/dev/ci/tests/rpm/Jenkinsfile +68 -0
  22. data/dev/ci/tests/rpm/run +63 -0
  23. data/dev/ci/tests/source-packaging/run +1 -1
  24. data/dev/ci/tests/source-packaging/setup +1 -1
  25. data/doc/{Packaging.txt.md → Packaging.md} +0 -0
  26. data/resources/templates/apache2/deployment_example.txt.erb +2 -2
  27. data/resources/templates/apache2/multiple_apache_installations_detected.txt.erb +2 -2
  28. data/resources/templates/nginx/deployment_example.txt.erb +1 -1
  29. data/resources/templates/standalone/mass_deployment_default_server.erb +2 -2
  30. data/resources/templates/standalone/server.erb +2 -2
  31. data/src/agent/AgentMain.cpp +0 -4
  32. data/src/agent/Core/CoreMain.cpp +88 -5
  33. data/src/agent/Core/SpawningKit/Spawner.h +2 -1
  34. data/src/agent/Shared/Fundamentals/AbortHandler.cpp +1109 -0
  35. data/src/agent/Shared/Fundamentals/AbortHandler.h +63 -0
  36. data/src/agent/Shared/Fundamentals/Implementation.cpp +7 -0
  37. data/src/agent/Shared/Fundamentals/Initialization.cpp +614 -0
  38. data/src/agent/Shared/{Base.h → Fundamentals/Initialization.h} +23 -14
  39. data/src/agent/Shared/Fundamentals/Utils.cpp +127 -0
  40. data/src/agent/Shared/Fundamentals/Utils.h +46 -0
  41. data/src/agent/TempDirToucher/TempDirToucherMain.cpp +1 -1
  42. data/src/agent/Watchdog/CoreWatcher.cpp +3 -1
  43. data/src/agent/Watchdog/InstanceDirToucher.cpp +90 -53
  44. data/src/agent/Watchdog/WatchdogMain.cpp +13 -29
  45. data/src/apache2_module/Hooks.cpp +4 -1
  46. data/src/cxx_supportlib/ConfigKit/Store.h +32 -5
  47. data/src/cxx_supportlib/Constants.h +1 -2
  48. data/src/cxx_supportlib/Crypto.cpp +2 -1
  49. data/src/cxx_supportlib/Hooks.h +16 -37
  50. data/src/cxx_supportlib/LoggingKit/Context.h +22 -0
  51. data/src/cxx_supportlib/LoggingKit/Forward.h +1 -0
  52. data/src/cxx_supportlib/LoggingKit/Implementation.cpp +106 -22
  53. data/src/cxx_supportlib/ProcessManagement/Ruby.cpp +106 -0
  54. data/src/{agent/UstRouter/FileSink.h → cxx_supportlib/ProcessManagement/Ruby.h} +23 -47
  55. data/src/cxx_supportlib/ProcessManagement/Spawn.cpp +199 -0
  56. data/src/cxx_supportlib/ProcessManagement/Spawn.h +150 -0
  57. data/src/cxx_supportlib/ProcessManagement/Utils.cpp +459 -0
  58. data/src/cxx_supportlib/ProcessManagement/Utils.h +107 -0
  59. data/src/cxx_supportlib/Utils.cpp +41 -561
  60. data/src/cxx_supportlib/Utils.h +0 -68
  61. data/src/cxx_supportlib/Utils/AsyncSignalSafeUtils.h +187 -0
  62. data/src/cxx_supportlib/Utils/ProcessMetricsCollector.h +14 -2
  63. data/src/cxx_supportlib/WatchdogLauncher.h +2 -12
  64. data/src/cxx_supportlib/oxt/dynamic_thread_group.hpp +2 -2
  65. data/src/cxx_supportlib/vendor-modified/jsoncpp/json-forwards.h +4 -0
  66. data/src/cxx_supportlib/vendor-modified/jsoncpp/json.h +16 -1
  67. data/src/cxx_supportlib/vendor-modified/jsoncpp/jsoncpp.cpp +12 -9
  68. data/src/cxx_supportlib/vendor-modified/libev/ev++.h +4 -4
  69. data/src/cxx_supportlib/vendor-modified/libev/ev.h +3 -3
  70. data/src/nginx_module/CacheLocationConfig.c +0 -75
  71. data/src/nginx_module/CacheLocationConfig.c.cxxcodebuilder +1 -0
  72. data/src/nginx_module/Configuration.c +0 -1
  73. data/src/nginx_module/Configuration.h +0 -1
  74. data/src/nginx_module/ConfigurationCommands.c +1 -1
  75. data/src/nginx_module/ContentHandler.c +0 -1
  76. data/src/nginx_module/ContentHandler.h +0 -1
  77. data/src/nginx_module/CreateLocationConfig.c +0 -5
  78. data/src/nginx_module/CreateLocationConfig.c.cxxcodebuilder +1 -0
  79. data/src/nginx_module/LocationConfig.h +0 -4
  80. data/src/nginx_module/LocationConfig.h.cxxcodebuilder +2 -1
  81. data/src/nginx_module/MergeLocationConfig.c +0 -12
  82. data/src/nginx_module/MergeLocationConfig.c.cxxcodebuilder +1 -0
  83. data/src/nginx_module/ngx_http_passenger_module.h +0 -1
  84. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  85. data/src/ruby_supportlib/phusion_passenger/common_library.rb +20 -11
  86. data/src/ruby_supportlib/phusion_passenger/config/api_call_command.rb +1 -1
  87. data/src/ruby_supportlib/phusion_passenger/config/reopen_logs_command.rb +0 -1
  88. data/src/ruby_supportlib/phusion_passenger/config/validate_install_command.rb +10 -3
  89. data/src/ruby_supportlib/phusion_passenger/console_text_template.rb +3 -1
  90. data/src/ruby_supportlib/phusion_passenger/constants.rb +0 -1
  91. data/src/ruby_supportlib/phusion_passenger/debug_logging.rb +1 -1
  92. data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +32 -6
  93. data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +0 -1
  94. data/src/ruby_supportlib/phusion_passenger/packaging.rb +2 -4
  95. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +101 -20
  96. data/src/ruby_supportlib/phusion_passenger/platform_info/apache_detector.rb +21 -9
  97. data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +34 -31
  98. data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +3 -1
  99. data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/apache2.rb +2 -14
  100. data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +40 -3
  101. data/src/ruby_supportlib/phusion_passenger/standalone/app_finder.rb +15 -14
  102. data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +1 -1
  103. data/src/ruby_supportlib/phusion_passenger/standalone/config_utils.rb +1 -1
  104. data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +8 -3
  105. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +19 -18
  106. data/src/ruby_supportlib/phusion_passenger/standalone/stop_command.rb +6 -1
  107. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +17 -1
  108. metadata +19 -97
  109. data/build/documentation.rb +0 -70
  110. data/doc/CloudLicensingConfiguration.html +0 -172
  111. data/doc/CloudLicensingConfiguration.txt.md +0 -3
  112. data/doc/Packaging.html +0 -488
  113. data/doc/Security of user switching support.idmap.txt +0 -34
  114. data/doc/Security of user switching support.txt +0 -197
  115. data/doc/ServerOptimizationGuide.html +0 -172
  116. data/doc/ServerOptimizationGuide.txt.md +0 -3
  117. data/doc/images/by_sa.png +0 -0
  118. data/doc/images/cloud_licensing_batch_job.png +0 -0
  119. data/doc/images/code_walkthrough.jpg +0 -0
  120. data/doc/images/direct_spawning.png +0 -0
  121. data/doc/images/direct_spawning.svg +0 -251
  122. data/doc/images/glyphicons-halflings-white.png +0 -0
  123. data/doc/images/glyphicons-halflings.png +0 -0
  124. data/doc/images/icons/README +0 -5
  125. data/doc/images/icons/callouts/1.png +0 -0
  126. data/doc/images/icons/callouts/10.png +0 -0
  127. data/doc/images/icons/callouts/11.png +0 -0
  128. data/doc/images/icons/callouts/12.png +0 -0
  129. data/doc/images/icons/callouts/13.png +0 -0
  130. data/doc/images/icons/callouts/14.png +0 -0
  131. data/doc/images/icons/callouts/15.png +0 -0
  132. data/doc/images/icons/callouts/2.png +0 -0
  133. data/doc/images/icons/callouts/3.png +0 -0
  134. data/doc/images/icons/callouts/4.png +0 -0
  135. data/doc/images/icons/callouts/5.png +0 -0
  136. data/doc/images/icons/callouts/6.png +0 -0
  137. data/doc/images/icons/callouts/7.png +0 -0
  138. data/doc/images/icons/callouts/8.png +0 -0
  139. data/doc/images/icons/callouts/9.png +0 -0
  140. data/doc/images/icons/caution.png +0 -0
  141. data/doc/images/icons/example.png +0 -0
  142. data/doc/images/icons/home.png +0 -0
  143. data/doc/images/icons/important.png +0 -0
  144. data/doc/images/icons/next.png +0 -0
  145. data/doc/images/icons/note.png +0 -0
  146. data/doc/images/icons/prev.png +0 -0
  147. data/doc/images/icons/tip.png +0 -0
  148. data/doc/images/icons/up.png +0 -0
  149. data/doc/images/icons/warning.png +0 -0
  150. data/doc/images/many_web_framework_protocols.png +0 -0
  151. data/doc/images/passenger_architecture.png +0 -0
  152. data/doc/images/passenger_architecture.svg +0 -385
  153. data/doc/images/passenger_architecture_overview.png +0 -0
  154. data/doc/images/passenger_core_architecture.png +0 -0
  155. data/doc/images/passenger_nodejs_architecture.svg +0 -558
  156. data/doc/images/phusion_banner.png +0 -0
  157. data/doc/images/rack.png +0 -0
  158. data/doc/images/smart_spawning.png +0 -0
  159. data/doc/images/smart_spawning.svg +0 -323
  160. data/doc/images/spawn_server_architecture.png +0 -0
  161. data/doc/images/spawn_server_architecture.svg +0 -655
  162. data/doc/images/spawning_preparation_work.png +0 -0
  163. data/doc/images/startup_sequence.png +0 -0
  164. data/doc/images/typical_isolated_web_application.png +0 -0
  165. data/doc/images/typical_isolated_web_application.svg +0 -213
  166. data/doc/users_guide_snippets/alternative_for_flying_passenger.txt +0 -1
  167. data/doc/users_guide_snippets/analysis_and_system_maintenance.txt +0 -61
  168. data/doc/users_guide_snippets/appendix_a_about.txt +0 -13
  169. data/doc/users_guide_snippets/appendix_b_terminology.txt +0 -71
  170. data/doc/users_guide_snippets/appendix_c_spawning_methods.txt +0 -36
  171. data/doc/users_guide_snippets/deployment_basics.txt +0 -37
  172. data/doc/users_guide_snippets/enterprise_only.txt +0 -1
  173. data/doc/users_guide_snippets/environment_variables.txt +0 -44
  174. data/doc/users_guide_snippets/global_queueing_explained.txt +0 -74
  175. data/doc/users_guide_snippets/installation.txt +0 -228
  176. data/doc/users_guide_snippets/installation/run_installer.txt +0 -58
  177. data/doc/users_guide_snippets/installation/verify_running_epilogue.txt +0 -6
  178. data/doc/users_guide_snippets/passenger_spawn_method.txt +0 -37
  179. data/doc/users_guide_snippets/rackup_specifications.txt +0 -1
  180. data/doc/users_guide_snippets/rvm_helper_tool.txt +0 -44
  181. data/doc/users_guide_snippets/since_version.txt +0 -1
  182. data/doc/users_guide_snippets/support_information.txt +0 -8
  183. data/doc/users_guide_snippets/tips.txt +0 -302
  184. data/doc/users_guide_snippets/troubleshooting/default.txt +0 -48
  185. data/doc/users_guide_snippets/troubleshooting/rails.txt +0 -59
  186. data/doc/users_guide_snippets/under_the_hood/page_caching_support.txt +0 -24
  187. data/doc/users_guide_snippets/under_the_hood/relationship_with_ruby.txt +0 -10
  188. data/doc/users_guide_snippets/where_to_get_support.txt +0 -9
  189. data/src/agent/Shared/Base.cpp +0 -1678
  190. data/src/agent/UstRouter/ApiServer.h +0 -292
  191. data/src/agent/UstRouter/Client.h +0 -112
  192. data/src/agent/UstRouter/Controller.h +0 -1309
  193. data/src/agent/UstRouter/LogSink.h +0 -145
  194. data/src/agent/UstRouter/OptionParser.h +0 -180
  195. data/src/agent/UstRouter/RemoteSender.h +0 -853
  196. data/src/agent/UstRouter/RemoteSink.h +0 -145
  197. data/src/agent/UstRouter/Transaction.h +0 -278
  198. data/src/agent/UstRouter/UstRouterMain.cpp +0 -681
  199. data/src/agent/Watchdog/UstRouterWatcher.cpp +0 -80
  200. data/src/ruby_supportlib/phusion_passenger/platform_info/macos.rb +0 -45
@@ -1 +0,0 @@
1
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/config_ru.html
@@ -1,44 +0,0 @@
1
- .RVM helper tool
2
-
3
- Phusion Passenger provides the `passenger-config --ruby-command` tool for figuring out the correct command for invoking a specific Ruby interpreter. This is especially useful for RVM users. Suppose that you have both Ruby 1.8.7 and Ruby 1.9.3 installed through RVM, and you want to know the correct commands for each Ruby interpreter.
4
-
5
- For this purpose we'll want to invoke `passenger-config` using its full path, because each time you `rvm use` a different Ruby interpreter, RVM changes `$PATH`. If you did not install Phusion Passenger through the generic tarball installation method, then here's how you can figure out where `passenger-config` is:
6
-
7
- ------------------------------
8
- $ which passenger-config
9
- /opt/passenger/bin/passenger-config
10
- ------------------------------
11
-
12
- Now, switch to all the RVM Ruby interpreters you want to use. In each interpreter, invoke `passenger-config --ruby-command`. For Ruby 1.8.7:
13
-
14
- ------------------------------
15
- $ rvm use 1.8.7
16
- $ /opt/passenger/bin/passenger-config --ruby-command
17
- passenger-config was invoked through the following Ruby interpreter:
18
- Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
19
- Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
20
- To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
21
- To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
22
- To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start
23
-
24
-
25
- ## Notes for RVM users
26
- Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.
27
- ------------------------------
28
-
29
- Then, for Ruby 1.9.3:
30
-
31
- ------------------------------
32
- $ rvm use 1.9.3
33
- $ /opt/passenger/bin/passenger-config --ruby-command
34
- passenger-config was invoked through the following Ruby interpreter:
35
- Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
36
- Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
37
- To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
38
- To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
39
- To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start
40
-
41
-
42
- ## Notes for RVM users
43
- Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.
44
- ------------------------------
@@ -1 +0,0 @@
1
- **Introduced in version {version}.**
@@ -1,8 +0,0 @@
1
- === Supported operating systems and languages ===
2
-
3
- This documentation has moved. https://www.phusionpassenger.com/library/install/supported_operating_systems_and_languages.html
4
-
5
- [[where_to_get_support]]
6
- === Where to get support ===
7
-
8
- include::where_to_get_support.txt[]
@@ -1,302 +0,0 @@
1
- [[user_switching]]
2
- === User Switching (security feature) ===
3
-
4
- ifdef::apache[]
5
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/user_sandboxing.html
6
- endif::[]
7
- ifdef::nginx[]
8
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/user_sandboxing.html
9
- endif::[]
10
- ifdef::standalone[]
11
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/standalone/user_sandboxing.html
12
- endif::[]
13
-
14
- ==== Requirements
15
-
16
- ifdef::apache[]
17
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/user_sandboxing.html
18
- endif::[]
19
- ifdef::nginx[]
20
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/user_sandboxing.html
21
- endif::[]
22
- ifdef::standalone[]
23
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/standalone/user_sandboxing.html
24
- endif::[]
25
-
26
- ==== Effects
27
-
28
- ifdef::apache[]
29
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/user_sandboxing.html
30
- endif::[]
31
- ifdef::nginx[]
32
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/user_sandboxing.html
33
- endif::[]
34
- ifdef::standalone[]
35
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/standalone/user_sandboxing.html
36
- endif::[]
37
-
38
- ==== Caveats & troubleshooting
39
-
40
- ifdef::apache[]
41
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/user_sandboxing.html
42
- endif::[]
43
- ifdef::nginx[]
44
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/user_sandboxing.html
45
- endif::[]
46
- ifdef::standalone[]
47
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/standalone/user_sandboxing.html
48
- endif::[]
49
-
50
- [[user_switching_rpm_caveats]]
51
- ==== Red Hat and CentOS caveats
52
-
53
- ifdef::apache[]
54
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/user_sandboxing.html
55
- endif::[]
56
- ifdef::nginx[]
57
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/user_sandboxing.html
58
- endif::[]
59
- ifdef::standalone[]
60
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/standalone/user_sandboxing.html
61
- endif::[]
62
-
63
- [[finding_out_app_user]]
64
- ==== Finding out what user an application is running as
65
-
66
- ifdef::apache[]
67
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/user_sandboxing.html
68
- endif::[]
69
- ifdef::nginx[]
70
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/user_sandboxing.html
71
- endif::[]
72
- ifdef::standalone[]
73
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/standalone/user_sandboxing.html
74
- endif::[]
75
-
76
-
77
- [[reducing_memory_usage]]
78
- === Copy-on-write memory support (reducing memory consumption of Ruby applications) ===
79
-
80
- Phusion Passenger automatically leverages operating system virtual memory copy-on-write features in order to reduce the memory usage of Ruby applications. Experience has shown that this reduces memory usage by 33% on average. For this mechanism to work, a Ruby interpreter with a copy-on-write friendly garbage collector is required. The following Ruby interpreters have copy-on-write friendly garbage collectors:
81
-
82
- - MRI Ruby >= 2.0. Versions prior to 2.0 did not have a copy-on-write friendly garbage collector.
83
- - http://www.rubyenterpriseedition.com/[Ruby Enterprise Edition], which was Phusion's branch of MRI Ruby 1.8 with a copy-on-write friendly garbage collector and other enhancement. It has reached End-Of-Life as of 2012, but remains available for legacy systems.
84
-
85
- [[tuning_sse_websockets]]
86
- === Tuning for Server Sent Events and WebSockets ===
87
-
88
- ifdef::apache[]
89
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/apache/tuning_sse_and_websockets.html
90
- endif::[]
91
- ifdef::nginx[]
92
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/nginx/tuning_sse_and_websockets.html
93
- endif::[]
94
- ifdef::standalone[]
95
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/config/standalone/tuning_sse_and_websockets.html
96
- endif::[]
97
-
98
- [[bundler_support]]
99
- === Bundler support ===
100
-
101
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/indepth/ruby/bundler.html
102
-
103
- [[add_passenger_to_gemfile]]
104
- ==== Does Phusion Passenger itself need to be added to the Gemfile?
105
-
106
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/indepth/ruby/bundler.html#does-passenger-itself-need-to-be-added-to-the-gemfile
107
-
108
- === Installing multiple Ruby on Rails versions ===
109
-
110
- Each Ruby on Rails applications that are going to be deployed may require a
111
- specific Ruby on Rails version. You can install a specific version with
112
- this command:
113
- -----------------------------
114
- gem install rails -v X.X.X
115
- -----------------------------
116
- where 'X.X.X' is the version number of Ruby on Rails.
117
-
118
- All of these versions will exist in parallel, and will not conflict with each
119
- other. Phusion Passenger will automatically make use of the correct version.
120
-
121
- === Making the application restart after each request ===
122
-
123
- In some situations it might be desirable to restart the web application after
124
- each request, for example when developing a non-Rails application that doesn't
125
- support code reloading, or when developing a web framework.
126
-
127
- To achieve this, simply create the file 'tmp/always_restart.txt' in your
128
- application's root folder. Unlike 'restart.txt', Phusion Passenger does not
129
- check for this file's timestamp: Phusion Passenger will always restart the
130
- application, as long as 'always_restart.txt' exists.
131
-
132
- NOTE: If you're just developing a Rails application then you probably don't need
133
- this feature. If you set
134
- ifdef::apache['RailsEnv development']
135
- ifdef::nginx['rails_env development']
136
- in your web server configuration,
137
- then Rails will automatically reload your application code after each request.
138
- 'always_restart.txt' is mostly useful when you're using a web framework that
139
- doesn't support code reloading by itself, of when you're working on a web framework
140
- yourself.
141
-
142
- [[sub_uri_deployment_uri_fix]]
143
- === How to fix broken images/CSS/JavaScript URIs in sub-URI deployments
144
-
145
- Some people experience broken images and other broken static assets when they
146
- deploy their application to a sub-URI (i.e. 'http://mysite.com/railsapp/').
147
- The reason for this usually is that you used a
148
- static URI for your image in the views. This means your 'img' source probably refers
149
- to something like '/images/foo.jpg'. The leading slash means that it's an absolute URI:
150
- you're telling the browser to always load 'http://mysite.com/images/foo.jpg' no
151
- matter what. The problem is that the image is actually at
152
- 'http://mysite.com/railsapp/images/foo.jpg'. There are two ways to fix this.
153
-
154
- The first way (not recommended) is to change your view templates to refer to
155
- 'images/foo.jpg'. This is a relative URI: note the lack of a leading slash). What
156
- this does is making the path relative to the current URI. The problem is that if you
157
- use restful URIs, then your images will probably break again when you add a level to
158
- the URI.
159
- For example, when you're at 'http://mysite.com/railsapp' the browser will look for
160
- 'http://mysite.com/railsapp/images/foo.jpg'. But when you're at
161
- 'http://mysite.com/railsapp/controller'. the browser will look for
162
- 'http://mysite.com/railsapp/controller/images/foo.jpg'.
163
- So relative URIs usually don't work well with layout templates.
164
-
165
- The second and highly recommended way is to always use Rails helper methods to
166
- output tags for static assets. These helper methods automatically take care
167
- of prepending the base URI that you've deployed the application to. For images
168
- there is `image_tag`, for JavaScript there is `javascript_include_tag` and for
169
- CSS there is `stylesheet_link_tag`. In the above example you would simply remove
170
- the '<img>' HTML tag and replace it with inline Ruby like this:
171
-
172
- ---------------------------------------
173
- <%= image_tag("foo.jpg") %>
174
- ---------------------------------------
175
-
176
- This will generate the proper image tag to `$RAILS_ROOT/public/images/foo.jpg`
177
- so that your images will always work no matter what sub-URI you've deployed to.
178
-
179
- These helper methods are more valuable than you may think. For example they also
180
- append a timestamp to the URI to better facilitate HTTP caching. For more information,
181
- please refer to
182
- link:http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html[the Rails API docs].
183
-
184
- === Out-of-Band Work and Out-of-Band Garbage Collection
185
-
186
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/indepth/ruby/out_of_band_work.html
187
-
188
- === Hooks
189
-
190
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/indepth/hooks.html
191
-
192
- ==== Example
193
-
194
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/indepth/hooks.html#example
195
-
196
- ==== Environment
197
-
198
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/indepth/hooks.html#environment
199
-
200
- ==== Blocking and concurrency
201
-
202
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/indepth/hooks.html#blocking-and-concurrency
203
-
204
- ==== Error handling
205
-
206
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/indepth/hooks.html#error-handling
207
-
208
- ==== Compatibility
209
-
210
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/indepth/hooks.html#compatibility
211
-
212
- ==== Available hooks
213
-
214
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/indepth/hooks.html#available-hooks
215
-
216
- [[flying_passenger]]
217
- === Flying Passenger
218
-
219
- ifdef::apache[]
220
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/flying_passenger.html
221
- endif::[]
222
- ifdef::nginx[]
223
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
224
- endif::[]
225
- ifdef::standalone[]
226
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
227
- endif::[]
228
-
229
- ==== Requirements
230
-
231
- ifdef::apache[]
232
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/flying_passenger.html
233
- endif::[]
234
- ifdef::nginx[]
235
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
236
- endif::[]
237
- ifdef::standalone[]
238
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
239
- endif::[]
240
-
241
- ==== Basic usage
242
-
243
- ifdef::apache[]
244
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/flying_passenger.html
245
- endif::[]
246
- ifdef::nginx[]
247
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
248
- endif::[]
249
- ifdef::standalone[]
250
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
251
- endif::[]
252
-
253
- [[configuring_flying_passenger]]
254
- ==== Configuring Flying Passenger
255
-
256
- ifdef::apache[]
257
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/flying_passenger.html
258
- endif::[]
259
- ifdef::nginx[]
260
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
261
- endif::[]
262
- ifdef::standalone[]
263
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
264
- endif::[]
265
-
266
- ==== Managing the Flying Passenger daemon
267
-
268
- ifdef::apache[]
269
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/flying_passenger.html
270
- endif::[]
271
- ifdef::nginx[]
272
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
273
- endif::[]
274
- ifdef::standalone[]
275
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
276
- endif::[]
277
-
278
- [[using_flying_passenger_with_mri_18_or_jruby]]
279
- ==== Using Flying Passenger with MRI 1.8 or JRuby
280
-
281
- ifdef::apache[]
282
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/flying_passenger.html
283
- endif::[]
284
- ifdef::nginx[]
285
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
286
- endif::[]
287
- ifdef::standalone[]
288
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
289
- endif::[]
290
-
291
- [[flying_passenger_caveats]]
292
- ==== Caveats and limitations
293
-
294
- ifdef::apache[]
295
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/apache/flying_passenger.html
296
- endif::[]
297
- ifdef::nginx[]
298
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
299
- endif::[]
300
- ifdef::standalone[]
301
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/deploy/nginx/flying_passenger.html
302
- endif::[]
@@ -1,48 +0,0 @@
1
- === Generic troubleshooting tips
2
-
3
- ifdef::apache[]
4
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/
5
- endif::[]
6
- ifdef::nginx[]
7
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/
8
- endif::[]
9
- ifdef::standalone[]
10
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/
11
- endif::[]
12
-
13
-
14
- ifndef::standalone[]
15
- === Why does the first request take a long time?
16
-
17
- ifdef::nginx[]
18
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/?a=why-does-the-first-request-take-a-long-time
19
- endif::[]
20
- ifdef::apache[]
21
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/?a=why-does-the-first-request-take-a-long-time
22
- endif::[]
23
-
24
-
25
- ifdef::nginx[]
26
- === Upon accessing the web app, Nginx reports a "Permission denied" error
27
-
28
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/?a=upon-accessing-the-web-app-nginx-reports-a-permission-denied-error
29
- endif::[]
30
-
31
-
32
- ifdef::standalone[]
33
- === Upon uploading a file, Phusion Passenger reports "client_body_temp/00000000xx failed (2: No such file or directory)"
34
-
35
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/?a=upon-uploading-a-file-passenger-reports-client_body_temp-00000000xx-failed-2-no-such-file-or-directory
36
- endif::[]
37
-
38
- === I get "command not found" when running a Phusion Passenger command through sudo
39
-
40
- ifdef::apache[]
41
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/?a=i-get-command-not-found-when-running-a-passenger-command-through-sudo
42
- endif::[]
43
- ifdef::nginx[]
44
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/?a=i-get-command-not-found-when-running-a-passenger-command-through-sudo
45
- endif::[]
46
- ifdef::standalone[]
47
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/?a=i-get-command-not-found-when-running-a-passenger-command-through-sudo
48
- endif::[]
@@ -1,59 +0,0 @@
1
- === Ruby on Rails-specific troubleshooting
2
-
3
- ==== The "About your application's environment" link does not work
4
-
5
- ifdef::apache[]
6
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/ruby/#the-about-your-application-s-environment-link-does-not-work
7
- endif::[]
8
- ifdef::nginx[]
9
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/ruby/#the-about-your-application-s-environment-link-does-not-work
10
- endif::[]
11
- ifdef::standalone[]
12
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/ruby/#the-about-your-application-s-environment-link-does-not-work
13
- endif::[]
14
-
15
-
16
-
17
- ==== The Rails application reports that it's unable to start because of a permission error
18
-
19
- ifdef::apache[]
20
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/ruby/#the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error
21
- endif::[]
22
- ifdef::nginx[]
23
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/ruby/#the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error
24
- endif::[]
25
- ifdef::standalone[]
26
- This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/ruby/#the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error
27
- endif::[]
28
-
29
-
30
- ==== The Rails application's log file is not being written to
31
-
32
- There are a couple things that you should be aware of:
33
-
34
- - By default, Phusion Passenger runs Rails applications in 'production' mode,
35
- so please be sure to check `production.log` instead of `development.log`.
36
- +
37
- See
38
- ifdef::apache[]
39
- <<RailsEnv,RailsEnv>>
40
- endif::[]
41
- ifdef::nginx[]
42
- <<RailsEnv,rails_env>>
43
- endif::[]
44
- for configuration.
45
- - By default, Phusion Passenger runs Rails applications as the owner of `config.ru`.
46
- So the log file can only be written to if that user has write permission to the
47
- log file. Please `chmod` or `chown` your log file accordingly.
48
- +
49
- See <<User_switching,User switching (security)>> for details.
50
-
51
- If you're using a RedHat-derived Linux distribution (such as Fedora or CentOS)
52
- then it is link:http://code.google.com/p/phusion-passenger/issues/detail?id=4[possible
53
- that SELinux is interfering]. RedHat's SELinux policy only allows Apache to read/write
54
- directories that have the 'httpd_sys_content_t' security context. Please run the
55
- following command to give your Rails application folder that context:
56
-
57
- -----------------------------------------------------------
58
- chcon -R -h -t httpd_sys_content_t /path/to/your/rails/app
59
- -----------------------------------------------------------