GitLab CI - Install Web Server



Description

GitLab CI uses the Nginx web server to proxy the request in the GitLab CI application. In this chapter, we will discuss about how to install web server in the GitLab CI.

Installation of Web Server

Step 1 − First, login to your GitLab server using SSH (Secure Shell).

Step 2 − Install the Nginx with the below command −

sudo apt-get install nginx

Step 3 − Next, copy the example site configuration above the Nginx enabled sites −

sudo cp /home/gitlab_ci/gitlabci/lib/support/nginx/gitlab_ci /etc/nginx/sitesenabled/gitlab_ci

Step 4 − Change the default_server address to IP address of your GitLab CI server in the configuration file −

sudo editor /etc/nginx/sites-enabled/gitlab_ci

Step 5 − Now you can test the Nginx configuration file −

sudo nginx -t
GitLab Web Server

Step 6 − After configuring the file, start the server by using below command −

sudo /etc/init.d/nginx start
GitLab Web Server
Advertisements