I’m using GitLab Omnibus on a CentOS6.5 server.

The gitlab Nginx server listen on the 6543 port (Apache already using 80 and 443).

I want to use Apache as a reverse proxy to access GitLab with that address: gitlab.example.com instead of example.com:6543

So I add an Apache Virtual Host, here is the configuration:

<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerAdmin admin@example.com
        ServerName gitlab.example.com
        ServerSignature Off
        CustomLog /var/log/httpd/gitlab_access.log combined
        ErrorLog /var/log/httpd/gitlab_error.log
        ErrorLog syslog:local2

        <IfModule mod_proxy.c>
            ProxyVia On
            ProxyRequests Off
            ProxyPass / https://example.com:6543/
            ProxyPassReverse / https://example.com:6543/
            ProxyPreserveHost Off
            <Proxy *>
                Options FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all

        # SSL Config
        SSLCertificateFile /etc/ssl/example.com/default.crt
        SSLCertificateKeyFile /etc/ssl/example.com/default.key

        SSLEngine on
        SSLProtocol all -SSLv2
        SSLHonorCipherOrder on
        SSLCipherSuite ALL:!aNULL:!eNULL:!LOW:!EXP:!RC4:!3DES:+HIGH:+MEDIUM
        Header set Strict-Transport-Security "max-age=2678400"

<VirtualHost *:80>
        ServerName gitlab.example.com
        Redirect / https://gitlab.example.com:443

So GitLab and Apache are running, but when trying to access gitlab via the proxy server, it fails and output a 500 error.

How can I make this work?

  • Have you looked in /var/log/httpd/gitlab_error.log or your other apache error logs? – heavyd Aug 4 '14 at 17:56
  • No error in gitlab_error.log, will check other error log now. – AMDG Aug 4 '14 at 19:06
  • Nothing more in others error logs... – AMDG Aug 4 '14 at 19:16
  • Maybe the proxy is working... how about your nginx error logs? – heavyd Aug 4 '14 at 19:17
  • Nothing in nginx logs. I try to proxy the unicorn server, it works, but I can't connect, and gitlab is painfully slow... – AMDG Aug 4 '14 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.