0

I have a website managed with ISPConfig 3 on a VPS running Debian 8 and Apache. The website is accessible via domain.ee but I want to get my GitLab running (on the same time) on git.domain.ee

But when I installed GitLab and runned it, he overwrited ISPConfig and started to run on git.domain.ee AND domain.ee (and all the others adresses pointing to my VPS)

Here is my gitlab.rb config:

external_url 'http://git.domain.ee'
unicorn['port'] = 8080
web_server['external_users'] = ['www-data']

And here is my gitlab.conf runned by apache:

<VirtualHost *:80>
    ServerName git.domain.ee
    ServerSignature Off
    ProxyPreserveHost On

    <Location />
        Order deny,allow
        Allow from all

        ProxyPassReverse http://127.0.0.1:8080
        ProxyPassReverse http://git.domain.ee/
    </Location>

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

    DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public

</VirtualHost>

Obviously domain.ee is replaced with my real domain name.

Scott Weldon
  • 9,673
  • 6
  • 48
  • 67
AymericM
  • 101
  • 4

1 Answers1

0

let git run on localhost:8080 and configure apache as reverse proxy like so:

<VirtualHost *:80>
  ProxyPreserveHost On
  ProxyRequests Off
  ProxyVia Off

  <Proxy *>
     Require all granted
  </Proxy>

  ProxyPass / http://127.0.0.1:8080
  ProxyPassReverse / http://127.0.0.1:8080
</VirtualHost>

you can add the other rules as you need them

Zian
  • 559
  • 4
  • 16