当下的问题是 gitlab 的新建项目的主机名为 gitlab 所在的阿里云服务器内部 ip,导致的一个结果是 pipeline 的日志输出不能正常显示。这个之前查到该日志调用的是一个 trace.json,但是由于是内网的 ip,所以不能正确加载。而这个 ip 正是项目所在的服务器,这种配置显然是有问题的。
经过一番查找,在 gitlab 官网上找到了有人遇到并解决了这个问题。通过修改 nginx 的配置能解决。主要是配置 nginx upstream,重启 nginx 后会用该 upstream 定义的域名作为 gitlab(走代理)项目的 hostname。
upstream gitlab.domain {
server 127.0.0.1:10821;
}
server {
server_name gitlab.domain;
location / {
proxy_pass http://gitlab.domain;
}
}
参考 Incorrect URL for builds and new projects when behind a proxy
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。