Gitlab — Setup SSL

ChongHwi
ChongHwi
Sep 3, 2018 · 1 min read

Things to Prepare:
a) Generate csr file from your server
b) Get a encrypted file from the SSL service provider

Step 1. Key in this to generate .csr, replace ‘server’ with your name of server
openssl req –new –newkey rsa:2048 –nodes –keyout server.key –out server.csr

Step 2: Login Digicert generate .pem file

Detailed tutorial here

Step 3: Edit /tec/gitlab/gitlab.rb

external_url ‘https://git.bgifx.com' // your urlnginx[‘enable’] = true
nginx[‘redirect_http_to_https’] = true
nginx[‘redirect_http_to_https_port’] = 80
nginx[‘ssl_certificate’] = “/etc/gitlab/ssl/star_bgifx_com.pem” //edit with your received pem file.nginx[‘ssl_certificate_key’] = “/etc/gitlab/ssl/arvin.key” // edit with your pc .key file.

Final Step: gitlab reconfigure and restart

sudo gitlab-ctl reconfiguresudo gitlab-ctl restart

Any questions or query, feel free to commend on below.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade