0
@@ -44,10 +44,12 @@ link:http://groups.google.com/group/phusion-passenger[join our discussion list]
0
-== Generic installation instructions ==
0
+== Installing Passenger ==
0
+=== Generic installation instructions ===
0
-===
Overview of download and installation methods ===
0
+===
= Overview of download and installation methods ====
0
There are two ways to install Passenger:
0
@@ -66,7 +68,7 @@ as 'root'. If the installer fails because of permission errors, it will tell
0
[[specifying_correct_apache_install]]
0
-===
Specifying the correct Apache installation ===
0
+===
= Specifying the correct Apache installation ====
0
If your system has multiple Apache installations (this is likely the case on
0
MacOS X), then you will need to tell the Passenger installer which one to use.
0
@@ -86,7 +88,7 @@ NOTE: On some systems, the `apxs` program might be called `apxs2`, and it might
0
be located in the `sbin` folder instead of the `bin` folder.
0
[[specifying_ruby_installation]]
0
-===
Specifying the correct Ruby installation ===
0
+===
= Specifying the correct Ruby installation ====
0
If your system has multiple Ruby installations (this is likely the case on
0
MacOS X), then you will need to tell the Passenger installer which one to use.
0
@@ -107,7 +109,7 @@ export PATH=/opt/myruby/bin:$PATH
0
----------------------------------
0
-===
Installing via the gem ===
0
+===
= Installing via the gem ====
0
Please install the gem and then run the Passenger installer, by typing the
0
@@ -117,7 +119,7 @@ passenger-install-apache2-module
0
------------------------------------------------------
0
Please follow the instructions given by the installer.
0
-===
Installing via the source tarball ===
0
+===
= Installing via the source tarball ====
0
Extract the tarball to whatever location you prefer. The Passenger files
0
are to reside in that location permanently. For example, if you would like
0
@@ -137,14 +139,18 @@ IMPORTANT: Please do not remove the 'passenger-x.x.x' folder after
0
installation. Furthermore, the 'passenger-x.x.x' folder must be accessible by Apache.
0
-==
Operating system-specific installation instructions ==
0
+==
= Operating system-specific instructions and information ===
0
Ben Ruebenstein has written an excellent
0
link:http://benr75.com/articles/2008/04/12/setup-mod_rails-phusion-mac-os-x-leopard[tutorial
0
on installing Phusion Passenger on OS X].
0
+Ben Hughes has written an link:http://www.railsgarden.com/2008/04/12/configurating-passenger-mod_rails-on-slicehost-with-ubuntu-710/[article on installing Passenger on Ubuntu].
0
== Deploying a Ruby on Rails application ==
0
@@ -603,27 +609,22 @@ down by SELinux policies.
0
To solve this problem, you must set some permissions on the Passenger files and
0
folders, so that Apache can access them.
0
-- If you've installed Passenger via a gem, then you must first find out the
0
- location in which RubyGems stores gem files. Type the following command:
0
+- If you've installed Passenger via a gem, then run this command to determine
0
+ Passenger's root folder:
0
------------------------------------------------------------------
0
-
gem environment | grep 'INSTALLATION DIRECTORY'0
+
passenger-config --root0
------------------------------------------------------------------
0
-
It should show something along the lines of:
0
+
Next, run the following command:
0
------------------------------------------------------------------
0
-
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.80
+
chcon -R -h -t httpd_sys_content_t /path-to-passenger-root0
------------------------------------------------------------------
0
-The directory name that you see in the output is the RubyGems gem folder.
0
-Next, we'll fix the Passenger folder permissions as follows:
0
-------------------------------------------------------------------
0
-cd /usr/lib/ruby/gems/1.8 # Replace this with whatever your gem folder is.
0
-chcon -R -h -t httpd_sys_content_t passenger-*
0
-------------------------------------------------------------------
0
+where '/path-to-passenger-root' should be replaced with whatever
0
+`passenger-config --root` printed.
0
- If you've installed Passenger via the source tarball, then run the following
0
@@ -667,6 +668,41 @@ following command to give your Rails application folder that context:
0
chcon -R -h -t httpd_sys_content_t /path/to/your/rails/app
0
-----------------------------------------------------------
0
+[[conflicting_apache_modules]]
0
+=== Conflicting Apache modules ===
0
+==== mod_rewrite and mod_alias ====
0
+Passenger conflicts with 'mod_rewrite' and 'mod_alias'. Those modules may be
0
+installed and loaded together with 'mod_passenger', and they will work fine
0
+outside virtual hosts that contain a Rails application, but we recommend you
0
+not to use their features inside virtual hosts that contain a Rails
0
+By default, Passenger will override mod_rewrite rules on Rails hosts. This is
0
+because the default .htaccess, as provided by Ruby on Rails, redirects all
0
+requests to `dispatch.cgi' using mod_rewrite. This is a CGI application which
0
+loads the entire Ruby on Rails framework for every request, and thus is very
0
+slow. If we do not override mod_rewrite, then Ruby on Rails apps will be slow
0
+on Passenger by default -- but we want a good out-of-the-box experience.
0
+Furthermore, the primary reason why people use mod_rewrite with Rails
0
+applications, is to accelerate page caching. Passenger supports page caching
0
+out-of-the-box, without mod_rewrite.
0
+It is not fully understood how mod_alias conflicts with Passenger, but we
0
+recommend you not to use it on Rails virtual hosts. mod_alias rules can result
0
+in surprising problems.
0
+If you really want to use mod_rewrite on Rails virtual hosts, then please set
0
+the <<RailsAllowModRewrite,RailsAllowModRewrite>> configuration option. But
0
+please note that you will have to delete Rails applications' default .htaccess
0
+file, or add rewrite rules to negate its effects.
0
+'mod_userdir' is not compatible with Phusion Passenger at the moment.
0
@@ -746,35 +782,6 @@ other. Passenger will automatically make use of the correct version.
0
Passenger does not provide X-Sendfile support by itself. Please install
0
link:http://tn123.ath.cx/mod_xsendfile/[mod_xsendfile] for X-Sendfile support.
0
-[[conflicting_apache_modules]]
0
-=== Conflicting Apache modules ===
0
-Passenger conflicts with 'mod_rewrite' and 'mod_alias'. Those modules may be
0
-installed and loaded together with 'mod_passenger', and they will work fine
0
-outside virtual hosts that contain a Rails application, but we recommend you
0
-not to use their features inside virtual hosts that contain a Rails
0
-By default, Passenger will override mod_rewrite rules on Rails hosts. This is
0
-because the default .htaccess, as provided by Ruby on Rails, redirects all
0
-requests to `dispatch.cgi' using mod_rewrite. This is a CGI application which
0
-loads the entire Ruby on Rails framework for every request, and thus is very
0
-slow. If we do not override mod_rewrite, then Ruby on Rails apps will be slow
0
-on Passenger by default -- but we want a good out-of-the-box experience.
0
-Furthermore, the primary reason why people use mod_rewrite with Rails
0
-applications, is to accelerate page caching. Passenger supports page caching
0
-out-of-the-box, without mod_rewrite.
0
-It is not fully understood how mod_alias conflicts with Passenger, but we
0
-recommend you not to use it on Rails virtual hosts. mod_alias rules can result
0
-in surprising problems.
0
-If you really want to use mod_rewrite on Rails virtual hosts, then please set
0
-the <<RailsAllowModRewrite,RailsAllowModRewrite>> configuration option. But
0
-please note that you will have to delete Rails applications' default .htaccess
0
-file, or add rewrite rules to negate its effects.
0
== Appendix A: About this document ==
Comments
No one has commented yet.