Author Topic: Login Problem : Login Page Re-appear after login  (Read 3377 times)

Offline jgerasmus

  • Newbie
  • *
  • Posts: 1
Login Problem : Login Page Re-appear after login
« on: February 21, 2011, 09:02:54 AM »
Hi Guys,

This is my first post. However, I struggled the whole of the day to figure it out so I thought I should share.

First things first:
Ver: Roundcube 0.4.4
Distro: Gentoo
Web Server: Nginx 0.8.53

I setup my webmail server first on the root of my domain name (ie example.com).  That worked perfectly.  Loaded, and login was fine.  Then I wanted to change the setup and have the webmail run of a sub-domain (ie webmail.example.com).  I am using a "virtual server" on the same IP as the root domain, through configuration in Nginx.  When I made the change, roundcube started acting up.  It would present the logon screen, but when I clicked on login, it would just again bring up the logon screen.  I set the log level to debug in Roundcube but I could not see anything significant, besides the following:

Feb 21 15:24:24 gentoo2 roundcube: C: ns1 NAMESPACE
Feb 21 15:24:24 gentoo2 roundcube: S: * NAMESPACE (("" ".")) NIL NIL

This pointed me in the direction that some sort of name resolution is to blame.  After fidling with DNS setting, creating reverse name pointers, etc.  I finally found the following to work:

In the nginx.conf, virtual servers are setup by defining "server" variables.  What seemed to resolve my problem was to add "localhost" before my server name, as follows:

server_name localhost webmail.example.com;

This string was previously my root domain (ie server_name localhost example.com), and after the change roundcube is functioning properly.

Hope this may help someone!