[Solved] Why is gitlab ci redirecting to gitlab

I have an Ubuntu 14.04 server with (Omnibus) GitLab 7.9.2. I followed these instructions to set up the gitlab server. I have set up the DNS correctly, and when I ping ci.mydomain.com I get the correct IP address. The issue is, when I go to https://ci.mydomain.com it redirects me to https://gitlab.mydomain.com.

I did run sudo gitlab-ctl reconfigure after I made these changes, and everything was successful.

I’m guessing it’s an nginx problem, but my gitlab.rb file looks like this

external_url ‘https://gitlab.mydomain.com

nginx[‘enable’] = true
nginx[‘redirect_http_to_https’] = true
nginx[‘ssl_certificate’] = “/etc/gitlab/ssl/mydomain.com.crt”
nginx[‘ssl_certificate_key’] = “/etc/gitlab/ssl/mydomain.com.key”

ci_external_url ‘https://ci.mydomain.com
ci_nginx[‘redirect_http_to_https’] = true
ci_nginx[‘enable’] = true

I tried adding
ci_nginx[‘ssl_certificate’] = “/etc/gitlab/ssl/mydomain.com.crt”
ci_nginx[‘ssl_certificate_key’] = “/etc/gitlab/ssl/mydomain.com.key”

but as expected, that didn’t change anything.

As shown in the settings below, my certs are actually located at /etc/gitlab/ssl/, and I’ve looked at this similar post, but it doesn’t help.

Any help would be greatly appreciated. Thanks!

EDIT
So, I’m not sure what happened but everything is working as expected now. All I did was add the ci_nginx[‘ssl_certificate’] and the ci_nginx[‘ssl_certificate_key’], and then remove them, and it worked. At any rate, I’m happy now. I didn’t see anywhere to delete the question, or I would have.

No reason to delete the question, others might benefit from your experience :slight_smile:

1 Like