Gitlab配置HTTPS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 配置url
external_url "https://gitlab.xiaowangc.local"
# 关闭自动续订证书
letsencrypt['enable'] = false
# 重定向80->443
nginx['redirect_http_to_https'] = true
# 证书私钥配置
nginx['ssl_certificate'] = "/mnt/gitlab/ssl/gitlab.crt"
nginx['ssl_certificate_key'] = "/mnt/gitlab/ssl/gitlab.key"
# 开启HTTP2.0,默认开启
nginx['http2_enabled'] = true
# 开启HSTS
nginx['hsts_max_age'] = 63072000
nginx['hsts_include_subdomains'] = false