0
@@ -264,6 +264,14 @@ RailsAutoDetect off
0
-----------------------------
0
+[[RailsAllowModRewrite]]
0
+RailsAllowModRewrite <on|off>::
0
+ If enabled, Passenger will not override mod_rewrite rules. Please read
0
+ <<conflicting_apache_modules,Conflicting Apache modules>> for details.
0
+This option may occur in the global server configuration or in a virtual host
0
+configuration block. The default value is 'off'.
0
This option allows one to specify the Ruby interpreter to use.
0
@@ -663,6 +671,7 @@ 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
@@ -671,12 +680,12 @@ 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
-Passenger will override mod_rewrite rules on Rails hosts. This is because the
0
-default .htaccess, as provided by Ruby on Rails, redirects all requests to
0
-`dispatch.cgi' using mod_rewrite. This is a CGI application which loads the
0
-entire Ruby on Rails framework for every request, and thus is very slow. If we
0
-do not override mod_rewrite, then Ruby on Rails apps will be slow on Passenger
0
-by default -- but we want a good out-of-the-box experience.
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
@@ -685,3 +694,8 @@ 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.
Comments
No one has commented yet.