I’d like to add a virtual host to my server running Gitlab. Googling suggests that I can run Apache instead, or switch to a stock version of Nginx (doc/settings/nginx.md · master · GitLab.org / omnibus-gitlab · GitLab), but is it possible to just add another virtual host to the existing Nginx?
It looks like I would need to make some changes to /etc/gitlab/gitlab.rb so that they would end up in /var/opt/gitlab/nginx/conf/gitlab-http.conf.
Is this possible, or am I better off switching to Apache?
Thanks!
EDIT: looking at the Nginx documentation, it looks like I might just be able to change the existing server block so that it has:
server_name git.my_domain.com;
and then add a second server block that looks like this:
server {
server_name www.my_domain.com;
access_log logs/www.access.log main;
root /var/www.my_domain.com/htdocs;
}
But I’d have to somehow get that to be generated by /etc/gitlab/gitlab.rb, no?
EDIT2: Or can I just uncomment this line in /etc/gitlab/gitlab.rb:
# nginx['custom_nginx_config'] = "include /etc/nginx/conf.d/example.conf;"
and then create /etc/nginx/conf.d/example.conf and add another server block there?