I know this question has been answered before, and I did a research, but sadly couldn’t resolve my problem.
I successfully installed GitLab on a CentOs 6.8 machine (that we use as a Preprod) recently, and I came across a problem while configuring it to work with apache (already installed and used for the base of MyDomain link) :
While GitLab actually works, it does only on MyDomain (which is a .com URL), and not on the supposed gitlab.MyDomain
Whenever I touch anything on the httpd vhost configs, it’s either my website that’s working, or gitlab, but never both of them on respectively MyDomain and gitlab.MyDomain
Here’s my config :
external_url “http://MyDomain:8181” (when replaced with gitlab.MyDomain, doesn’t work)
nginx[‘enable’] = false
gitlab-workhorse[‘listennetwork’] = “tcp”
gitlab-workhorse[‘listenaddr’] = “127.0.0.1:8181”
web_server[‘external_users’] = [‘www-data’]
And my vhost on httpd.conf :
<VirtualHost *:80> ServerName gitlab.MyDomain ServerSignature Off ProxyPreserveHost On <Location /> Order deny,allow Allow from all ProxyPassReverse / http://127.0.0.1:8181 </Location> DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public </VirtualHost>
While GitLab works just fine, it’s only working on MyDomain and not gitlab.MyDomain
So my website (MyDomain) isn’t accessible anymore but is replaced with GitLab
Plus, gitlab.MyDomain isn’t answering (not even an error on Apache, just like an unknown link)
Anyone can help me please configure Gitlab/Apache to redirect gitlab on gitlab.MyDomain ?
I’m not very good at Apache conf actually, but surprised there’s no tutorial for beginners to make it work…
Thanks in advance!!