public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Improve the manual: reorganize some sections and make use of the 
'passenger-config' command.
Hongli Lai (Phusion) (author)
Sat Apr 19 12:40:35 -0700 2008
commit  981b957ed6cf8242a890a06640858810e234c9df
tree    9daf89b6647267f96562ef4a7d1c0012e0854229
parent  5e583222bf29d11f29d0d1968b25ff370f1bfbd5
...
44
45
46
47
 
 
 
48
49
50
 
51
52
53
...
66
67
68
69
 
70
71
72
...
86
87
88
89
 
90
91
92
...
107
108
109
110
 
111
112
113
...
117
118
119
120
 
121
122
123
...
137
138
139
140
 
141
142
 
143
144
145
146
147
 
 
 
 
148
149
150
...
603
604
605
606
607
 
 
608
609
610
 
611
612
613
 
614
615
616
 
617
618
619
620
621
622
623
624
625
626
 
 
 
627
628
629
...
667
668
669
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
670
671
672
...
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
...
44
45
46
 
47
48
49
50
51
 
52
53
54
55
...
68
69
70
 
71
72
73
74
...
88
89
90
 
91
92
93
94
...
109
110
111
 
112
113
114
115
...
119
120
121
 
122
123
124
125
...
139
140
141
 
142
143
 
144
145
146
147
148
149
150
151
152
153
154
155
156
...
609
610
611
 
 
612
613
614
615
 
616
617
618
 
619
620
621
 
622
623
624
 
 
 
 
 
 
 
 
625
626
627
628
629
630
...
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
...
782
783
784
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
785
786
787
0
@@ -44,10 +44,12 @@ link:http://groups.google.com/group/phusion-passenger[join our discussion list]
0
 if it doesn't.
0
 
0
 
0
-== Generic installation instructions ==
0
+== Installing Passenger ==
0
+
0
+=== Generic installation instructions ===
0
 
0
 [[install_passenger]]
0
-=== Overview of download and installation methods ===
0
+==== Overview of download and installation methods ====
0
 
0
 There are two ways to install Passenger:
0
 
0
@@ -66,7 +68,7 @@ as 'root'. If the installer fails because of permission errors, it will tell
0
 you.
0
 
0
 [[specifying_correct_apache_install]]
0
-=== Specifying the correct Apache installation ===
0
+==== Specifying the correct Apache installation ====
0
 
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
 
0
 [[specifying_ruby_installation]]
0
-=== Specifying the correct Ruby installation ===
0
+==== Specifying the correct Ruby installation ====
0
 
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
 
0
 
0
-=== Installing via the gem ===
0
+==== Installing via the gem ====
0
 
0
 Please install the gem and then run the Passenger installer, by typing the
0
 following commands:
0
@@ -117,7 +119,7 @@ passenger-install-apache2-module
0
 ------------------------------------------------------
0
 Please follow the instructions given by the installer.
0
 
0
-=== Installing via the source tarball ===
0
+==== Installing via the source tarball ====
0
 
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
 
0
 
0
-== Operating system-specific installation instructions ==
0
+=== Operating system-specific instructions and information ===
0
 
0
-=== MacOS X ===
0
+==== MacOS X ====
0
 
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
 
0
+==== Ubuntu Linux ====
0
+
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
+
0
 
0
 == Deploying a Ruby on Rails application ==
0
 
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
 
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
 ------------------------------------------------------------------
0
-gem environment | grep 'INSTALLATION DIRECTORY'
0
+passenger-config --root
0
 ------------------------------------------------------------------
0
 +
0
-It should show something along the lines of:
0
+Next, run the following command:
0
 +
0
 ------------------------------------------------------------------
0
- - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
0
+chcon -R -h -t httpd_sys_content_t /path-to-passenger-root
0
 ------------------------------------------------------------------
0
 +
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
-------------------------------------------------------------------
0
-cd /usr/lib/ruby/gems/1.8 # Replace this with whatever your gem folder is.
0
-cd gems
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
+
0
 - If you've installed Passenger via the source tarball, then run the following
0
   command:
0
 +
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
 
0
+[[conflicting_apache_modules]]
0
+=== Conflicting Apache modules ===
0
+
0
+==== mod_rewrite and mod_alias ====
0
+
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
+application.
0
+
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
+
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
+
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
+
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
+
0
+==== mod_userdir ====
0
+
0
+'mod_userdir' is not compatible with Phusion Passenger at the moment.
0
+
0
 
0
 == Tips and notes ==
0
 
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
 
0
-[[conflicting_apache_modules]]
0
-=== Conflicting Apache modules ===
0
-
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
-application.
0
-
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
-
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
-
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
-
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
-
0
 
0
 == Appendix A: About this document ==
0
 

Comments

    No one has commented yet.