# Losing session in rails 2.3.2 app using subdomain

**URL:** <https://www.ruby-forum.com/t/losing-session-in-rails-2-3-2-app-using-subdomain/163432>\
**Category:** Rails\
**Created:** [March 20, 2009, 10:40am UTC](https://www.ruby-forum.com/t/losing-session-in-rails-2-3-2-app-using-subdomain/163432 "2009-03-20T10:40:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![homestarrunner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/71e660/32.png) [@homestarrunner](https://www.ruby-forum.com/u/homestarrunner)\
**Post date:** [March 20, 2009, 10:40am UTC](https://www.ruby-forum.com/t/losing-session-in-rails-2-3-2-app-using-subdomain/163432/1 "2009-03-20T10:40:52Z")

</div>

hi

i have a 2.2.3 app which i upgraded to 2.3.2  
it’s a multi-site (using subdomain) that creates one top level session  
for all sites.

this is how i change the domain for the session in production.rb:

ActionController::Base.session\_options[:domain] = “[xxx.com](http://xxx.com)”

# in rails 2.2.2, this is what i used to do:

# ActionController::Base.session\_options[:session\_domain] = “[xxx.com](http://xxx.com)”

strange things started to happen after i upgraded i can no longer  
login using restful authentication; it does authenticate me, but as  
soon as i’m redirected, it would ask me to login again.

as i said, i use restful\_authentication and i also use passenger  
2.1.2. anyone can help?  
hope i’m not doing smth ultrally stupid…

ps. i posted this question on [stackoverflow.com](http://stackoverflow.com), u can head there to  
answer the question if you wish…  
[Losing session in rails 2.3.2 app using subdomain - Stack Overflow](http://stackoverflow.com/questions/663893/losing-session-in-rails-2-3-2-app-using-subdomain)
