重新创建gitlabs nginx conf文件

der*_*cha 8 nginx gitlab

我刚刚删除了我的gitlab omnibus nginx conf文件.有可能重新创建吗?

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

Von*_*onC 3

如前所述,nginx-gitlab-http.conf由 管理sudo 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)
  ...
Run Code Online (Sandbox Code Playgroud)

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

确保执行 a sudo(如 中所示sudo gitlab-ctl reconfigure)以避免任何权限问题。