Production Env Issue: Ubuntu Mongrel Apache proxy Capistrano

Hi Everyone,
Context:

I am building a ruby on rails app. After I successfully built and tested
it in development environment, I used Capistrano to deploy it to a
different machine with pretty much same configuration. The server is a
Ubuntu linux box running Apache 2 and mongrel cluster. The application
is deployed using Capistrano.

Issue:
Even if I shut down mongrel cluster, and I open the root url of my site
in a browser (e.g www.mywebsite.com), apache still serves up content . I
don’t know where it is getting it from. It seems like a cached version.
I’m expecting it to give me an error saying that Mongrel is down (or
something like that)

Similarly, when mongrel cluster is running, and I open the root url in
browser, still the STALE content is served rather than newer content
(which I know should be displayed).
I want www mywebsite com to use routing to get data from
www mywebsite com/mycontroller/myaction

If I open the complete url (including controller and action), then
correct content is served up. Note that this problem happens only in
Production environment.

Earlier I thought this was a routing error. But I’ve made sure that
correct routing is in place. Any pointers/help is really appreciated.

Thanks
Navneet

Are you using page caching? If so, ensure that cached files (by
default stored in public/ as controller/action.html or index.html)
should be deleted.

Vish

Thanks Vishnu. index.html was there (I believe it was generated as a
page cache). I deleted it . But can you help me understand why does it
get created? So should I disable page caching. It might have an effect
on the performance… Thoughts??

Thanks
Navneet

Vishnu G. wrote:

Are you using page caching? If so, ensure that cached files (by
default stored in public/ as controller/action.html or index.html)
should be deleted.

Vish

You should enable page caching, but have proper sweepers so that the
cache is deleted. Also, when your mongrels are down (which should
happen only on new code rollout), ensure that your webserver rewrite
rules searches for maintenance.html (assuming ur using capistrano),
and if that exists, only display that. Proper configs are all over the
net for Apache, nginx, and with a few hacks, lighttpd. Also, on
mongrel-cluster start/stop, you should delete your page cache.
Searching for a “page cache” tutorial on Google would help.

Vish