1.修改配置文件 vi /etc/gitlab/gitlab.rb 1.1.external_url http属性修改为https: external_url'https://ip:port' 1.2.nginx配置这几个参数设置为 nginx['redirect_http_to_https'] =true nginx['ssl_certificate'] ="/etc/gitlab/ssl/server.crt" nginx['ssl_certificate_key'] ="/etc/gitlab/ssl/...
nginx['redirect_http_to_https'] = true nginx['redirect_http_to_https_port'] = 80 最后执行 gitlab-ctl reconfigure 不用配置443端口,因为已经自动指向了。接下来看看成果吧,完美的https 正经的HTTPS证书版本,阿里云的ssl证书 首先拿到两个证书,一个是key文件,一个为pem文件。 将pem文件直接改为crt后缀的...
nginx['redirect_http_to_https'] = true networks: traefik: external: true 因为使用 Traefik 处理 HTTP/HTTPS 流量,所以 GitLab 只需要开放 80 端口即可,但是需要在label中定义服务发现的各种规则。 同样的,这里的核心配置是external_url和nginx['listen_https'],前者依旧要保持有https协议,但是后续则需要配置为...
nginx['redirect_http_to_https'] = true nginx['redirect_http_to_https_port'] = 80 nginx['ssl_certificate'] = "/etc/gitlab/ssl/域名.crt" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/域名.key" nginx['ssl_ciphers'] = "ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!
external_url 'https://192.168.137.129' nginx['enable'] = true nginx['client_max_body_size'] = '250m' nginx['redirect_http_to_https'] = false nginx['redirect_http_to_https_port'] = 80 nginx['ssl_certificate'] = "/etc/gitlab/ssl/server.crt" ...
nginx['ssl_certificate_key'] = "/etc/ssl/your.domain.com/privkey.key" #(可选)强制HTTP重定向到HTTPS: nginx['redirect_http_to_https'] = true # 配置NGINX监听端口: nginx['listen_port'] = 443 nginx['listen_https'] = true 2、应用配置并重启GitLab...
nginx['redirect_http_to_https'] = true #http重定向到https,使用http的访问会自动重定向到https; nginx['redirect_http_to_https_port'] = 80 其余的配置其实都不需要,包括: nginx['ssl_certificate']="/etc/gitlab/ssl/server.crt"/var/opt/gitlab/nginx/conf/gitlab-http.conf ...
# nginx['redirect_http_to_https_port'] = 80 ##! Most root CA's are included by default # nginx['ssl_client_certificate'] = "/etc/gitlab/ssl/ca.crt" ##! enable/disable 2-way SSL client authentication # nginx['ssl_verify_client'] = "off" ...
nginx['redirect_http_to_https']=true 接着需要设置SSL证书。用File Station在docker/gitlab/config/,或者Docker里面/etc/gitlab/新建ssl目录,然后把SSL证书下载到的pen和key文件存放到ssl目录。我用的阿里云,因为新增了git.abc.com二级域名解析,也需要申请对应的免费SSL证书,下载的时候选择nginx服务器格式就好,这个...
nginx['redirect_http_to_https'] = false nginx['redirect_http_to_https_port'] = 80 1. 2. 3. 然后重启容器 再然后修改nginx的配置文件 vim nginx.conf client_max_body_size 60m; ##在http内加上 1. 2. 3. 4. 即可解决上传文件大小限制的问题。