passenger 5.0.14 → 5.0.15

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 (70) hide show
  1. checksums.yaml +8 -8
  2. checksums.yaml.gz.asc +7 -7
  3. data.tar.gz.asc +7 -7
  4. data/CHANGELOG +9 -0
  5. data/INSTALL.md +1 -1
  6. data/LICENSE +1 -1
  7. data/README.md +1 -1
  8. data/bin/passenger-install-apache2-module +6 -10
  9. data/bin/passenger-install-nginx-module +6 -9
  10. data/doc/CloudLicensingConfiguration.html +1 -216
  11. data/doc/CloudLicensingConfiguration.txt.md +1 -192
  12. data/doc/Design and Architecture.html +4 -4
  13. data/doc/Design and Architecture.txt +4 -4
  14. data/doc/ServerOptimizationGuide.html +1 -489
  15. data/doc/ServerOptimizationGuide.txt.md +1 -399
  16. data/doc/Users guide Apache.html +594 -6720
  17. data/doc/Users guide Apache.idmap.txt +15 -12
  18. data/doc/Users guide Apache.txt +113 -2047
  19. data/doc/Users guide Nginx.html +565 -6720
  20. data/doc/Users guide Nginx.idmap.txt +15 -12
  21. data/doc/Users guide Nginx.txt +94 -1862
  22. data/doc/Users guide Standalone.html +53 -2183
  23. data/doc/Users guide Standalone.idmap.txt +9 -6
  24. data/doc/Users guide Standalone.txt +16 -360
  25. data/doc/Users guide.html +3 -145
  26. data/doc/Users guide.txt +2 -54
  27. data/doc/users_guide_snippets/analysis_and_system_maintenance.txt +36 -175
  28. data/doc/users_guide_snippets/appendix_c_spawning_methods.txt +9 -215
  29. data/doc/users_guide_snippets/environment_variables.txt +11 -243
  30. data/doc/users_guide_snippets/installation.txt +66 -946
  31. data/doc/users_guide_snippets/rackup_specifications.txt +1 -75
  32. data/doc/users_guide_snippets/support_information.txt +1 -48
  33. data/doc/users_guide_snippets/tips.txt +103 -704
  34. data/doc/users_guide_snippets/troubleshooting/default.txt +16 -130
  35. data/doc/users_guide_snippets/troubleshooting/rails.txt +15 -12
  36. data/doc/users_guide_snippets/under_the_hood/relationship_with_ruby.txt +2 -113
  37. data/ext/apache2/Configuration.hpp +2 -2
  38. data/ext/apache2/Hooks.cpp +2 -2
  39. data/ext/common/AgentsStarter.h +18 -10
  40. data/ext/common/ApplicationPool2/ErrorRenderer.h +0 -3
  41. data/ext/common/ApplicationPool2/Options.h +8 -1
  42. data/ext/common/Constants.h +3 -9
  43. data/ext/common/agent/Core/RequestHandler/InitRequest.cpp +2 -0
  44. data/ext/common/agent/Watchdog/Main.cpp +1 -1
  45. data/ext/nginx/ContentHandler.c +2 -3
  46. data/ext/nginx/config +2 -2
  47. data/lib/phusion_passenger.rb +1 -22
  48. data/lib/phusion_passenger/abstract_installer.rb +10 -10
  49. data/lib/phusion_passenger/config/agent_compiler.rb +5 -5
  50. data/lib/phusion_passenger/config/nginx_engine_compiler.rb +4 -4
  51. data/lib/phusion_passenger/config/validate_install_command.rb +3 -3
  52. data/lib/phusion_passenger/constants.rb +1 -5
  53. data/lib/phusion_passenger/loader_shared_helpers.rb +16 -5
  54. data/lib/phusion_passenger/platform_info/apache_detector.rb +2 -2
  55. data/lib/phusion_passenger/public_api.rb +11 -2
  56. data/lib/phusion_passenger/request_handler/thread_handler.rb +2 -3
  57. data/lib/phusion_passenger/ruby_core_io_enhancements.rb +4 -1
  58. data/lib/phusion_passenger/standalone/start_command.rb +1 -1
  59. data/resources/oss-binaries.phusionpassenger.com.crt +124 -0
  60. data/resources/templates/apache2/deployment_example.txt.erb +5 -23
  61. data/resources/templates/apache2/installing_against_a_different_apache.txt.erb +3 -4
  62. data/resources/templates/apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb +3 -3
  63. data/resources/templates/apache2/rpm_installation_recommended.txt.erb +1 -1
  64. data/resources/templates/installer_common/low_amount_of_memory_warning.txt.erb +4 -5
  65. data/resources/templates/nginx/deployment_example.txt.erb +5 -17
  66. data/resources/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb +3 -3
  67. data/resources/templates/standalone/config.erb +1 -1
  68. data/resources/templates/undisclosed_error.html.template +4 -11
  69. metadata +2 -2
  70. metadata.gz.asc +7 -7
