Say if you have Gollum running on http://192.168.0.1:4567 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 http://192.168.0.1:4567/docs ProxyPassReverse /docs http://192.168.0.1:4567/docs </VirtualHost>
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 =)
References:
Hi,
See https://github.com/gollum/gollum/issues/984
What you specify for Rack won’t work, it’s misleading.
Cheers,
Antonio Huete
LikeLike
It did work on my setup. Thanks for your comment. =)
LikeLike