一、配置文件路径:/etc/gitlab/gitlab.rb
访问白名单IP
gitlab_rails['trusted_proxies'] = ["192.168.110.181"]
监听类型
gitlab_workhorse['listen_network'] = "tcp"
监听的IP与端口
gitlab_workhorse['listen_addr'] = "192.168.110.181:9810"
puma['worker_timeout'] = 60
puma['worker_processes'] = 4
puma['port'] = 9060
puma['exporter_port'] = 9061
sidekiq['listen_port'] = 9062
sidekiq['health_checks_listen_port'] = 9063
postgresql['shared_buffers'] = "256MB"
postgresql['max_worker_processes'] = 4
禁用自带nginx服务
nginx['enable'] = false
二、nginx代理访问配置
server {
listen 9100;
server_name localhost;
location / {
proxy_pass http://192.168.110.181:9810; //为gitlab配置中gitlab_workhorse['listen_addr']的IP:PORT
}
}
通过浏览器访问:http://192.168.110.181:9100