我刚刚删除了我的gitlab omnibus nginx conf文件.是否可以重新创建?
使用gitlab-ci reconfigure似乎不起作用.但是我看到一些ruby模板负责创建nginx conf
最佳答案
如上所述,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重新配置后,您应该看到:
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中)以避免任何权限问题.