Gitlab nginx - Unable to stop https redirect

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?

0
задан 18 April 2018 в 22:51
1 ответ

Комментарий другого пользователя был удален, поэтому я отвечу на свой вопрос здесь:

Он / она подозревали, что это могло быть связано с HSTS .

Итак, чтобы проверить, я переключился с Firefox на Chrome, ввел свой http-адрес ( http: //our.server ), и он сработал.

-> Все, что мне нужно было сделать в Firefox, это перейдя на about: preferences # privacy и в разделе история нажмите последняя история и удалите историю сегодняшнего дня (так как я начал где-то утром)

0
ответ дан 5 December 2019 в 06:09

Теги

Похожие вопросы