Trying to install gitlab as a subdirectory

Hello!

I’m trying to install gitlab on a local CentOS 7 server alongside a few other things. I used the Omnibus and I am using Apache.

I got it working earlier but I realized that I wasn’t able to access the other things on my server. So I am attempting to install it as a subdirectory. I got the install to work, but whenever I go to mydomain.com/github it redirects to mydomain.com/users/login which of course the apache can’t find. How do I get it so that the /github stays around so that apache can find it?

Apache gitlab.conf file:

<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName domain.com:80
Alias /gitlab /opt/gitlab/embedded/service/gitlab-rails/public


<Location /gitlab>
    Require all granted
    ProxyPassReverse http://127.0.0.1:8080
    ProxyPassReverse https://domain.com/gitlab

    RewriteEngine on
    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
    RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA,NE]

    ErrorDocument 404 /404.html
    ErrorDocument 422 /422.html
    ErrorDocument 500 /500.html
    ErrorDocument 502 /502.html
    ErrorDocument 503 /503.html
</Location>
</VirtualHost>