Page 1 of 1

Setup GitLab to run on a subdomain

Posted: Tue Dec 13, 2016 6:10 pm
by rajbdilip
I installed GitLab following the steps on their website. (https://about.gitlab.com/downloads/#debian8)

I already have a website setup on my domain. I want to be able to access GitLab on a subdomain i.e. https://gitlab.mydomain.com.

How can I do this?

Re: Setup GitLab to run on a subdomain

Posted: Tue Dec 13, 2016 7:46 pm
by ScIT
For GitLab you need an own server/VPS, I would not suggest you to install it on top on an existing VestaCP server. Then just create a dns record for gitlab.mydomain.com, install GitLab and configure it to this domain.

Re: Setup GitLab to run on a subdomain

Posted: Wed Dec 14, 2016 4:41 am
by rajbdilip
ScIT wrote:For GitLab you need an own server/VPS, I would not suggest you to install it on top on an existing VestaCP server. Then just create a dns record for gitlab.mydomain.com, install GitLab and configure it to this domain.
Why isn't it a great idea to install GitLab on top of VestaCP server?

And what DNS record would I create and what would it point to?

Re: Setup GitLab to run on a subdomain

Posted: Wed Dec 14, 2016 7:00 am
by ivanh
May I suggest an alternative to GitLab that plays nicely with VestaCP.

https://gist.github.com/joubertredrat/7 ... 660c9d760a

Re: Setup GitLab to run on a subdomain

Posted: Tue Dec 20, 2016 11:59 pm
by Kilandor
I have been running Gitlab with vesta for over 2 years now. Their are no problems outside of getting the configuration/setup correct which is pretty simple.

You need to configure gitlab to not use its internal server. Then use the Nginx Config provided with gitlab and simply modify and add a configuration for it.

I am using Ubuntu 14.04 LTS with the apt-get omnibus version of Gitlab, it makes it much easier to maintain than manually installing gitlab.
I will mention original setup I had some issues with permissions and getting the configuration right. However I think on the newer versions I did it pretty quickly.

This should more or less cover most of the important points about it.
https://gitlab.com/gitlab-org/omnibus-g ... s/nginx.md


I think the vhost block looks a little different than mine. I also have an issue with HTTP access to the git repo's but I don't care about that.

For the most, its disable http with gitlab, copy over the nginx config and load it. Then restart nginx.

Re: Setup GitLab to run on a subdomain

Posted: Sun Feb 05, 2017 12:15 am
by fireagle
Was having the same problem.
It seems the firewall was not releasing the required ports.
I was able to solve these commands.
# Sudo systemctl start firewalld.service
(Services will be unavailable)
# Sudo systemctl stop firewalld.service
(Here I deactivate all services)
Restart the server.
And it will work
(Centos 7 vpn)

Re: Setup GitLab to run on a subdomain

Posted: Sun Jun 24, 2018 5:58 pm
by hdavis84
Kilandor wrote:
Tue Dec 20, 2016 11:59 pm
Then use the Nginx Config provided with gitlab and simply modify and add a configuration for it.
I'm having a little trouble finding this config you speak of. I've played around with a few configs I found but have not found success. If you could help not only me but others in giving an example config for use with gitlab, that would be wonderful. Of course, with your domain and sensitive info redacted.