0

Today I tried to enable SSL for a gitlab instalation so I made the following changes in /etc/gitlab/gitlab.rb

external_url 'https://our.server'
nginx['redirect_hhtp_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/our.server.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/our.server.key"

after some more struggle it finally worked actually and I was redirected always to https://our.server and could see that the page was encrypted.

But
The problem started when I wanted to revert it.

Something didn't work correctly because git always throw an error about the SSL certificate (though I also have configured the CA cert in git global).

So I wanted to make rollback to the former gitlab.rb looking like this (only the according parts)

external_url 'http://our.server'
# nginx['redirect_hhtp_to_https'] = false
# nginx['ssl_certificate'] = "/etc/gitlab/ssl/#{node['fqdn']}.crt"
# nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/#{node['fqdn']}.key"

ofcourse after running gitlab-ctl reconfigure and gitlab-ctl restart I expected now, everything would be back to "normal".

But I keep being redirected from http://our.server to https://our.server where ofcourse nothing responds. -> In the moment nobody can access/use the gitlab server anymore!

How can I stop gitlab being redirected to https?

1

1 Answer 1

0

The comment by another user was removed so I'll answer my own question here:

It he/she suspected that it might have to do something with HSTS.

So to check I switched from Firefox to Chrome, entered my http adress (http://our.server) and it worked.

-> All I had to do in Firefox was going to about:preferences#privacy and under history click on latest history and delete the history of today (since I started at sometime in the morning)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .