From a0c34e37fe8e456a21c7a57e9d45e637ab40cce8 Mon Sep 17 00:00:00 2001
From: Florian Zschocke <florian.zschocke@cycos.com>
Date: Mon, 12 Aug 2013 16:32:12 -0400
Subject: [PATCH] Add an Apache htpasswd user service

---
 src/site/setup_proxy.mkd |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/src/site/setup_proxy.mkd b/src/site/setup_proxy.mkd
index 6e600f6..b169cef 100644
--- a/src/site/setup_proxy.mkd
+++ b/src/site/setup_proxy.mkd
@@ -65,3 +65,27 @@
     4. Set *web.mountParameters=false* in `gitblit.properties` or `web.xml` this will use parameterized URLs.  
     Alternatively, you can respecify *web.forwardSlashCharacter*.
 
+### Controlling Advertised Repository URLs
+
+In some reverse-proxy configurations you may be running Gitblit using an http interface with an https reverse-proxy proxy.  This will lead to Gitblit generating incorrect repository urls.
+
+You can control the url that Gitblit generates by setting X-Forwarded headers in your proxy server.
+
+*X-Forwarded-Proto*://servername(:*X-Forwarded-Port*)(/*X-Forwarded-Context*)
+
+---X:MEDIAWIKI---
+{| class="table table-bordered"
+! Header
+! Description
+|-
+| X-Forwarded-Port
+| The port to use in generated repository http/https urls
+|-
+| X-Forwarded-Proto
+| The protocol/scheme to use in generated repository http/https urls
+|-
+| X-Forwarded-Context
+| The context to use in generated repository http/https urls
+|}
+---X:MEDIAWIKI---
+

--
Gitblit v1.9.1