@@ -1,162 +1,48 @@
1
1
  === Generic troubleshooting tips
2
2
 
3
- One of the first things you should do upon encountering a problem, is to check
4
3
  ifdef::apache[]
5
- the *global* (not the per-vhost) Apache error log file. This is typically located in `/var/log/apache2/error_log`. You can find out the exact location of the error log by running `passenger-config --detect-apache2`.
4
+ This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/apache/troubleshooting/
6
5
  endif::[]
7
6
  ifdef::nginx[]
8
- the global Nginx error log file. This is one specified by the `error_log` directive in the main context (*not* the one inside the `http` context). The file is typically located in /var/log/nginx/error.log.
9
- endif::[]
10
- ifndef::standalone[]
11
- This log file contains:
12
-
13
- * Phusion Passenger error messages.
14
- * Everything that the application writes to STDERR. This typically consists of errors that the application encounters during startup, but not errors that it encounters when it's handling requests.
15
-
7
+ This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/
16
8
  endif::[]
17
9
  ifdef::standalone[]
18
- Phusion Passenger Standalone log file. This is typically located in `log/passenger.[PORT NUMBER].log`. Most problems are logged to this log file.
19
- endif::[]
20
-
21
- ifndef::standalone[]
22
- If you're using Ruby on Rails, then you should also check out `log/development.log` and `log/production.log`. When an error occurs during request handling, it is typically logged here. This file does **not** contain errors that Rails encounters during startup.
23
-
24
- Finally, you should be aware that Phusion Passenger runs your application under the 'production' environment by default, not 'development'. You can change this using the
25
- ifdef::apache[]
26
- <<RailsEnv,RailsEnv>>
27
- endif::[]
28
- ifdef::nginx[]
29
- <<RailsEnv,rails_env>>
30
- endif::[]
31
- option.
10
+ This documentation has moved. Please visit https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/
32
11
  endif::[]
33
12
 
34
- If neither the logs nor this troubleshooting guide can help you, then please check out our <<where_to_get_support,support resources>>.
35
-
36
13
 
37
14
  ifndef::standalone[]
38
15
  === Why does the first request take a long time?
39
16
 
40
- **Symptoms**::
41
- The first request to your application takes more time than usual. Subsequent requests have the normal speed.
42
-
43
- **Cause**::
44
- Phusion Passenger starts your application the first time it is accessed, not during web server startup. Some applications can take several seconds to start. If you're using Ruby on Rails, then needing 10 seconds to start your application is normal. On slow or heavily loaded servers, or in case of large and heavy applications, the startup time may be even longer.
45
-
46
- **Solution**::
47
- Use the
48
17
  ifdef::nginx[]
49
- <<PassengerPreStart,passenger_pre_start>>
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
50
19
  endif::[]
51
20
  ifdef::apache[]
52
- <<PassengerPreStart,PassengerPreStart>>
53
- endif::[]
54
- configuration option.
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
55
22
  endif::[]
56
23
 
57
24
 
58
25
  ifdef::nginx[]
59
26
  === Upon accessing the web app, Nginx reports a "Permission denied" error
60
27
 
