赞
踩
docker ps 查看已经安装好的gitlab,80,443端口也已经打开。
搭建好gitlab后,需要能让外网访问https访问到。
docker安装gitlab的时候,已经集成nginx只需要配置Nginx即可完成。
external_url 'https://gitlab.geexek.com.cn'
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.geexek.com.cn.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.geexek.com.cn.key"
nginx['proxy_set_headers'] = {
"X-Forwarded-Proto" => "https",
"X-Forwarded-Ssl" => "on"
}
server { listen *:443 ssl http2; server_name gitlab.geexek.com.cn; server_tokens off; ## Don't show the nginx version number, a security best practice ## Increase this if you want to upload large attachments ## Or if you want to accept large git objects over http client_max_body_size 0; ## Strong SSL Security ## https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html & https://cipherli.st/ ssl on; ssl_certificate /etc/gitlab/ssl/gitlab.geexek.com.cn.crt; ssl_certificate_key /etc/gitlab/ssl/gitlab.geexek.com.cn.key; }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。