backbonedesign wrote: > I would like to move my cached pages to public/cache/ so I can easily > delete all of my pages when I make a change to my application.
What are the consequences in Passenger with RailsAllowModRewrite
enabled?
Can you please elaborate on "rewrite rules to negate its effects" in
the below sentence in the docs?
"But please note that you will have to delete Rails applications'
default .htaccess file, or add rewrite rules to negate its effects."
On Jun 5, 3:46 pm, Hongli Lai <hon...@phusion.nl> wrote:
> backbonedesign wrote:
> > I would like to move my cached pages to public/cache/ so I can easily
> > delete all of my pages when I make a change to my application.
backbonedesign wrote: > What are the consequences in Passenger with RailsAllowModRewrite > enabled?
> Can you please elaborate on "rewrite rules to negate its effects" in > the below sentence in the docs? > "But please note that you will have to delete Rails applications' > default .htaccess file, or add rewrite rules to negate its effects."
The default Rails .htaccess forwards all requests to dispatcher.cgi/dispatcher.fcgi, thereby bypassing Passenger unless RailsAllowModRewrite is on. Make sure that requests are not forwarded to dispatcher.cgi/dispatcher.fcgi, and you'll be fine.
-- Phusion | The Computer Science Company
Web: http://www.phusion.nl/ E-mail: i...@phusion.nl Chamber of commerce no: 08173483 (The Netherlands)
I was able to use public/cache on passenger 1.9.0 by adding this to my
vhost conf file:
RewriteEngine On
RewriteRule ^([^.]+)$ /cache/$1.html [QSA]
Note: the leading slash was needed on suse/apache (it is not included
in many 'helpful' blogs).
Note: I did NOT need to use: RailsAllowModRewrite on. It didn't seem
to make a difference. I did not do any performance comparisons.
I tried these entries in the .htaccess file, but they were not
recognized/utilized. I attempted this with & w/o
RailsAllowModRewrite.
I hope this helps,
Matt Scilipoti
On Jun 6, 3:20 pm, Hongli Lai <hon...@phusion.nl> wrote:
> backbonedesign wrote:
> > What are the consequences in Passenger with RailsAllowModRewrite
> > enabled?
> > Can you please elaborate on "rewriterules to negate its effects" in
> > the below sentence in the docs?
> > "But please note that you will have to delete Rails applications'
> > default .htaccess file, or addrewriterules to negate its effects."
> The default Rails .htaccess forwards all requests to
> dispatcher.cgi/dispatcher.fcgi, thereby bypassing Passenger unless
> RailsAllowModRewrite is on. Make sure that requests are not forwarded to
> dispatcher.cgi/dispatcher.fcgi, and you'll be fine.
> --
> Phusion | The Computer Science Company
> Web:http://www.phusion.nl/ > E-mail: i...@phusion.nl
> Chamber of commerce no: 08173483 (The Netherlands)
Just to be clear...
When the above mentioned rewrite entries didn't work in .htaccess
(those were the only entries), I deleted the .htaccess file.
Here is my conf:
<VirtualHost *:80>
ServerName myapp.example.com
DocumentRoot /path/to/myapp/current/public
<Directory /path/to/myapp/current/public>
Order Deny,Allow
Allow from all
</Directory>
## tell passenger to allow apache rewrite rules (seems to be
optional as of 06/11/08)
RailsAllowModRewrite on
RewriteEngine On
## Uncomment for rewrite debugging
#RewriteLog /path/to/myapp/current/log/rewrite_log
#RewriteLogLevel 9
#apache should serve cached pages
RewriteRule ^([^.]+)$ /cache/$1.html [QSA]
#*************************
# SVN
# this not only blocks access to .svn directories, but makes it
appear
# as though they aren't even there, not just that they are forbidden
<DirectoryMatch "^/.*/\.svn/">
ErrorDocument 403 /404.html
Order allow,deny
Deny from all
Satisfy All
</DirectoryMatch>
</VirtualHost>
--Matt Scilipoti
On Jun 11, 5:35 pm, Matt Scilipoti <ma...@possiamo.com> wrote:
> I was able to use public/cache on passenger 1.9.0 by adding this to my
> vhost conf file:
> RewriteEngine On
> RewriteRule ^([^.]+)$ /cache/$1.html [QSA]
> Note: the leading slash was needed on suse/apache (it is not included
> in many 'helpful' blogs).
> Note: I did NOT need to use: RailsAllowModRewrite on. It didn't seem
> to make a difference. I did not do any performance comparisons.
> I tried these entries in the .htaccess file, but they were not
> recognized/utilized. I attempted this with & w/o
> RailsAllowModRewrite.
> I hope this helps,
> Matt Scilipoti
> On Jun 6, 3:20 pm, Hongli Lai <hon...@phusion.nl> wrote:
> > backbonedesign wrote:
> > > What are the consequences in Passenger with RailsAllowModRewrite
> > > enabled?
> > > Can you please elaborate on "rewriterules to negate its effects" in
> > > the below sentence in the docs?
> > > "But please note that you will have to delete Rails applications'
> > > default .htaccess file, or addrewriterules to negate its effects."
> > The default Rails .htaccess forwards all requests to
> > dispatcher.cgi/dispatcher.fcgi, thereby bypassing Passenger unless
> > RailsAllowModRewrite is on. Make sure that requests are not forwarded to
> > dispatcher.cgi/dispatcher.fcgi, and you'll be fine.
> > --
> > Phusion | The Computer Science Company
> > Web:http://www.phusion.nl/ > > E-mail: i...@phusion.nl
> > Chamber of commerce no: 08173483 (The Netherlands)
On Wed, 2008-06-11 at 15:03 -0700, Matt Scilipoti wrote: > # SVN > # this not only blocks access to .svn directories, but makes it > appear > # as though they aren't even there, not just that they are forbidden
FWIW, if you're using Capistrano, you can use this:
set :copy_strategy, :export
to use "svn export" vs "svn checkout". That way you won't have to supply a directive to handle them...
> I was able to use public/cache on passenger 1.9.0 by adding this to my
> vhost conf file:
> RewriteEngine On
> RewriteRule ^([^.]+)$ /cache/$1.html [QSA]
> Note: the leading slash was needed on suse/apache (it is not included
> in many 'helpful' blogs).
> Note: I did NOT need to use: RailsAllowModRewrite on. It didn't seem
> to make a difference. I did not do any performance comparisons.
> I tried these entries in the .htaccess file, but they were not
> recognized/utilized. I attempted this with & w/o
> RailsAllowModRewrite.
> I hope this helps,
> Matt Scilipoti
> On Jun 6, 3:20 pm, Hongli Lai <hon...@phusion.nl> wrote:
> > backbonedesign wrote:
> > > What are the consequences in Passenger with RailsAllowModRewrite
> > > enabled?
> > > Can you please elaborate on "rewriterules to negate its effects" in
> > > the below sentence in the docs?
> > > "But please note that you will have to delete Rails applications'
> > > default .htaccess file, or addrewriterules to negate its effects."
> > The default Rails .htaccess forwards all requests to
> > dispatcher.cgi/dispatcher.fcgi, thereby bypassing Passenger unless
> > RailsAllowModRewrite is on. Make sure that requests are not forwarded to
> > dispatcher.cgi/dispatcher.fcgi, and you'll be fine.
> > --
> > Phusion | The Computer Science Company
> > Web:http://www.phusion.nl/ > > E-mail: i...@phusion.nl
> > Chamber of commerce no: 08173483 (The Netherlands)