61
- **Symptoms**::
62
- A typical error message looks like this:
63
- +
64
- ---------------------------------------------
65
- 2013/10/21 17:16:03 [alert] 98687#0: *1 Cannot stat
66
- '/Users/phusion/Sites/rack.test/config.ru': Permission denied (errno=13); This
67
- error means that the Nginx worker process (PID 99064, running as UID 70) does
68
- not have permission to access this file. Please read the manual to learn how to
69
- fix this problem: section 'Troubleshooting' -> 'Upon accessing the web app,
70
- Nginx reports a "Permission denied" error'; Extra info, client: 127.0.0.1,
71
- server: www.foo.com, request: "GET / HTTP/1.1", host: "www.foo.com"
72
- ---------------------------------------------
73
-
74
- **Cause**::
75
- Phusion Passenger tries to access your application directory in order to find out what language it's written in. This access is initiated from inside an Nginx worker process. This error indicates that the Nginx worker process does not have the proper permissions to access your application's root directory.
76
-
77
- **Solution**::
78
- You need to relax permissions to that the Nginx worker process can access your application directory, by making the directory group- and world-*executable*:
79
- +
80
- ---------------------------------------------------
81
- sudo chmod g+x,o+x /Users/phusion/Sites/rack.test
82
- ---------------------------------------------------
83
- +
84
- You *also* need to ensure that all parent directories are also 'executable' by the Nginx process:
85
- +
86
- ---------------------------------------------------
87
- sudo chmod g+x,o+x /Users/phusion/Sites
88
- sudo chmod g+x,o+x /Users/phusion
89
- sudo chmod g+x,o+x /Users
90
- ---------------------------------------------------
91
- +
92
- .Why 'executable' permission and not 'readable'?
93
- [NOTE]
94
- On Unix, the 'executable' permission on directories dictates whether a process is allowed to *access* files or subdirectories within that directory. The 'readable' permission dictates whether a process is allowed to see what files are inside the directory, but does not necessarily allow access to them. You can learn more at link:http://en.wikipedia.org/wiki/File_system_permissions#Permissions[Wikipedia].
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
95
29
  endif::[]
96
30
 
97
31
 
98
32
  ifdef::standalone[]
99
33
  === Upon uploading a file, Phusion Passenger reports "client_body_temp/00000000xx failed (2: No such file or directory)"
100
34
 
101
- **Symptoms**::
102
- When performing an HTTP POST call, the request sometimes fails, with Phusion Passenger reporting an error along the lines of:
103
- +
104
- -------------------------
105
- /tmp/passenger-standalone.8583/client_body_temp/0000000022" failed (2: No such
106
- file or directory), client: 127.0.0.1, server: www.foo.com
107
- -------------------------
108
-
109
- **Cause**::
110
- Phusion Passenger buffers HTTP POST bodies (file uploads) to a temporary directory, by default `/tmp/passenger-standalone.xxx`. This error means that Phusion Passenger that that directory has been removed, probably by some other program.
111
-
112
- **Solution**::
113
- Tell Phusion Passenger to use a different directory to store its temporary files passing the `--temp-dir` command line option. For example:
114
- +
115
- ---------------------------------------
116
- mkdir $HOME/tmp
117
- cd /path-to-your-app
118
- passenger start --temp-dir=$HOME/tmp
119
- ---------------------------------------
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
120
36
  endif::[]
121
37
 
122
38
  === I get "command not found" when running a Phusion Passenger command through sudo
123
39
 
124
- **Symptoms**::
125
- Phusion Passenger commands can be found as a normal user, but not when run through sudo:
126
- +
127
- -------------------------
128
- $ passenger-status
129
- ...some output, but no "command not found" error...
130
- $ passenger-install-apache2-module
131
- ...some output, but no "command not found" error...
132
- $ sudo passenger-status
133
- sudo: passenger-status: command not found
134
- $ sudo passenger-install-apache2-module
135
- sudo: passenger-install-apache2-module: command not found
136
- -------------------------
137
-
138
- **Cause**::
139
- The operating system looks up commands using <<the_path_env_var,the PATH environment variable>>. However, sudo resets all environment variables to a default value, dictated by sudo. If Phusion Passenger was installed to a location that is not in the default sudo PATH value, then sudo will not be able to find the Phusion Passenger commands.
140
- +
141
- In addition, if you installed Phusion Passenger using a Ruby interpreter that was installed through RVM, then you **must** use rvmsudo instead of sudo. As a rule, when you're an RVM user, always use rvmsudo instead of sudo.
142
-
143
- **Solution**::
144
- Execute the command using its full path. You can use `which` as a normal user to lookup the full path:
145
- +
146
- ---------------------------------------
147
- $ which passenger-status
148
- /somewhere/bin/passenger-status
149
- ---------------------------------------
150
- +
151
- Next, run full path of the command using either sudo or rvmsudo:
152
- +
153
- ---------------------------------------
154
- $ sudo /somewhere/bin/passenger-status
155
-
156
- # -OR, if you're using RVM:-
157
-
158
- $ rvmsudo /somewhere/bin/passenger-status
159
- ---------------------------------------
160
-
161
- **Recommended reading**::
162
- When using sudo, you will probably run into similar "command not found" issues in the future, with components other than Phusion Passenger. We **strongly recommend** you to <<about_environment_variables,learn about environment variables>> so that you know what to do in the future.
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::[]
@@ -2,26 +2,29 @@
2
2
 
