Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab pages "root" page

I have set up a gitlab server and gitlab pages for our company internal gitlab. The configuration was made according to Pages domain with tls support without wildcard dns.

The pages work correctly and i can access the pages over the address https://pages.example.com/group/project as expected.

I was now wondering if there is a way to define the "base" or "root" page for the whole instance. That page would then be served on the address https://pages.example.com.

Currently, when I call https://pages.example.com in my browser it redirects multiple times to https://pages.example.com///////////.

The documentation describes ways of defining group pages but I have not found a way to define a "root" page.

It could also be a redirect to another page. Similar as it is done when you call https://pages.gitlab.io

Thanks for your help!

like image 675
Flurin Avatar asked Aug 13 '26 05:08

Flurin


1 Answers

Followed the same setup as you, noticed this redirect loop.

I fixed it by adding this to my gitlab.rb:

pages_nginx['custom_gitlab_server_config'] = "# Fix redirect loop\n  location ~ ^/$ {\n    return 302 $scheme://$http_host/default/page;\n  }"

Then I ran the command:

gitlab-ctl reconfigure

Change 'default/page' to direct the user to the page you want to be default.

like image 118
E. Blevins Avatar answered Aug 20 '26 03:08

E. Blevins



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!