When i open the server ip where the gitlab is installed i get redirected to a website

Hello there.
I installed Gitlab on CentOS 6 and i am testing it locally.
Whenever i try to open the gitlab using browser and the local ip of the server i get redirected to the website which i added as the admin profile website field.
anyone know how to fix this or what can cause such issue?
when i stop the gitlab there is no redirect when i browse the server ip just the standard error not reachable the redirect only happens when the gitlab is running.

Try to add in your /etc/hosts the ip and hostname of the CentOS machine.

1 Like

Thanks for replying @axil, your suggestion holds water but i fixed the issue. the issue was my bad knowledge for setting the gitlab. i set up the gitlab homepage to my main domain (i was thinking that homepage in the gitlab was meant to add link to the main page of the company…) and my gitlab was set on a subdomain. so whenever i opened the subdomain the gitlab was redirecting me to the main domain :slight_smile: silly me :slight_smile: thats what you get if your lazy like me to read all the documentation.
all i had to do was to open “[publicip]//users/sign_in” in my browser and change the homepage in the gitlab to my gitlab subdomain.
thanks again for offering your help.
best wishes.

Heh, I didn’t think of that, glad you solved it.

1 Like