3
3
  ==== The "About your application's environment" link does not work
4
4
 
5
- The "About your application's environment" link only works if the application is started in the 'development' environment. Phusion Passenger starts the application in the 'production' environment by default. Please use
6
5
  ifdef::apache[]
7
- <<RailsEnv,RailsEnv>>
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
8
7
  endif::[]
9
8
  ifdef::nginx[]
10
- <<RailsEnv,rails_env>>
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
11
13
  endif::[]
12
- to change it.
13
14
 
14
15
 
15
- ==== The Rails application reports that it's unable to start because of a permission error
16
16
 
17
- Please check whether your Rails application's folder has the correct
18
- permissions. By default, Rails applications are started as the owner of the
19
- file `config.ru`, except if the file is owned by root. If the
20
- file is owned by root, then the Rails application will be started as 'nobody'
21
- (or as the user specify by <<RailsDefaultUser,RailsDefaultUser>>, if that's
22
- specified).
17
+ ==== The Rails application reports that it's unable to start because of a permission error
23
18
 
24
- Please read <<user_switching,User switching (security)>> for details.
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::[]
25
28
 
26
29
 
27
30
  ==== The Rails application's log file is not being written to
@@ -3,119 +3,8 @@
3
3
 
4
4
  ==== How Ruby is used
5
5
 
6
- Phusion Passenger's core is written in C++ for performance and memory efficiency. It supports web applications written in any language. Phusion Passenger requires Ruby, its usage of Ruby is minimal in order to maximize performance and to minimize memory usage.
7
-
8
- * Phusion Passenger's installer, build system and administration tools are written in Ruby.
9
- * Certain internally used tools, such as the crash handler (which generates a backtrace in case Phusion Passenger crash) and the prespawn script (used to implement
10
- ifdef::apache[]
11
- <<PassengerPreStart,PassengerPreStart>>)
12
- endif::[]
13
- ifdef::nginx[]
14
- <<PassengerPreStart,passenger_pre_start>>)
15
- endif::[]
16
- ifdef::standalone[]
17
- <<PassengerPreStart,passenger_pre_start>>)
18
- endif::[]
19
- are written in Ruby as well.
20
-
21
- * Ruby web application support is implemented in Ruby.
22
- * If you use <<flying_passenger,Flying Passenger>>, then the Flying Passenger daemon is written in Ruby. The daemon is a small (less than 500 lines of code) and offloads most tasks to the C++ core.
23
- * If you use link:Users%20guide%20Standalone.html[Phusion Passenger Standalone], then the frontend (the `passenger` command) is written in Ruby. The frontend is small (less than 1500 lines of code) and offloads most tasks to the C++ core.
24
-
25
- Other than the aforementioned aspects, Phusion Passenger does not use Ruby during normal operation. For example, if you run Python WSGI web applications on Phusion Passenger, then there will be (almost) no Ruby code running on the system.
6
+ This documentation has moved. Please visit https://www.phusionpassenger.com/library/indepth/lightweight_ruby_dependency.html
26
7
 
27
8
  ==== When the system has multiple Ruby interpreters
28
9
 
