Installation of Gitlab + Apache in a subdomain shows always Gitlab for any URL

Hello

I have an installation of CentOS 6.8 + Gitlab CE 8.9.1 and Gitlab works, but when going to any site (or the root) of the Apache server always shows the Gitlab login page.

I’ve tried everything found with the Gitlab apache conf that i found searching the internet but unable to get it work.

I mean, if for example the server is: subdomain.domain.tld and Gitlab is under git.subdomain.domain.tld, if i go:

git.subdomain.domain.tld i get the Gitlab login page (As expected)
subdomain.domain.tld i get the Gitlab login page (instead of the http server root)
subdomain.domain.tld/egroupware i get the Gitlab login page (instead of the eGroupware page)
subdomain.domain.tld/some_random_chars i get the Gitlab login page (instead the error page)

My Apache conf file for this is:

# This configuration has been tested on GitLab 8.2
# Note this config assumes unicorn is listening on default port 8080 and
# gitlab-workhorse is listening on port 8181. To allow gitlab-workhorse to
# listen on port 8181, edit /etc/gitlab/gitlab.rb and change the following:
#
# gitlab_workhorse['listen_network'] = "tcp"
# gitlab_workhorse['listen_addr'] = "127.0.0.1:8181"
#
#Module dependencies
# mod_rewrite
# mod_proxy
# mod_proxy_http
<VirtualHost *:80>
  ServerName git.subdomain.domain.tld
  ServerSignature Off

  ProxyPreserveHost On

  # Ensure that encoded slashes are not decoded but left in their encoded state.
  # http://doc.gitlab.com/ce/api/projects.html#get-single-project
  AllowEncodedSlashes NoDecode

  <Location />
    Order deny,allow
    Allow from all

    #Allow forwarding to gitlab-workhorse
    ProxyPassReverse http://127.0.0.1:8181
    ProxyPassReverse http://git.subdomain.domain.tld/
  </Location>

  # Apache equivalent of nginx try files
  # http://serverfault.com/questions/290784/what-is-apaches-equivalent-of-nginxs-try-files
  # http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
  RewriteEngine on

  #Don't escape encoded characters in api requests
  RewriteCond %{REQUEST_URI} ^/api/v3/.*
  RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

  #Forward all requests to gitlab-workhorse except existing files like error documents
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
  RewriteCond %{REQUEST_URI} ^/uploads/.*
  RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]

  # needed for downloading attachments
  DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public

  #Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up.
  ErrorDocument 404 /404.html
  ErrorDocument 422 /422.html
  ErrorDocument 500 /500.html
  ErrorDocument 502 /502.html
  ErrorDocument 503 /503.html

  # It is assumed that the log directory is in /var/log/httpd.
  # For Debian distributions you might want to change this to
  # /var/log/apache2.
  LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded
  ErrorLog /var/log/httpd/git.subdomain.domain.tld.log
  CustomLog /var/log/httpd/git.subdomain.domain.tld.log common_forwarded
  CustomLog /var/log/httpd/git.subdomain.domain.tld.log combined env=!dontlog
  CustomLog /var/log/httpd/git.subdomain.domain.tld.log combined

</VirtualHost>

Do anyone knows how to solve this? I’ve done all my best but unable to resolve.

Thanks!

How does your gitlab.rb look

I have some trouble myself with that.
But I needed to turn off Nginx adding this here to gitlab.rb

nginx[‘enable’] = false

Hello

Thanks by your answer, but i already have

nginx[‘enable’] = false

Note the problem is that when i access any subdomain (or the main domain) it always shows the gitlab login page

I have gitlab in git.subdomain.domain.tld and i always get the gitlab login page even i access (for example):
http://domain.tld
http://subdomain.domain.tld
http://subdomain.tld/application

Best.

If I didn’t know any better, then I would think that you used ISPConfig3 together with Gitlab.
Doing that myself, and I have the gitlab and all the other sites running.

But my problem is, that I cannot download any projects. Only get a empty archive.