Commit 5ce8a415972a29e1a7986ffa979c1a581309bd36
1 parent
247f5d9f
Exists in
master
Make it clearer where to put your HTTPS key/cert
Showing
1 changed file
with
14 additions
and
10 deletions
Show diff stats
README.md
@@ -281,23 +281,27 @@ Run `sudo gitlab-ctl reconfigure` for the LDAP settings to take effect. | @@ -281,23 +281,27 @@ Run `sudo gitlab-ctl reconfigure` for the LDAP settings to take effect. | ||
281 | 281 | ||
282 | ### Enable HTTPS | 282 | ### Enable HTTPS |
283 | 283 | ||
284 | -By default, omnibus-gitlab does not use HTTPS. If you want to enable | ||
285 | -HTTPS for gitlab.example.com, first place your key and certificate in | 284 | +By default, omnibus-gitlab does not use HTTPS. If you want to enable HTTPS for |
285 | +gitlab.example.com, add the following statement to `/etc/gitlab/gitlab.rb`: | ||
286 | + | ||
287 | +```ruby | ||
288 | +external_url "https://gitlab.example.com" | ||
289 | +``` | ||
290 | + | ||
291 | +Because the hostname in our example is 'gitlab.example.com', omnibus-gitlab | ||
292 | +will look for key and certificate files called | ||
286 | `/etc/gitlab/ssl/gitlab.example.com.key` and | 293 | `/etc/gitlab/ssl/gitlab.example.com.key` and |
287 | -`/etc/gitlab/ssl/gitlab.example.com.crt`, respectively. | 294 | +`/etc/gitlab/ssl/gitlab.example.com.crt`, respectively. Create the |
295 | +`/etc/gitlab/ssl` directory and copy your key and certificate there. | ||
288 | 296 | ||
289 | ``` | 297 | ``` |
290 | sudo mkdir -p /etc/gitlab/ssl | 298 | sudo mkdir -p /etc/gitlab/ssl |
291 | sudo chmod 700 /etc/gitlab/ssl | 299 | sudo chmod 700 /etc/gitlab/ssl |
292 | -sudo cp gitlab.example.com.crt gitlab.example.com.key /etc/gitlab/ssl/ | 300 | +sudo cp gitlab.example.com.key gitlab.example.com.crt /etc/gitlab/ssl/ |
293 | ``` | 301 | ``` |
294 | 302 | ||
295 | -Next, add the following line to `/etc/gitlab/gitlab.rb` and run `sudo | ||
296 | -gitlab-ctl reconfigure`. | ||
297 | - | ||
298 | -```ruby | ||
299 | -external_url "https://gitlab.example.com" | ||
300 | -``` | 303 | +Now run `sudo gitlab-ctl reconfigure`. When the reconfigure finishes your |
304 | +GitLab instance should be reachable at `http://gitlab.example.com`. | ||
301 | 305 | ||
302 | If you are using a firewall you may have to open port 443 to allow inbound | 306 | If you are using a firewall you may have to open port 443 to allow inbound |
303 | HTTPS traffic. | 307 | HTTPS traffic. |