29
- Phusion Passenger may be installed with any Ruby interpreter. Once installed, you can run Phusion Passenger's Ruby parts under any Ruby interpreter you want, even if that Ruby interpreter was not the one you originally installed Phusion Passenger with.
30
-
31
- The reason for this is that Phusion Passenger does not dynamically link to Ruby: Phusion Passenger uses Ruby entirely out-of-process. Thus you can switch to any Ruby interpreter you want during runtime, without recompiling Phusion Passenger, and without worrying about what Ruby you used to install Phusion Passenger.
32
-
33
- Phusion Passenger is also capable of running Ruby web applications under any Ruby interpreter you want. So it is not important which Ruby you use to install Phusion Passenger: it will work regardless. Please refer to the documentation for the
34
- ifdef::apache[]
35
- <<PassengerRuby,PassengerRuby>>
36
- endif::[]
37
- ifdef::nginx[]
38
- <<PassengerRuby,passenger_ruby>>
39
- endif::[]
40
- ifdef::standalone[]
41
- <<PassengerRuby,passenger_ruby>>
42
- endif::[]
43
- directive to learn how run different web applications under different Ruby interpreters.
44
-
45
- .Caveat: RVM and RVM gemsets
46
-
47
- There is however one caveat if you happen to be using RVM or RVM gemsets. When you `gem install` Phusion Passenger using RVM, then RVM will install Phusion Passenger into the *currently active RVM Ruby and gemset*. This means that Phusion Passenger commands - such as `passenger`, `passenger-install-xxx-module` and `passenger-status` - are available in that same RVM Ruby and gemset only. When you switch Ruby interpreter, or when you switch gemset, the Phusion Passenger commands will no longer be available, and you will get a `command not found` error. Here's an example which demonstrates the problem.
48
-
49
- ."Command not found" problem demonstration
50
- [source,sh]
51
- ------------------------
52
- ## Install Phusion Passenger (open source edition) using Ruby 1.9.3
53
- ## and the 'business' gemset
54
- $ rvm use 1.9.3
55
- Using /home/phusion/.rvm/gems/ruby-1.9.3-p429
56
- $ rvm gemset create business
57
- $ rvm gemset use business
58
- Using ruby-1.9.3-p429 with gemset business
59
- $ curl -O https://s3.amazonaws.com/phusion-passenger/releases/gem_bootstrap.sh
60
- $ eval "`sh gem_bootstrap.sh`"
61
- $ gem install passenger
62
-
63
- ## Verify that passenger works
64
- $ passenger --version
65
- Phusion Passenger version 4.0.14
66
-
67
- ## Switch to a different RVM gemset. You will get a `command not found`
68
- $ rvm gemset use default
69
- Using ruby-1.9.3-p429 with gemset default
70
- $ passenger --version
71
- bash: passenger: command not found
72
-
73
- ## Switch to a different Ruby interpreter. You will also get
74
- ## a `command not found`
75
- $ rvm use 2.0.0
76
- Using /home/phusion/.rvm/gems/ruby-2.0.0-p195
77
- $ passenger --version
78
- bash: passenger: command not found
79
-
80
- ## Switch back to the Ruby and gemset that you installed Phusion
81
- ## Passenger with, and verify that it works again
82
- $ rvm use 1.9.3
83
- Using /home/phusion/.rvm/gems/ruby-2.0.0-p195
84
- $ rvm gemset use business
85
- Using ruby-1.9.3-p429 with gemset business
86
- $ passenger --version
87
- Phusion Passenger version 4.0.14
88
- ------------------------
89
-
90
- .Solutions
91
- There are several ways to solve this problem:
92
-
93
- 1. Permanently add Phusion Passenger's command directory to your PATH, so that your shell can always find them even when you switch RVM Ruby or gemset. If you don't know what PATH means, please read <<about_environment_variable,About environment variables>> first.
94
- +
95
- The drawback is that you have to redo this every time you upgrade Phusion Passenger, because the Phusion Passenger directory filename is dependent on the version number.
96
- +
97
- First, identify the location of the Phusion Passenger command directory, like this:
98
- +
99
- ------------------------------------------------------------------
100
- $ echo `passenger-config --root`/bin
101
- /home/phusion/.rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.15/bin
102
- ------------------------------------------------------------------
103
- +
104
- Next, add the directory that you've found to your current shell's PATH:
105
- +
106
- ------------------------------------------------------------------
107
- $ export PATH=/home/phusion/.rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.15/bin:$PATH
108
- ------------------------------------------------------------------
109
- +
110
- Finally, make the change permanent by appending the above command to your bash startup file:
111
- +
112
- ------------------------------------------------------------------
113
- $ echo 'export PATH=/home/phusion/.rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.15/bin:$PATH' >> ~/.bashrc
114
- ------------------------------------------------------------------
115
- 2. Switch back to the RVM Ruby and gemset that you installed Phusion Passenger with, before running any Phusion Passenger command.
116
- 3. Prepend any Phusion Passenger command with `rvm-exec RUBY_NAME@GEMSET_NAME ruby -S`. If the relevant Phusion Passenger command also needs root privileges, then prepend `rvmsudo` before that. For example:
117
- +
118
- ------------------------------------------------------------------
119
- rvm-exec 1.9.3@business ruby -S passenger --version
120
- rvmsudo rvm-exec 1.9.3@business ruby -S passenger-install-apache2-module
121
- ------------------------------------------------------------------
10
+ This documentation has moved. Please visit https://www.phusionpassenger.com/library/indepth/ruby/multiple_rubies.html
@@ -75,8 +75,8 @@ struct DirConfig : GeneratedDirConfigPart {
75
75
  const char *appRoot;
76
76
 
77
77
  /** Whether symlinks in the document root path should be resolved.
78
- * The implication of this is documented in the users guide, section
79
- * "How Phusion Passenger detects whether a virtual host is a web application".
78
+ * The implication of this is documented at
79
+ * https://www.phusionpassenger.com/library/indepth/ruby/app_autodetection/apache/.
80
80
  */
81
81
  Threeway resolveSymlinksInDocRoot;
82
82
 
@@ -153,8 +153,8 @@ private:
153
153
  if (selinuxIsEnforcing()) {
154
154
  ap_rputs("<p>", r);
155
155
  ap_rputs("The permission problems may also be caused by SELinux restrictions. ", r);
156
- ap_rputs("Please read " APACHE2_DOC_URL "#apache_selinux_permissions to learn ", r);
157
- ap_rputs("how to fix SELinux permission issues. ", r);
156
+ ap_rputs("Please read https://www.phusionpassenger.com/library/admin/apache/troubleshooting/?a=apache-cannot-access-my-app-s-files-because-of-selinux-errors ", r);
157
+ ap_rputs("to learn how to fix SELinux permission issues. ", r);
158
158
  ap_rputs("</p>", r);
159
159
  }
160
160
  #endif
@@ -210,18 +210,26 @@ private:
210
210
  }
