I can't access my GitLab through a subdomain
Heya,
I already tried several ways to do this. I can access my GitLab with my IP address but not with my subdomain I already set.
I set my subdomain in the installing process and also in the gitlab.rb
I also deleted my server and created a new one with a pre-installed GitLab from the marketplace where I set my subdomain in the field.
Ofc. I set the subdomain in my A record to the IP of my server.
Am I missing a step? Do I need to create a subdomain separately?
Thanks ^^
3 Replies
Hi there,
These types of situations can certainly be tricky to troubleshoot. It's especially curious that you are able to access your GitLab by your IP address but not the subdomain.
One of the first things that come to mind in these scenarios is delays in DNS propagation. Since it's been some time since you started working on this I'm disinclined to believe this is whats going on here. With that said, it could be the source so it's worth mentioning. You can review the status of your DNS record propagation with the website DNSChecker.
For what it's worth, I attempted to deploy my own Linode using the GitLab Marketplace App. After deploying, I created an A record for the subdomain git
in my Domain Manager. It's at this point that I attempted to visit the GitLab installation via the Linode's IP address and encountered an error -- which was successful.
No luck on the subdomain though. I confirmed that the error message I was encountering via my git subdomain was being served by the Linode. From researching the GitLab troubleshooting guide, I saw that they recommended reviewing the contents of the /etc/gitlab/gitlab.rb
file. From looking at this file on my Linode, I noticed that the subdomain I had supplied during creation was defined as follows:
external_url "http://git.mydomain.tld"
I took note of this as my browser by default attempts to connect via HTTPS, when I forced a connection on HTTP I was able to access my git
subdomain. I went ahead and modified this external_url setting to use HTTPS by changing it to:
external_url "https://git.mydomain.tld"
To get this change to take effect, I ran the command:
sudo gitlab-ctl reconfigure
It's worth noting that GitLab recommends invalidating the Markdown Cache after making any changes to the external_url.
Making this change was sufficient for allowing me access to the GitLab server via the subdomain that I had created. Hopefully this is helpful for you.
Hi,
thanks for the reply.
The DNS is set up correctly.. it points to the servers IP address.
And as I said, I configured the gitlab.rb file.
I also checked wether it is http or https.
But still I can't access it with my subdomain. But can access it with the IP adress.
Do I need to add a subdomain in my domain registrar first?