M
M
Maxim2018-08-03 17:56:31
ubuntu
Maxim, 2018-08-03 17:56:31

How to install GitLab on only one subdomain?

Hello!
I created a subdomain on my VPS specifically for GitLab. After that, I installed GitLab, but after installation, it opens both on the subdomain and on the main domain too.
Tell me, please, what and where do I need to register so that the gitlab works only on a subdomain? (for example, gitlab.example.com) There is a suspicion that the matter is in nginx, but I hardly worked with it, mostly only apache.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2018-08-03
@Tomio

Настройте Server Blocks (в Apache - Virtual Hosts) для gitlab, в котором root будет указывать на gitlab
а дефолтный - на пустую папку.
например блок для gitlab, если gitlab установлен в /var/www/gitlab

http {
  index index.php index.html;

  server {
    server_name gitlab.example.com;
    root /var/www/gitlab;
  }
}

Почитайте https://www.nginx.com/resources/wiki/start/topics/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question