doc/Users guide Apache.txt in passenger-3.9.2.beta vs doc/Users guide Apache.txt in passenger-4.0.0.rc4

- old
+ new

@@ -489,19 +489,38 @@ [[PassengerRuby]] === PassengerRuby <filename> === This option allows one to specify the Ruby interpreter to use. -This option may occur in the following places: +Since version 4.0.0, this option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `<Directory>` or `<Location>` block. * In '.htaccess', if `AllowOverride Options` is on. -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. +If you want to use a different Ruby interpreter for two different applications then you should define different `PassengerRuby` directives in different virtual host blocks. +In versions prior to 4.0.0, only a single Ruby version is supported for the entire Apache instance, so `PassengerRuby` may only occur in the global server configuration. + +The default value is 'ruby', meaning that the Ruby interpreter will be looked up according to the `PATH` environment variable. + +=== PassengerPython <filename> === +:version: 4.0.0 +include::users_guide_snippets/since_version.txt[] + +This option allows one to specify the Python interpreter to use. It may occur in the following places: + + * In the global server configuration. + * In a virtual host configuration block. + * In a `<Directory>` or `<Location>` block. + * In '.htaccess', if `AllowOverride Options` is on. + +If you want to use a different Python interpreter for two different applications then you should define different `PassengerPython` directives in different virtual host blocks. + +The default value is 'python', meaning that the Python interpreter will be looked up according to the `PATH` environment variable. + [[PassengerAppRoot]] === PassengerAppRoot <path/to/root> === By default, Phusion Passenger assumes that the application's root directory is the parent directory of the 'public' directory. This option allows one to specify the application's root independently from the DocumentRoot, which @@ -551,10 +570,11 @@ * In the global server configuration. * In a virtual host configuration block. In each place, it may be specified at most once. The default value is 'smart-lv2'. +[[PassengerEnabled]] === PassengerEnabled <on|off> === You can set this option to 'off' to completely disable Phusion Passenger for a certain location. This is useful if, for example, you want to integrate a PHP application into the same virtual host as a Rails application. @@ -1268,39 +1288,23 @@ * In the global server configuration. * In a virtual host configuration block. * In a `<Directory>` or `<Location>` block. * In '.htaccess', if `AllowOverride Limits` is on. -In each place, it may be specified at most once. The default value is '200'. +In each place, it may be specified at most once. The default value is '0'. [NOTE] .A word about permissions ===================================================== -The <<PassengerMemoryLimit,PassengerMemoryLimit>> directive requires that the -user that the application is running as (see <<PassengerUserSwitching,PassengerUserSwitching>>) -to have access to the `/proc` file system, or to be able to inspect its status -with `ps` (which on Linux and FreeBSD systems basically means the same thing, since `ps` -reads process information from `/proc`). Therefore, on servers running with -tight permissions on `/proc`, this directive may not work. If you wish to use -this directive and your `/proc` permissions are too tight, then please consider -untightening the permissions. +The <<PassengerMemoryLimit,PassengerMemoryLimit>> directive uses +`ps` command to query memory usage information. On Linux, it further +queries `/proc` to obtain additional memory usage information that's +not obtainable through `ps`. You should ensure that the `ps` works +correctly and that the `/proc` filesystem is accessible by the +`PassengerHelperAgent` process. ===================================================== -[TIP] -.FreeBSD and `/proc` -===================================================== -On many FreeBSD systems, `/proc` is not mounted by default. `/proc` *must* be -mounted in order for <<PassengerMemoryLimit,PassengerMemoryLimit>> to work. - -It is also advised that you mount `/proc` with the `linprocfs` filesystem type -instead of the regular FreeBSD `proc` filesystem type. The `linprocfs` filesystem -type allows Phusion Passenger to read memory information from `/proc` directly, -which is very fast. If you mount `/proc` with a different filesystem type, then -Phusion Passenger must resort to querying memory information from the `ps` command, -which is a lot slower. -===================================================== - [CAUTION] ===================================================== The <<PassengerMaxRequests,PassengerMaxRequests>> and <<PassengerMemoryLimit,PassengerMemoryLimit>> directives should be considered as workarounds for misbehaving applications. It is advised that you fix the @@ -1737,43 +1741,10 @@ === Classic Ruby on Rails (<= 2.x)-specific options === These options only have effect on classic Ruby on Rails 1.x and 2.x applications. Ruby on Rails >= 3.x applications are considered Rack applications. -==== RailsAutoDetect <on|off> ==== -Whether Phusion Passenger should automatically detect whether a virtual host's -document root is a Ruby on Rails application. The default is 'on'. - -This option may occur in the global server configuration or in a virtual host -configuration block. - -For example, consider the following configuration: - ------------------------------ -RailsAutoDetect off -<VirtualHost *:80> - ServerName www.mycook.com - DocumentRoot /webapps/mycook/public -</VirtualHost> ------------------------------ - -If one goes to 'http://www.mycook.com/', the visitor will see the contents of -the '/webapps/mycook/public' folder, instead of the output of the Ruby on Rails -application. - -It is possible to explicitly specify that the host is a Ruby on Rails -application by using the <<RailsBaseURI,RailsBaseURI>> configuration option: - ------------------------------ -RailsAutoDetect off -<VirtualHost *:80> - ServerName www.mycook.com - DocumentRoot /webapps/mycook/public - RailsBaseURI / # This line has been added. -</VirtualHost> ------------------------------ - [[RailsBaseURI]] ==== RailsBaseURI <uri> ==== Used to specify that the given URI is a Rails application. See <<deploying_rails_to_sub_uri,Deploying Rails to a sub URI>> for an example. @@ -1800,43 +1771,10 @@ In each place, it may be specified at most once. The default value is 'production'. === Rack and Rails >= 3 specific options === -==== RackAutoDetect <on|off> ==== -Whether Phusion Passenger should automatically detect whether a virtual host's -document root is a Rack application. The default is 'on'. - -This option may occur in the global server configuration or in a virtual host -configuration block. - -For example, consider the following configuration: - ------------------------------ -RackAutoDetect off -<VirtualHost *:80> - ServerName www.rackapp.com - DocumentRoot /webapps/my_rack_app/public -</VirtualHost> ------------------------------ - -If one goes to 'http://www.rackapp.com/', the visitor will see the contents of -the '/webapps/my_rack_app/public' folder, instead of the output of the Rack -application. - -It is possible to explicitly specify that the host is a Rack -application by using the <<RackBaseURI,RackBaseURI>> configuration option: - ------------------------------ -RackAutoDetect off -<VirtualHost *:80> - ServerName www.rackapp.com - DocumentRoot /webapps/my_rack_app/public - RackBaseURI / # This line was added -</VirtualHost> ------------------------------ - [[RackBaseURI]] ==== RackBaseURI <uri> ==== Used to specify that the given URI is a Rack application. See <<deploying_rack_to_sub_uri,Deploying Rack to a sub URI>> for an example. @@ -1863,11 +1801,11 @@ * In a `<Directory>` or `<Location>` block. * In '.htaccess', if `AllowOverride Options` is on. In each place, it may be specified at most once. The default value is 'production'. -=== Deprecated options === +=== Deprecated or removed options === The following options have been deprecated, but are still supported for backwards compatibility reasons. ==== RailsRuby ==== @@ -1882,9 +1820,12 @@ ==== RailsAllowModRewrite ==== This option doesn't do anything anymore in recent versions of Phusion Passenger. ==== RailsSpawnMethod ==== Deprecated in favor of <<PassengerSpawnMethod,PassengerSpawnMethod>>. + +==== RailsAutoDetect, RackAutoDetect and WsgiAutoDetect ==== +These options have been removed in version 4.0.0 as part of an optimization. You should use <<PassengerEnabled,PassengerEnabled>> instead. [[troubleshooting]] == Troubleshooting ==