I\'m attempting to set up gitlab so that it is accessible through a subdirectory of an existing apache server, example.com/gitlab
, for example. I am trying to use p
I did the following to get gitlab 6.2.2 available in a sub-directory with Apache and a LAMP environment:
enable the following apache modules:
sudo a2enmod proxy
sudo a2enmod proxy_balancer
sudo a2enmod proxy_http
sudo a2enmod rewrite
right from the documentation, do the following:
# 1) In your application.rb file: config.relative_url_root = "/gitlab"
# 2) In your gitlab.yml file: relative_url_root: /gitlab
# 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
in /etc/apache2/mod-available/proxy.conf:
ProxyRequests On
ProxyPreserveHost on
AddDefaultCharset off
Order deny,allow
Allow from all
AllowOverride All
in /etc/apache2/apache2.conf:
ProxyPass /gitlab/ http://127.0.0.1:8080/gitlab/
ProxyPassReverse /gitlab/ http://127.0.0.1:8080/gitlab/
ProxyPass /gitlab http://127.0.0.1:8080/gitlab
ProxyPassReverse /gitlab http://127.0.0.1:8080/gitlab
ProxyPass /assets http://127.0.0.1:8080/gitlab/assets
ProxyPassReverse /assets http://127.0.0.1:8080/gitlab/assets