Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recreate gitlabs nginx conf file

Tags:

nginx

gitlab

I just deleted my gitlab omnibus nginx conf file. Is it possible to recreate?

with gitlab-ci reconfigure does not seems to work. However I see some ruby template which is responsible to create nginx conf

like image 484
deroccha Avatar asked Mar 05 '17 17:03

deroccha


1 Answers

As mentioned, nginx-gitlab-http.conf is managed by sudo gitlab-ctl reconfigure.

Note that it is called nginx-gitlab-http.conf, not gitlab-http.conf.
It is used in gitlab-cookbooks/gitlab/recipes/nginx.rb in order to generate gitlab-http.conf

Upon a gitlab-ctl reconfigure, you should see:

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)
  ...

Double-check your /etc/gitlab/gitlab.rb for any difference which might explain why this file is not recreated.

Make sure to do a sudo (as in sudo gitlab-ctl reconfigure) to avoid any permission issue.

like image 146
VonC Avatar answered Oct 02 '22 15:10

VonC