Set HTTPS on Gitlab

i set https on /etc/gitlab/gitlab.rb

external_url = ''
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.example.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/"

gitlab-ctl reconfigure no error, didn’t work but still working, what i do to https work?

sorry for bad english

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


Make sure your server is listening on port 443, show me the output of netstat -ltnp | grep 443

Also you can post the output of your error log tail -50 /var/log/nginx/error.log

Are you sure that your ssl certificates are in the path you specified?

@encu This is the right config, it works for me, I did not put the external url here

nginx['enable'] = true
nginx['redirect_http_to_https'] = true
nginx['redirect_http_to_https_port'] = 80
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.key"

What it is not sslcertificate it is ssl_certificate the same thing for redirect and key.

Hope this helps