views:

35

answers:

1

Hi,

I have deployed my application on subdomain.domain.com (it works only on that one subdomain). Everything works fine except the fact that from time to time users cannot log in to application (the message "Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again" is shown when trying to log into admin panel). I've noticed that restarting the web server eliminates this problem for some time.

Does anyone have experience with setting up django project on subdomain and can guide me how to configure my application to make it work correctly without need to ocasionally make reset?

I'd tried to set up SESSION_COOKIE_DOMAIN = 'subdomain.domain.com' setting but it didn't solve the problem (maybe I set it wrong?)

I use Django 1.1.1, Python 2.5.4 for this project. Project is deployed in provider I use for other projects and cookies works there perfectly. Other projects run also on subdomains and do not have SESSION_COOKIE_DOMAIN set at all.

+1  A: 

in your settings do you have SESSION_COOKIE_DOMAIN set? If so, is it set to something that isn't the domain the site is operating on?

stevejalim
I've tried to set up this setting before but without any luck. At the momment I not use this, but recently I had: SESSION_COOKIE_DOMAIN = 'subdomain.domain.com'
Lukasz Dziedzia
I have tried various options and it looks like setting `SESSION_COOKIE_DOMAIN='domain.com'` (without `subdomain.` part) solved the problem.
Lukasz Dziedzia