211
211
 
212
212
  void throwEnrichedWatchdogFailReason(string simpleReason) {
213
- string passengerRootConfig;
214
- string docURL;
215
- if (type == AS_APACHE) {
216
- passengerRootConfig = "PassengerRoot";
217
- docURL = APACHE2_DOC_URL "#PassengerRoot";
213
+ if (type == AS_STANDALONE) {
214
+ throw RuntimeException("Unable to start " PROGRAM_NAME ": " + simpleReason +
215
+ ". This probably means that your " SHORT_PROGRAM_NAME
216
+ " installation is broken or incomplete. Please try reinstalling " SHORT_PROGRAM_NAME);
218
217
  } else {
219
- passengerRootConfig = "passenger_root";
220
- docURL = NGINX_DOC_URL "#PassengerRoot";
218
+ string passengerRootConfig;
219
+ string docURL;
220
+ if (type == AS_APACHE) {
221
+ passengerRootConfig = "PassengerRoot";
222
+ docURL = "https://www.phusionpassenger.com/library/config/apache/reference/#passengerroot";
223
+ } else {
224
+ passengerRootConfig = "passenger_root";
225
+ docURL = "https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_root";
226
+ }
227
+ throw RuntimeException("Unable to start " PROGRAM_NAME ": " + simpleReason +
228
+ ". This probably means that your " SHORT_PROGRAM_NAME
229
+ " installation is broken or incomplete, or that your '" + passengerRootConfig +
230
+ "' setting contains the wrong value. Please reinstall " SHORT_PROGRAM_NAME
231
+ " or, or see " + docURL + " to learn how to adjust the setting.");
221
232
  }
222
- throw RuntimeException("Unable to start Phusion Passenger: " + simpleReason + ". This probably means that your " PROGRAM_NAME
223
- " installation is broken or incomplete, or that your '" + passengerRootConfig + "' setting contains the wrong value."
224
- " Please reinstall " PROGRAM_NAME " or adjust the setting (see: " + docURL + ").");
225
233
  }
226
234
 
227
235
  static void killProcessGroupAndWait(pid_t *pid, unsigned long long timeout = 0) {
@@ -104,9 +104,6 @@ public:
104
104
  StringMap<StaticString> params;
105
105
 
106
106
  params.set("PROGRAM_NAME", PROGRAM_NAME);
107
- params.set("NGINX_DOC_URL", NGINX_DOC_URL);
108
- params.set("APACHE2_DOC_URL", APACHE2_DOC_URL);
109
- params.set("STANDALONE_DOC_URL", STANDALONE_DOC_URL);
110
107
 
111
108
  return Template::apply(readAll(templateFile), params);
112
109
  }
@@ -102,6 +102,8 @@ private:
102
102
  result.push_back(&options.preexecChroot);
103
103
  result.push_back(&options.postexecChroot);
104
104
 
105
+ result.push_back(&options.integrationMode);
106
+
105
107
  result.push_back(&options.ruby);
106
108
  result.push_back(&options.python);
107
109
  result.push_back(&options.nodejs);
@@ -244,6 +246,8 @@ public:
244
246
  StaticString preexecChroot;
245
247
  StaticString postexecChroot;
246
248
 
249
+ StaticString integrationMode;
250
+
247
251
  /**
248
252
  * Path to the Ruby interpreter to use, in case the application to spawn
249
253
  * is a Ruby app.
@@ -460,6 +464,7 @@ public:
460
464
  baseURI("/", 1),
461
465
  spawnMethod(DEFAULT_SPAWN_METHOD, sizeof(DEFAULT_SPAWN_METHOD) - 1),
462
466
  defaultUser(PASSENGER_DEFAULT_USER, sizeof(PASSENGER_DEFAULT_USER) - 1),
467
+ integrationMode(DEFAULT_INTEGRATION_MODE, sizeof(DEFAULT_INTEGRATION_MODE) - 1),
463
468
  ruby(DEFAULT_RUBY, sizeof(DEFAULT_RUBY) - 1),
464
469
  python(DEFAULT_PYTHON, sizeof(DEFAULT_PYTHON) - 1),
465
470
  nodejs(DEFAULT_NODEJS, sizeof(DEFAULT_NODEJS) - 1),
@@ -593,6 +598,7 @@ public:
593
598
  appendKeyValue (vec, "restart_dir", restartDir);
594
599
  appendKeyValue (vec, "preexec_chroot", preexecChroot);
595
600
  appendKeyValue (vec, "postexec_chroot", postexecChroot);
601
+ appendKeyValue (vec, "integration_mode", integrationMode);
596
602
  appendKeyValue (vec, "ruby", ruby);
597
603
  appendKeyValue (vec, "python", python);
598
604
  appendKeyValue (vec, "nodejs", nodejs);
@@ -602,7 +608,6 @@ public:
602
608
  appendKeyValue (vec, "ust_router_password", ustRouterPassword);
603
609
  appendKeyValue4(vec, "debugger", debugger);
604
610
  appendKeyValue4(vec, "analytics", analytics);
605
-
606
611
  appendKeyValue (vec, "api_key", apiKey);
607
612
 
608
613
  /*********************************/
@@ -612,6 +617,8 @@ public:
612
617
  appendKeyValue3(vec, "max_processes", maxProcesses);
613
618
  appendKeyValue2(vec, "max_preloader_idle_time", maxPreloaderIdleTime);
614
619
  appendKeyValue3(vec, "max_out_of_band_work_instances", maxOutOfBandWorkInstances);
620
+ }
621
+ if ((fields & SPAWN_OPTIONS) || (fields & PER_GROUP_POOL_OPTIONS)) {
615
622
  appendKeyValue (vec, "union_station_key", unionStationKey);
616
623
  }
617
624