I can't figure out how to setup Gitlab Pages on my self-hosted Gitlab instance without wildcard domains. For example, I have 1 server with 3 public IP addresses and domain names:
- 10.8.0.10 (git.example.com) - main GitLab instance
- 10.8.0.11 (registry.example.com) - container registry
- 10.8.0.12 (pages.example.com) - GitLab Pages
Then' I set up the Omnibus config /etc/gitlab/gitlab.rb
like that:
external_url 'https://git.example.com'
nginx['enable'] = true
nginx['listen_addresses'] = ['10.8.0.10']
registry_external_url 'https://registry.example.com'
registry_nginx['enable'] = true
registry_nginx['listen_addresses'] = ['10.8.0.11']
registry_nginx['ssl_certificate'] = "/etc/gitlab/ssl/git.example.com.crt"
registry_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/git.example.com.key"
pages_external_url 'https://pages.example.com'
pages_nginx['enable'] = false
gitlab_pages['enable'] = true
gitlab_pages['cert'] = "/etc/gitlab/ssl/pages.example.com.crt"
gitlab_pages['cert_key'] = "/etc/gitlab/ssl/pages.example.com.key"
gitlab_pages['external_http'] = ['10.8.0.12:80']
gitlab_pages['external_https'] = ['10.8.0.12:443']
For example, I have a project located on https://git.example.com/somegroupname/project. I can get an access to container registry of this project by https://registry.example.com/somegroupname/project and pull the Docker image with command docker pull registry.example.com/somegroupname/project
.
I know that GitLab Pages set namespaces as the A-record. In my case, it sets up like https://somegroupname.pages.example.com/project, but I don't have an availability to use such domain names. Instead of that, I want to place the namespace in path like that:
https://pages.example.com/somegroupname/project
but I can't find any settings or parameters to enable this behavior, and it doesn't work with the current setup. All the pages stored correctly in default path /var/opt/gitlab/gitlab-rails/shared/pages/
. Can please somebody help me?