2

I am currently setting up gitlab pages for our internal network. Now I have completed my project and the CI pipeline is working. Now I have gone through all the steps in the gitlab.rb configuration via the gitlab docs but still I can't get gitlab pages to work.

My Gitlab.rb config:

gitlab_pages['enable'] = true
gitlab_pages['pages_external_url'] = pages.domain.xyz
gitlab_pages['external_http'] = ['192.168.x.x:80']
gitlab_pages['external_https'] = ['192.168.x.x:443']
gitlab_pages['cert'] = "/etc/gitlab/ssl/pages.domain.xyz.crt"
gitlab_pages['cert_key'] = "/etc/gitlab/ssl/pages.domain.xyz.key"
gitlab_pages['status_uri'] = "/@status"
gitlab_pages['max_connections'] = 0
gitlab_pages['log_format'] = "json"
gitlab_pages['log_verbose'] = true
gitlab_pages['redirect_http'] = true
gitlab_pages['dir'] = "/var/opt/gitlab/gitlab-pages"
gitlab_pages['log_directory'] = "/var/log/gitlab/gitlab-pages"
gitlab_pages['gitlab_server'] = 'https://gitlab.domain.xyz' # Defaults to external_url

My DNS is as follows:

  • A record for gitlab instance
  • A records for pages.domain.xyz
  • Wildcard for *.pages.domain.xyz

When I go to the pages page in my project the page URL is https://user.pages.domain.xyz/project and this is not how it works I believe.

I hope someone can help me tackle this problem!

JMNSTYLZ
  • 41
  • 5
  • What exactly do you mean by "not working" what are you doing and what is happening (or not happening)? `the page URL is https://user.pages.domain.xyz/project and this is not how it works I believe.` -- what about this is wrong to you? Seems correct to me. – sytech Jul 08 '22 at 19:42
  • Thank you for your reply! If that is okay, what can the problem be? I have setup the DNS correctly and my Gitlab-ci.yml file is correct and the pipelines are working the right way. The thing is I have 'cloned' the gitlab pages vuepress from examples. Then i have setup gitlab runner and setup the DNS. – JMNSTYLZ Jul 10 '22 at 17:08
  • I'm asking you! I don't think you have described any problem at all. From your point of view, what is not working? Can you not see the pages project? Or what? – sytech Jul 11 '22 at 21:37
  • Sorry then I missunderstood your question. I have checked the DNS again and it is working properly. I have checked the project again and it is working. The problem is that my project is not visible on the URL. I just get an blank page and it is saying that it takes too long to respond. My Gitlab CI is fine and is deploying the pages I see that in my CI job. For your perspective: I have copied the vuepress example site and added the gitlab-ci.yml. I have enabled pages as described and set the DNS. also HTTPS is enabled and I have set a valid SSL cert for pages.domain.xyz. – JMNSTYLZ Jul 12 '22 at 10:14

1 Answers1

0

Maybe GitLab 15.4 (September 2022) will help:

Getting started with GitLab Pages just got easier

We’ve made it much easier to get started with GitLab Pages. Instead of creating configuration files by hand, build them interactively using the GitLab UI.
Just answer a few basic questions on how your app is built, and we’ll build the .gitlab-ci.yml file to get you started.

This is the first time we’re using our new Pipeline Wizard, a tool that makes it easy to create .gitlab-ci.yml files by building them in the GitLab UI.
You can look forward to more simplified onboarding helpers like this one.

https://about.gitlab.com/images/15_4/create-pages-onboarding.png -- Getting started with GitLab Pages just got easier

See Documentation and Issue.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250