Setting up GitLab on a multihosted server using apache

I am trying to setup GitLab to use Apache on CentOS 7.1 instead of nginx. This is a test server at home and I have a few other things running on this including other tomcat based services. I don’t see any conflicts so far…

Here is my Apache config so far.

<VirtualHost gitlab.borg.local>
        ServerName gitlab.borg.local
        Options +Multiviews +FollowSymLinks
        DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public
        AllowEncodedSlashes Off
        ServerSignature Off
        ProxyRequests Off
        ProxyPreserveHost On
#       ProxyPass gitlab.borg.local http://localhost:8081/
#       ProxyPassReverse gitlab.borg.local http://localhost:8081/
        ErrorLog /var/log/httpd/error_log
        <Location />
                Order deny,allow
                Allow from all
                ProxyPassReverse http://localhost:8081
                ProxyPassReverse http://gitlab.borg.local
        </Location>
        RewriteEngine on
#       RewriteCond %{SERVER_PORT} 80
        RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
        RewriteRule .* http://127.0.0.1:8081%{REQUEST_URI} [P,QSA]

        <Proxy gitlab.borg.local>
                Order deny,allow
                Allow from all
                Require ip 127.0.0.1 10.0.0.0/8 192.168.0.0/16 172.16.0.0/12
        </Proxy>
</VirtualHost> 

I’m not sure why I can’t access this. But I get a 503 each time. Any help would be great.

There are working apache configs in https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/web-server/apache. You can adapt them to your need.