【问题标题】:Recreate gitlabs nginx conf file重新创建 gitlabs nginx conf 文件
【发布时间】:2017-07-25 11:58:04
【问题描述】:

我刚刚删除了我的 gitlab 综合 nginx conf 文件。是否可以重新创建?

gitlab-ci reconfigure 似乎不起作用。但是我看到一些负责创建 nginx conf 的 ruby​​ 模板

【问题讨论】:

  • 你的意思是什么配置文件?在../gitlab/nginx/conf/nginx.conf 中有一个注释,即This file is managed by gitlab-ctl. Manual changes will be erased! To change the contents below, edit /etc/gitlab/gitlab.rb and run sudo gitlab-ctl reconfigure.
  • 我的意思是gitlab-http.conf 这个不是用 gitlab-ctl reconfigure 重新创建的
  • gitlab-http.conf 文件有同样的注解说它是由 gitlab-ctl 管理的...

标签: nginx gitlab


【解决方案1】:

如前所述,nginx-gitlab-http.confsudo gitlab-ctl reconfigure 管理。

注意它被称为nginx-gitlab-http.conf,而不是gitlab-http.conf
它用于gitlab-cookbooks/gitlab/recipes/nginx.rb,以生成gitlab-http.conf

gitlab-ctl reconfigure 上,您应该看到:

Recipe: gitlab::nginx
  * directory[/var/opt/gitlab/nginx] action create (up to date)
  * directory[/var/opt/gitlab/nginx/etc] action create (up to date)
  * directory[/var/log/gitlab/nginx] action create (up to date)
  * template[/var/opt/gitlab/nginx/etc/gitlab-http.conf] action create (up to date)
  ...

仔细检查您的 /etc/gitlab/gitlab.rb 是否有任何差异,这可以解释为什么没有重新创建此文件。

确保使用sudo(如sudo gitlab-ctl reconfigure)以避免任何权限问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-10
    • 2016-07-15
    • 1970-01-01
    • 1970-01-01
    • 2021-10-02
    • 2011-02-25
    • 1970-01-01
    • 2018-12-18
    相关资源
    最近更新 更多