Configure gitlab with apache on Ubuntu 10.04

As mentioned in my previous post, I’ve managed to install gitlab with nginx using the tutorial. The only problem is that I already use apache for something else, so I’ve had to shutdown apache to use gitlab. Not nice.


To use apache and gitlab I’m following this article outlining a Fedora install. Unfortunately, I’ve hit a snag:

Passenger 500 error

The reason is that default ruby install on Ubuntu is a 1.8.7 (used to build passenger) and gitlab was built against a 1.9.1 version.

After digging a bit, I’ve decided that the way to go is to use rvm, so I can rebuild passenger (easiest way). First, remove the installation done by the gitlab automatic script or, better yet, just don’t use the automatic script at all. Just in case you get all kind of errors, remember to get out of gitlab’s directory (see here).

Another error I’ve got is:

Error message:
constant URI::WFKV_ not defined

which, apparently is a known error of ruby 1.9.1 and rake 1.3.5. To fix that, I’ve installed ruby 1.9.3 via rvm install 1.9.3 --with-openssl.

Unicorn daemon

To make sure I can run unicorn to consume from queue, I had to alter a bit the init.d script provided by the tutorial to use su instead of sudo:


My apache site config is: