public
Description: Phusion Passenger (mod_rails)
Home | Edit | New

Misc FAQs

Sometimes when using passenger for Rails in development mode behind Apache, my static resources get cached by the server. How do I disable this behaviour ?

If a file exists in /public Passenger passes the request to Apache to handle. Apache is often setup to cache these files by default, so any modifications to javascript or css are not immediately reflected, regardless of development mode. In order to turn off this caching, you must add the following directives to your application declaration

EnableMMAP Off
EnableSendfile Off

so for example :

<VirtualHost *:80>
    ServerAdmin webmaster@example.com
    ServerName www.example.com
    DocumentRoot /webapps/example/current
    EnableMMAP Off
    EnableSendfile Off
</VirtualHost>

Should work.

Last edited by ivar, Thu Jul 16 17:08:18 -0700 2009
Home | Edit | New
Versions: