• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Install GitLab on Ubuntu on Nginx Subdirectory (HP Cloud)

By Abhishek Ghosh May 26, 2015 6:17 pm Updated on May 26, 2015

Install GitLab on Ubuntu on Nginx Subdirectory (HP Cloud)

Advertisement

Lot of Conditions – Install GitLab on Ubuntu on Nginx Subdirectory HP Cloud. It is possible to install Gitlab in Subdirectory on Nginx but is Complicated. You should be an advanced user and have a good server admin for the server, particularly if the root has WordPress. Nginx will need fresh compiling again. It is not really very easy. Most of the websites nowadays in favor of using subdirectory instead of subdomain due to increased number of HTTPS and HSTS websites.

 

Install GitLab on Ubuntu on Nginx Subdirectory (HP Cloud)

 

If it is HP Cloud / OpenStack installation, take a snapshot before proceeding. We are using Nginx as a Web server to host Rails app with Nginx and Passenger. Just the commands :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
apt update -y && apt upgrade
# apt-get update -y && apt-get upgrade
sudo useradd git -md /home/git -s /bin/bash
sudo passwd git
sudo nano /etc/sudoers
## check/add these lines
# root    ALL=(ALL:ALL) ALL
# git     ALL=(ALL:ALL) ALL
## we gave sudo privilege to git. you can add username if you want.
# username   ALL=(ALL:ALL) ALL
## end comment
su -git
sudo apt-get install curl git build-essential libgtk2.0-dev libmysqlclient-dev mysql-server dialog zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl git-core openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev python-docutils sysv-rc-conf
nano ~/.gemrc
# paste it
# gem: --no-ri --no-rdoc
# save and exit nano
sudo apt-get install ruby ruby-dev && sudo gem install rails
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update -y
sudo apt-get install ruby2.1 ruby2.1-dev
sudo gem install rails
sudo service redis-server restart && sudo sysv-rc-conf redis-server on
git config --global user.name "GitLab"
# edit
git config --global user.email "gitlab@localhost.tld"
git clone https://github.com/gitlabhq/gitlab-shell.git
cd gitlab-shell/
# change according to need
git checkout -b 1.8.5 v1.8.5
cp config.yml.example config.yml
nano config.yml
# edit the line gitlab_url: to indicate your subdomain with domain name
./bin/install
git clone https://github.com/gitlabhq/gitlabhq.git gitlab
cd gitlab
# tested version
git checkout -b 6.6.5 v6.6.5
cp config/gitlab.yml.example config/gitlab.yml
nano config/gitlab.yml
# host: www.something.tld
# https: false or true
# relative_url_root: /subdir_name
## change subdir_name to real
nano config/application.rb
# config.relative_url_root = "/subdir_name"
# ENV['RAILS_RELATIVE_URL_ROOT'] = "/subdir_name"
cp config/database.yml.mysql config/database.yml
nano config/database.yml
# username: root
# password: "yours"
bundle install --deployment --without development test postgres
mkdir /home/git/gitlab/tmp/pids && mkdir /home/git/gitlab/public/uploads
rake db:create RAILS_ENV=production
rake gitlab:setup RAILS_ENV=production
wget https://gist.githubusercontent.com/AbhishekGhosh/77ffb178005b70eb694f/raw/943c3209df9621ca6c196d513fb4209ae7165b1f/gitlab.sh
# read it to edit
# nano gitlab.sh
chmod +x gitlab.sh
sudo cp gitlab.sh /etc/init.d/gitlab
sudo chmod 744 /etc/init.d/gitlab
sudo sysv-rc-conf gitlab on
sudo service gitlab start
sudo gem install passenger && sudo passenger-install-nginx-module
# select option in prompt carefully
# edit path
wget https://gist.githubusercontent.com/AbhishekGhosh/2113e134b3e91b34f300/raw/9776e6bedec87bc8a333b7cdcc3f0405b4cb31b2/nginx
sudo chown www-data:www-data /opt/nginx -R
sudo chmod 775 /opt/nginx -R
sudo mv nginx /etc/init.d/
sudo chmod 755 /etc/init.d/nginx
sudo chown root:root /etc/init.d/nginx
sudo sysv-rc-conf nginx on
nginx -t
# service nginx start

Install GitLab on Ubuntu on Nginx Subdirectory (HP Cloud)

Now configuring Nginx’s nginx.conf file :

Advertisement

---

Vim
1
2
3
4
5
6
7
8
location ~ ^/gitlab {
    root /home/git/gitlab/public;
    passenger_app_root /home/git/gitlab;
    passenger_enabled on;
    rails_env production;
    access_log  /opt/nginx/logs/gitlab.access.log;
    error_log  /opt/nginx/logs/gitlab.error.log;
    }

Vim
1
2
3
cd /home/git/gitlab
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
sudo service nginx restart

Point your browser to subdir to check whether its working or not. Debugging will be needed. We read it somewhere in a Jap website with Google Translate for our internal need.

Tagged With gitlab 8 subdir , gitlab https subdirectory , gitlab subfolder ngix , paperuri:(f5a42fdee605ea283242576b6876440c)

This Article Has Been Shared 162 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Install GitLab on Ubuntu on Nginx Subdirectory (HP Cloud)

  • Cloud Computing 3D Rendering And Scope In Film Industry

    Cloud Computing 3D Rendering Has Definite Scope in Film Industry which might alarm the Stars of tomorrow and relieve the Producers investing in the Films.

  • Cloud Computing and Designing Own Truly Scalable System

    Cloud Computing becomes fully enjoyable if it is arranged to make a scalable system for the application or CMS or any web software including WordPress.

  • How Cloud Computing Challenge The Networks

    How Cloud Computing Challenge Networks with virtually unlimited storage and computing capacity, reduced cost and maximum flexibility and massive data traffic.

  • PubSubHubbub and Rackspace Cloud Queue

    PubSubHubbub is a networking protocol. Rackspace is Open Source but infamous for difficult to understand API documentation by normal human.

  • How to Upload Backup to Dropbox from Cloud Server

    Here is How to Upload Backup to Dropbox from Cloud Server in Case You Want To Keep Your Backup of Files and Database on a Free Cloud Storage.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • What is Voice User Interface (VUI) January 31, 2023
  • Proxy Server: Design Pattern in Programming January 30, 2023
  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023
  • How to Do Electrical Layout Plan for Adding Smart Switches January 26, 2023
  • What is a Data Mesh? January 25, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Install GitLab on Ubuntu on Nginx Subdirectory (HP Cloud)," in The Customize Windows, May 26, 2015, February 1, 2023, https://thecustomizewindows.com/2015/05/install-gitlab-ubuntu-on-nginx-subdirectory-hp-cloud/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT