Report this

What is the reason for this report?

SSL on standard GitLab image

Posted on June 20, 2014

Hi,

I just started out with a GitLab Droplet based on the ready provide image available.

Everything is running pretty smooth except I seem to be unable to get SSL working. I am following the guide I found here: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

To setup https. It seems all goes well until I try to connect to my url at http: or https: after the updates have been made. I just get a failed to open page message.

I checked on the server with “nmap localhost” and indeed when I change the config url to https://mydomain.com/ instead of http://mydomain.com/ that both port 80 and port 443 are not open. As long as the config says http://mydomain.com/ port 80 opens fine and connections through http can be made without problems.

Could anyone point me in the right direction on what I should do to get ssl working?

Thanks in advance.

  • Mark


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!

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.

Hi friend.

I have the same problem, until I read the official document here: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/nginx.md

note the ‘https’ below

external_url “https://gitlab.example.com

If there line is http, gitlab will not use https at all, without any warning T_T…

I just ran through it and was able to make https work. Could you post your <code>/etc/gitlab/gitlab.rb</code> file? It should contain: <pre> external_url “https://gitlab.example.com” nginx[‘redirect_http_to_https’] = true nginx[‘ssl_certificate’] = “/etc/gitlab/ssl/gitlab.crt” nginx[‘ssl_certificate_key’] = “/etc/gitlab/ssl/gitlab.key” </pre> Make sure to remember to run <code>gitlab-ctl reconfigure</code> after change the contents of the file.

Also check the contents of <code>/var/opt/gitlab/nginx/etc/gitlab-http.conf</code> This is the Nginx configuration that is autogenerated. Is there a server block with <code>listen *:443</code> in it?

You can also run <code>gitlab-ctl start</code> just to make sure that all the components are up and running.

Hi astarr,

Thanks for your input.

I do have exactly these lines in the config file exactly in the same way you posted them as well only, of course, my external_url is specified as my own custom url.

I run reconfigure once I save the config file and also the nginx configuration files does contain the line where it should listen to port 443.

However when all this is done and when I check nmap localhost both port 80 and 443 are closed. Once I rewrite the config with a normal http instead of https domain and run reconfigure, port 80 opens up again and the system becomes available again on a normal non https url.

  • Mark

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.