Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Gitlab Cookbook

You're reading from   Gitlab Cookbook Over 60 hands-on recipes to efficiently self-host your own Git repository using GitLab

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781783986842
Length 172 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Jeroen van Baarsen Jeroen van Baarsen
Author Profile Icon Jeroen van Baarsen
Jeroen van Baarsen
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Introduction and Installation 2. Explaining Git FREE CHAPTER 3. Managing Users, Groups, and Permissions 4. Issue Tracker and Wiki 5. Maintaining Your GitLab Instance 6. Webhooks, External Services, and the API 7. Using LDAP and OmniAuth Providers 8. GitLab CI A. Tips and Tricks Index

Installing the web server


Now that we have installed GitLab CI, we still need a way to expose it to the Internet. This is where Nginx comes into play. In this recipe, we will take a look at how you can set up Nginx to proxy the request back to your GitLab CI app. It is also possible to use another web server such as Apache here, but Nginx is recommended.

How to do it…

In the following steps, we will install the web server:

  1. Log in via SSH to your CI server.

  2. Install Nginx:

    $ sudo apt-get install nginx
    
  3. Next, we have to copy the example site configuration over to the Nginx-enabled sites:

    $ sudo cp /home/gitlab_ci/gitlab-ci/lib/support/nginx/gitlab_ci /etc/nginx/sites-enabled/gitlab_ci
    
  4. We still have to change a few things in the configuration file that we just copied. Change the default_server address to the IP address of your server, and change the server_name value to the full domain name of your GitLab CI server:

    $ sudo editor /etc/nginx/sites-enabled/gitlab_ci
    
  5. Check whether the Nginx configuration...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime