Search code examples
nginxunicorngitorious

Can't login to gitorious installation, cookie and domain issues


I've installed gitorious on CentOS 6 32bit via getgetorious.com's installer. I went ahead and edited the gitorious.yml with my host name "git.mydomain.com". Restarted gitorious with /usr/bin/restart_gitorious.

I have checked the conf.d/gitorious.conf file for nginx and it shows the server name as my "git.mydomain.com".

When I try to login I get redirected back to the homepage and nothing happens. I checked the headers being sent from the server and the cookies are for "www.mydomain.com" instead of "git.mydomain.com"

I have a server block in my nginx.conf for "www.mydomain.com" which points to a completely different directory. I can't figure out how and why the cookies are being set to www instead of git.

Here's paste of my headers. I've replaced my actual domain with mydomain.com.

http://pastebin.com/Lu0txrtR

I'm also seeing this error in the production.log file

WARNING: Invalid request host 'git.fruition.company'. Session cookies will not work

I have made the following changes to my gitorious.yml file.

# Host the ./script/gitorious script should use: client_host: git.fruition.company

# Host which is serving the gitorious app, eg "gitorious.org"
host: git.fruition.company

I have also tried setting the hostname using the provided shell script to no avail.

I can't figure out where or why the cookies are being set to www instead of git.

Any help would be greatly appreciated.


Solution

  • I ended up running the install script again and create a new user. Everything seems to work now.