[Mongrel] Session problem mongrel behind Apache proxy

Zed A. Shaw zedshaw at zedshaw.com
Sat Apr 21 11:48:46 EDT 2007

On Tue, 17 Apr 2007 15:44:31 -0400
Nicolas St-Laurent <nstlaurent at wantedtech.com> wrote:

> Hi,
> I've configured mongrel_clusters behind an Apache 2.2 proxy using  
> named virtual host. Session are saved as ActiveRecordSession. But the  
> cookies created on client side doesn't correspond to session data  
> saved in database (keys are different). The RoR app react just like  
> it doesn't have a session at all.
> If I don't use Apache as a proxy/load balancer and call directly  
> Mongrel_cluster, everything works well.
> What should I do to get session working with Mongrel behind an Apache  
> proxy/load balancer ?

Not sure if you've solved this yet, but you can find out what Apache is
sending to Mongrel by doing this:

1) mongrel_rails start -B
2) Make some requests that should have cookies.
3) look in log/mongrel_debug/rails.log for the headers being given to

That'll give you a clue as to what is going on.

Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu
http://www.awprofessional.com/title/0321483502 -- The Mongrel Book

More information about the Mongrel-users mailing list