Gollum with Apache ProxyPass

Say if you have Gollum running on and you have a reverse proxy (ex: www.abc.com) in front of it such that you want to allow the team to access it on http://www.abc.com/docs. You need to setup a ProxyPass on the reverse proxy. Say in Apache.

<VirtualHost *:80>
  ServerName www.abc.com
  ProxyPass /docs
  ProxyPassReverse /docs


It would work but the site asset path would be incorrect. So you need to specify the base path when you start Gollum.

gollum --base-path docs


If you are using Rack with Gollum, you could add the base path settings to wiki_options in the config.ru.

#!/usr/bin/env ruby
require 'rubygems'
require 'gollum/app'
gollum_path = File.expand_path(File.join(File.dirname(__FILE__), './')) # CHANGE THIS TO POINT TO YOUR OWN WIKI REPO
Precious::App.set(:gollum_path, gollum_path)
Precious::App.set(:default_markup, :markdown) # set your favorite markup language
Precious::App.set(:wiki_options, {:live_preview => false, :universal_toc => false, :user_icons => 'gravatar', :base_path => 'docs'})
module Precious
  class App < Sinatra::Base


Done =)



2 thoughts on “Gollum with Apache ProxyPass”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.