Gitlab nginx wont start to work. 「down: nginx: 1s, normally up, want up; run: log: (pid 20128)xxx」

conclusion

  • I got this problem as well. and now I’ve solved it.

solution

I’ve modified the /etc/gitlab/gitlab.rb file, changed into

nginx[‘redirect_http_to_https_port’] = 80
nginx[‘listen_port’] = 443

and sudo gitlab-ctl reconfigure + sudo gitlab-ctl restart, and it works.

process

in the past, the reason i could connect to gitlab server is because that my colleague have set something in the /var/opt/gitlab/nginx/conf/gitlab-http.conf file.

Redirects all HTTP traffic to the HTTPS host
server {
  listen *:80;

  server_name gitlab.xxxxx.com;
  server_tokens off; ## Don't show the nginx version number, a security best practice


  location / {
    return 301 https://gitlab.xxxxxx.com:443$request_uri;
  }

  # health checks configuration
  include /var/opt/gitlab/nginx/conf/gitlab-health.conf;

  access_log  /var/log/gitlab/nginx/gitlab_access.log gitlab_access;
  error_log   /var/log/gitlab/nginx/gitlab_error.log;
}

server {
  listen *:443 ssl http2;


  server_name gitlab.xxxxxx.com;
  server_tokens off; ## Don't show the nginx version number, a security best practice
  • and once if I’ve use the command sudo gitlab-ctl reconfigure, and the file gitlab-http.conf would be covered by /etc/gitlab/gitlab.rb. and the nginx settings in /etc/gitlab/gitlab.rb would start to take position that makes me cannot visit gitlab server after using the command sudo gitlab-ctl reconfigure.

  • and now I’ve set the nginx settings right in /etc/gitlab/gitlab.rb just like in the solution part.

  • hope it could help. thx.

  • 回复在gitlab的官方相关讨论中,所以是英文回复。 不打算重新用中文写一遍了。 直接搬迁过来。

  • gitlab 链接

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值