Gitlab web interface is not working with apache2 on CentOS 7.2

I re-installed my web-server to run GitLab-CI on CentOS 7.2. I was able to get it installed and have apache2 setup. I’m not sure what I did wrong. Here are the configs for both apache and gitlab.

[andrew.meyer@asm-web01 ~] sudo cat /etc/gitlab/gitlab.rb | grep -v '^|^\s*#’
external_url ‘http://gitlab.borg.local
gitlab_rails[‘time_zone’] = ‘CST’
gitlab_rails[‘db_adapter’] = “postgresql”
gitlab_rails[‘db_encoding’] = “utf8”
gitlab_rails[‘db_collation’] = ‘unicode’
gitlab_rails[‘db_database’] = “gitlabhq_production”
gitlab_rails[‘db_username’] = “gitlab”
gitlab_rails[‘db_password’] = “Infotech5!”
gitlab_rails[‘db_host’] = “”
gitlab_rails[‘db_port’] = “5432”
unicorn[‘port’] = 8081
postgresql[‘enable’] = false
web_server[‘username’] = ‘gitlab-www’
web_server[‘group’] = ‘gitlab-www’
nginx[‘enable’] = false
ci_nginx[‘enable’] = false
[andrew.meyer@asm-web01 ~]$

[andrew.meyer@asm-web01 ~]$ sudo cat /etc/httpd/conf.d/gitlab.conf

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 or create /etc/default/gitlab and change or add the following:

gitlab_workhorse_options="-listenUmask 0 -listenNetwork tcp -listenAddr -authBackend"

#Module dependencies




ServerName gitlab.borg.local
ServerSignature Off
HostnameLookups Off
ProxyPreserveHost On
Options +Multiviews +FollowSymLinks
DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public

Ensure that encoded slashes are not decoded but left in their encoded state.

AllowEncodedSlashes NoDecode

# New authorization commands for apache 2.4 and up
Require all granted

#Allow forwarding to gitlab-workhorse
ProxyPass http://gitlab.borg.local:8081
ProxyPassReverse http://gitlab.borg.local:8081

Apache equivalent of nginx try files

RewriteEngine on

#Forward all requests to gitlab-workhorse
RewriteRule .* http://gitlab.borg.local:8081%{REQUEST_URI} [P,QSA,NE]

Require ip

needed for downloading attachments

#DocumentRoot /home/git/gitlab/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 503 /deploy.html

It is assumed that the log directory is in /var/log/httpd.

For Debian distributions you might want to change this to


LogFormat “%{X-Forwarded-For}i %l %u %t “%r” %>s %b” common_forwarded
ErrorLog /var/log/httpd/gitlab.borg.local_error.log
CustomLog /var/log/httpd/gitlab.borg.local_forwarded.log common_forwarded
CustomLog /var/log/httpd/gitlab.borg.local_access.log combined env=!dontlog
CustomLog /var/log/httpd/gitlab.borg.local.log combined

[andrew.meyer@asm-web01 ~]$