Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

For your Ruby, you'll must install this gems:

sudo gem install passenger

sudo passenger-install-apache2-module

At this moment, you'll asked to install some Apache2's deps (three deps):

sudo apt-get install apache2-prefork-dev

sudo apt-get install libapr1-dev

sudo apt-get install libaprutil1-dev

Enable these apache modules.

sudo a2enmod proxy

sudo a2enmod proxy_balancer

sudo a2enmod proxy_http

sudo a2enmod rewrite

Obs

At my install, I was needed install at port 8081 to don't conflict with my Apache Tomcat at port 8080, to change default Gitlab port I'm just edit /home/git/gitlab/config/gitlab.yml the port parameter.

The gist bellow gitlab.conf has been located at:

/etc/apache2/sites-available/gitlab.conf

And you can active this conf file with:

sudo a2ensite gitlab

You don't need create any symbolic link for public Apache2 folder.

LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19
PassengerRuby /usr/local/bin/ruby
<VirtualHost *:80>
ServerName localhost
# Point this to your public folder of teambox
DocumentRoot /home/git/gitlab/public
ProxyPass /gitlab/ http://localhost:8081/
ProxyPassReverse /gitlab/ http://localhost:8081/
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# Custom log file locations
ErrorLog /var/log/apache2/gitlab_error.log
CustomLog /var/log/apache2/gitlab_access.log combined
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.