Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
page caching using public/cache directory
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
backbonedesign  
View profile  
 More options Jun 5 2008, 5:38 pm
From: backbonedesign <clintbou...@gmail.com>
Date: Thu, 5 Jun 2008 14:38:04 -0700 (PDT)
Local: Thurs, Jun 5 2008 5:38 pm
Subject: page caching using public/cache directory
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.

See: http://www.railsenvy.com/2007/2/28/rails-caching-tutorial#moving

But since Passenger doesn't use the .htaccess file, Apache is unable
to see the cached pages.

Any ideas how I can get this to work?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hongli Lai  
View profile  
 More options Jun 5 2008, 5:46 pm
From: Hongli Lai <hon...@phusion.nl>
Date: Thu, 05 Jun 2008 14:46:47 -0700
Local: Thurs, Jun 5 2008 5:46 pm
Subject: Re: page caching using public/cache directory

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.

> See: http://www.railsenvy.com/2007/2/28/rails-caching-tutorial#moving

> But since Passenger doesn't use the .htaccess file, Apache is unable
> to see the cached pages.

> Any ideas how I can get this to work?

You can enable .htaccess support by setting RailsAllowModRewrite to On.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: i...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
backbonedesign  
View profile  
 More options Jun 5 2008, 9:04 pm
From: backbonedesign <clintbou...@gmail.com>
Date: Thu, 5 Jun 2008 18:04:02 -0700 (PDT)
Local: Thurs, Jun 5 2008 9:04 pm
Subject: Re: page caching using public/cache directory
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hongli Lai  
View profile  
 More options Jun 6 2008, 3:20 pm
From: Hongli Lai <hon...@phusion.nl>
Date: Fri, 06 Jun 2008 12:20:40 -0700
Local: Fri, Jun 6 2008 3:20 pm
Subject: Re: page caching using public/cache directory

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)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Scilipoti  
View profile  
 More options Jun 11 2008, 5:35 pm
From: Matt Scilipoti <ma...@possiamo.com>
Date: Wed, 11 Jun 2008 14:35:04 -0700 (PDT)
Local: Wed, Jun 11 2008 5:35 pm
Subject: Re: page caching using public/cache directory
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Scilipoti  
View profile  
 More options Jun 11 2008, 6:03 pm
From: Matt Scilipoti <ma...@possiamo.com>
Date: Wed, 11 Jun 2008 15:03:12 -0700 (PDT)
Local: Wed, Jun 11 2008 6:03 pm
Subject: Re: page caching using public/cache directory
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tom Copeland  
View profile  
 More options Jun 13 2008, 9:59 pm
From: Tom Copeland <t...@infoether.com>
Date: Fri, 13 Jun 2008 21:59:30 -0400
Local: Fri, Jun 13 2008 9:59 pm
Subject: Re: page caching using public/cache directory

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...

Yours,

tom


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
backbonedesign  
View profile  
 More options Jun 19 2008, 3:37 pm
From: backbonedesign <clintbou...@gmail.com>
Date: Thu, 19 Jun 2008 12:37:37 -0700 (PDT)
Local: Thurs, Jun 19 2008 3:37 pm
Subject: Re: page caching using public/cache directory
Thanks Matt. Unfortunately I only have access to the .htaccess file
(please prove me wrong) since it is being hosted on a shared server at
dreamhost.

On Jun 11, 3:35 pm, Matt Scilipoti <ma...@possiamo.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »