Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am desperately trying to configure gitlabhq in multi tier set-up, I have one proxy server where I run Apache2 with mod_proxy, and then I have multiple Web Applications running on different servers. I have one where I have gitlabhq installed and when I try to connect to (which is IP and port of my unicorn server running gitlab) it works fine, but when I try to use which is a virtual host on a proxy server forwarding requests to gitlab-backend, it does not work, it gets stuck.

My configuration file on proxy server looks like this.

<VirtualHost *:80>

    RewriteEngine On

    <Proxy balancer://unicornservers>

    # Redirect all non-static requests to thin
    RewriteRule ^/(.*)$ balancer://unicornservers%{REQUEST_URI} [P,QSA,L]

    ProxyPass / balancer://unicornservers/
    ProxyPassReverse / balancer://unicornservers/
    ProxyPreserveHost Off

    <Proxy balancer://unicornservers/>
        Order deny,allow
        Allow from all

    # Custom log file locations
    ErrorLog /var/log/apache2/gitlab.kosare.perlur.cz_error.log
    CustomLog /var/log/apache2/gitlab.kosare.perlur.cz_access.log combined


Does anyone have a clue how to make this set-up work?

share|improve this question
That config looks incomplete, looks like something ate your apache pseudo xml tags. – Dennis Kaarsemaker Dec 21 '12 at 23:42
Hi, indeed, config was not HTMLized, but it is ok now. Thanks for reporting. – Marek Dec 22 '12 at 1:01

Not sure if it's the answer, but I find using both RewriteRule and ProxyPass for the same urls suspicios. Try without the rewriterule. Also, you mention that connecting to the backend works. Did you try that on the proxy machine?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.