当前位置:   article > 正文

GitLab 启用HTTPS

GitLab 启用HTTPS

其实由于GitLab只负责监听本地socket文件,而web服务器采用了Nginx等。只需要在web server上做适当的配置即可。

下面是一个采用Nginx的例子,对GitLab安装指南下载的gitlab脚本文件做了适当的修改。

# GITLAB
# Maintainer: @randx
# App Version: 4.0

upstream gitlab {
  server unix:/home/gitlab/gitlab/tmp/sockets/gitlab.socket;
}

server {
  listen 443;
  ssl                  on;
  ssl_certificate      /etc/nginx/sites-available/server.crt;
  ssl_certificate_key  /etc/nginx/sites-available/server.key;

  server_name localhost;
  #ubuntu1204-dell source.cml.com;     # e.g., server_name source.example.com;
  root /home/gitlab/gitlab/public;



  # individual nginx logs for this gitlab vhost
  access_log  /var/log/nginx/gitlab_access.log;
  error_log   /var/log/nginx/gitlab_error.log;

  location / {
    # serve static files from defined root folder;.
    # @gitlab is a named location for the upstream fallback, see below
    try_files $uri $uri/index.html $uri.html @gitlab;
  }

  # if a
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/208048
推荐阅读
相关标签
  

闽ICP备14008679号