User Tools

Site Tools


gitlab_nginx_additional

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
gitlab_nginx_additional [2021/12/06 21:40] – created admingitlab_nginx_additional [2021/12/06 22:15] (current) admin
Line 1: Line 1:
 ====== Gitlab NGINX custom/additional config ====== ====== Gitlab NGINX custom/additional config ======
 +
 +Sometimes it's handy to have a additional domain configured for the Gitlab Omnibus bundled
 +NGINX Server. Even though it is not encouraged doing so by Gitlab, it is still
 +possible.
 +
 +===== Gitlab config =====
  
 Edit ''/etc/gitlab/gitlab.rb'' and add/change the following values Edit ''/etc/gitlab/gitlab.rb'' and add/change the following values
Line 16: Line 22:
 </code> </code>
  
 +===== Additional NGINX config =====
  
 Create folder ''/etc/nginx-gitlab/sites'' and add the following file: Create folder ''/etc/nginx-gitlab/sites'' and add the following file:
Line 27: Line 34:
         index index.html index.htm;         index index.html index.htm;
  
-        server_name example.com;+        server_name example.com www.example.com;
  
         location / {         location / {
Line 45: Line 52:
         index index.html index.htm;         index index.html index.htm;
  
-        server_name example.com;+        server_name example.com www.example.com;
  
         # Refer to Gitlabs letsencrypt cert here.         # Refer to Gitlabs letsencrypt cert here.
Line 64: Line 71:
  
 </code> </code>
 +
 +Run ''gitlab-ctl reconfigure'' to apply the changes made to the configuration.
gitlab_nginx_additional.1638823202.txt.gz · Last modified: 2021/12/06 21:40 by admin