commit | author | age
|
48fe87
|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
M |
2 |
<html> |
|
3 |
<head> |
|
4 |
<!-- Begin Header -->
|
|
5 |
<title>Gitblit</title>
|
|
6 |
<meta charset="utf-8">
|
|
7 |
<meta name="ROBOTS" content="INDEX">
|
|
8 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
9 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
10 |
|
|
11 |
<link rel="stylesheet" href="./bootstrap/css/bootstrap.css"> |
|
12 |
<link rel='shortcut icon' type='image/png' href='./gitblt-favicon.png' /> |
|
13 |
<link rel="stylesheet" href="./prettify/prettify.css" /> |
|
14 |
<!-- Google Plus Profile Page -->
|
|
15 |
<link rel="publisher" href="https://plus.google.com/114464678392593421684" />
|
|
16 |
<style type="text/css"> a.gpluspage { margin-top:3px;text-decoration: none; } </style> |
|
17 |
|
|
18 |
<!-- Google Plus One -->
|
|
19 |
<link rel="canonical" href="http://gitblit.com" />
|
|
20 |
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
|
|
21 |
<style type="text/css"> div.gplusone { margin-top:12px; } </style> |
|
22 |
|
|
23 |
<script src="./prettify/prettify.js"></script> |
|
24 |
<script src="./bootstrap/js/jquery.js"></script> |
|
25 |
<script src="./bootstrap/js/bootstrap.min.js"></script> |
|
26 |
</head> |
|
27 |
<body onload='prettyPrint()'> <!-- Navigation Bar -->
|
|
28 |
<div class="navbar navbar-fixed-top">
|
|
29 |
<div class="navbar-inner">
|
|
30 |
<div class="container">
|
|
31 |
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
|
32 |
<span class="icon-bar"></span>
|
|
33 |
<span class="icon-bar"></span>
|
|
34 |
<span class="icon-bar"></span>
|
|
35 |
</a>
|
|
36 |
<a class="brand" href="./"><img src="./gitblt_25_white.png" alt="Gitblit"></img></a>
|
|
37 |
<div class="nav-collapse">
|
|
38 |
<ul class="nav">
|
|
39 |
<li class='dropdown'> <!-- Menu --> |
|
40 |
<a class='dropdown-toggle' href='#' data-toggle='dropdown'>about<b class='caret'></b></a> |
|
41 |
<ul class='dropdown-menu'> |
|
42 |
<li><a href='index.html'>overview</a></li> |
|
43 |
<li><a href='features.html'>features</a></li> |
|
44 |
<li><a href='screenshots.html'>screenshots</a></li> |
|
45 |
</ul></li> <!-- End Menu --> |
|
46 |
<li class='dropdown'> <!-- Menu --> |
|
47 |
<a class='dropdown-toggle' href='#' data-toggle='dropdown'>documentation<b class='caret'></b></a> |
|
48 |
<ul class='dropdown-menu'> |
|
49 |
<li class='dropdown-submenu'> <!-- Submenu --> |
|
50 |
<a tabindex='-1' href='#'>Gitblit GO</a> |
|
51 |
<ul class='dropdown-menu'> |
|
52 |
<li><a href='setup_go.html'>setup GO</a></li> |
|
53 |
<li><a href='upgrade_go.html'>upgrade GO</a></li> |
|
54 |
</ul></li> <!-- End Submenu --> |
|
55 |
<li class='divider'></li> |
|
56 |
<li class='dropdown-submenu'> <!-- Submenu --> |
|
57 |
<a tabindex='-1' href='#'>Gitblit WAR</a> |
|
58 |
<ul class='dropdown-menu'> |
|
59 |
<li><a href='setup_war.html'>setup WAR</a></li> |
|
60 |
<li><a href='upgrade_war.html'>upgrade WAR</a></li> |
|
61 |
</ul></li> <!-- End Submenu --> |
|
62 |
<li class='divider'></li> |
|
63 |
<li class='dropdown-submenu'> <!-- Submenu --> |
|
64 |
<a tabindex='-1' href='#'>Server Configuration</a> |
|
65 |
<ul class='dropdown-menu'> |
|
66 |
<li><a href='administration.html'>administration</a></li> |
|
67 |
<li><a href='setup_authentication.html'>authentication</a></li> |
|
68 |
<li><a href='setup_hooks.html'>push hooks</a></li> |
|
69 |
<li><a href='setup_lucene.html'>lucene indexing</a></li> |
|
70 |
<li><a href='setup_proxy.html'>reverse proxies</a></li> |
|
71 |
<li><a href='setup_clientmenus.html'>client app menus</a></li> |
|
72 |
<li><a href='setup_bugtraq.html'>bugtraq</a></li> |
|
73 |
<li><a href='setup_mirrors.html'>mirrors</a></li> |
|
74 |
<li><a href='setup_scaling.html'>scaling</a></li> |
5287d2
|
75 |
<li><a href='setup_fail2ban.html'>fail2ban</a></li> |
48fe87
|
76 |
<li class='divider'></li> |
M |
77 |
<li><a href='setup_viewer.html'>Gitblit as a viewer</a></li> |
|
78 |
</ul></li> <!-- End Submenu --> |
|
79 |
<li class='divider'></li> |
|
80 |
<li class='dropdown-submenu'> <!-- Submenu --> |
|
81 |
<a tabindex='-1' href='#'>Client Usage</a> |
|
82 |
<ul class='dropdown-menu'> |
|
83 |
<li><a href='setup_transport_http.html'>using HTTP/HTTPS</a></li> |
|
84 |
<li><a href='setup_transport_ssh.html'>using SSH</a></li> |
|
85 |
<li><a href='eclipse_plugin.html'>using the Eclipse plugin</a></li> |
|
86 |
</ul></li> <!-- End Submenu --> |
|
87 |
<li class='divider'></li> |
|
88 |
<li class='dropdown-submenu'> <!-- Submenu --> |
|
89 |
<a tabindex='-1' href='#'>Tickets</a> |
|
90 |
<ul class='dropdown-menu'> |
|
91 |
<li><a href='tickets_overview.html'>overview</a></li> |
|
92 |
<li><a href='tickets_using.html'>using</a></li> |
|
93 |
<li><a href='tickets_barnum.html'>barnum</a></li> |
|
94 |
<li><a href='tickets_setup.html'>setup</a></li> |
|
95 |
<li><a href='tickets_replication.html'>replication & advanced administration</a></li> |
|
96 |
</ul></li> <!-- End Submenu --> |
|
97 |
<li class='divider'></li> |
|
98 |
<li class='dropdown-submenu'> <!-- Submenu --> |
|
99 |
<a tabindex='-1' href='#'>Plugins</a> |
|
100 |
<ul class='dropdown-menu'> |
|
101 |
<li><a href='plugins_overview.html'>overview</a></li> |
|
102 |
<li><a href='plugins_extensions.html'>extension points</a></li> |
|
103 |
</ul></li> <!-- End Submenu --> |
|
104 |
<li class='divider'></li> |
|
105 |
<li><a href='federation.html'>federation</a></li> |
|
106 |
<li class='divider'></li> |
|
107 |
<li><a href='properties.html'>settings</a></li> |
|
108 |
<li><a href='faq.html'>faq</a></li> |
|
109 |
<li class='divider'></li> |
|
110 |
<li><a href='design.html'>design</a></li> |
|
111 |
<li><a href='rpc.html'>rpc</a></li> |
|
112 |
</ul></li> <!-- End Menu --> |
|
113 |
<li class='dropdown'> <!-- Menu --> |
|
114 |
<a class='dropdown-toggle' href='#' data-toggle='dropdown'>releases<b class='caret'></b></a> |
|
115 |
<ul class='dropdown-menu'> |
|
116 |
<li><a href='releasenotes.html'>release notes</a></li> |
|
117 |
<li><a href='releases.html'>release history</a></li> |
|
118 |
</ul></li> <!-- End Menu --> |
|
119 |
<li class='dropdown'> <!-- Menu --> |
|
120 |
<a class='dropdown-toggle' href='#' data-toggle='dropdown'>downloads<b class='caret'></b></a> |
|
121 |
<ul class='dropdown-menu'> |
5287d2
|
122 |
<li><a href='http://dl.bintray.com/gitblit/releases/gitblit-1.7.0.zip'>Gitblit GO (Windows)</a></li> |
M |
123 |
<li><a href='http://dl.bintray.com/gitblit/releases/gitblit-1.7.0.tar.gz'>Gitblit GO (Linux/OSX)</a></li> |
|
124 |
<li><a href='http://dl.bintray.com/gitblit/releases/gitblit-1.7.0.war'>Gitblit WAR</a></li> |
48fe87
|
125 |
<li class='divider'></li> |
M |
126 |
<li><a href='https://registry.hub.docker.com/u/jmoger/gitblit/'>Gitblit GO (Docker)</a></li> |
|
127 |
<li class='divider'></li> |
|
128 |
<li><a href='http://plugins.gitblit.com'>Plugins Registry</a></li> |
|
129 |
<li class='divider'></li> |
5287d2
|
130 |
<li><a href='http://dl.bintray.com/gitblit/releases/manager-1.7.0.zip'>Gitblit Manager</a></li> |
M |
131 |
<li><a href='http://dl.bintray.com/gitblit/releases/fedclient-1.7.0.zip'>Federation Client</a></li> |
48fe87
|
132 |
<li class='divider'></li> |
5287d2
|
133 |
<li><a href='http://dl.bintray.com/gitblit/releases/gbapi-1.7.0.zip'>API Library</a></li> |
48fe87
|
134 |
<li class='divider'></li> |
M |
135 |
<li><a href='https://bintray.com/gitblit/releases/gitblit'>Bintray (1.4.0+)</a></li> |
|
136 |
<li><a href='https://code.google.com/p/gitblit/downloads/list?can=1'>GoogleCode (pre-1.4.0)</a></li> |
|
137 |
<li class='divider'></li> |
|
138 |
<li><a href='http://gitblit.github.io/gitblit-maven'>Maven Repository</a></li> |
|
139 |
</ul></li> <!-- End Menu --> |
|
140 |
<li class='dropdown'> <!-- Menu --> |
|
141 |
<a class='dropdown-toggle' href='#' data-toggle='dropdown'>links<b class='caret'></b></a> |
|
142 |
<ul class='dropdown-menu'> |
|
143 |
<li><a href='https://dev.gitblit.com'>dev.gitblit.com (self-hosted)</a></li> |
|
144 |
<li class='divider'></li> |
|
145 |
<li><a href='http://plugins.gitblit.com'>Plugins Registry</a></li> |
|
146 |
<li class='divider'></li> |
|
147 |
<li><a href='https://github.com/gitblit/gitblit'>Github</a></li> |
5287d2
|
148 |
<li><a href='https://github.com/gitblit/gitblit'>Issues</a></li> |
48fe87
|
149 |
<li><a href='http://groups.google.com/group/gitblit'>Discussion</a></li> |
M |
150 |
<li><a href='https://twitter.com/gitblit'>Twitter</a></li> |
|
151 |
<li><a href='http://www.ohloh.net/p/gitblit'>Ohloh</a></li> |
584328
|
152 |
<li class='divider'></li> |
M |
153 |
<li><a href='https://vimeo.com/86164723'>Gitblit Tickets screencast</a></li> |
|
154 |
<li><a href='https://asciinema.org/a/9342'>Gitblit SSH and Plugin Management asciicast</a></li> |
|
155 |
<li><a href='http://episodes.gitminutes.com/2014/05/gitminutes-29-james-moger-on-gitblit.html'>GitMinutes #29: James Moger on Gitblit</a></li> |
48fe87
|
156 |
<li class='divider'></li> |
M |
157 |
<li><a href='https://twitter.com/JamesMoger'>@JamesMoger</a></li> |
|
158 |
</ul></li> <!-- End Menu --> |
|
159 |
<li class='divider-vertical'></li> |
|
160 |
<li><a href='https://plus.google.com/114464678392593421684?prsrc=3' class='gpluspage'><img src='https://ssl.gstatic.com/images/icons/gplus-16.png' width='16' height='16 style='order: 0;'/></a></li><li><div class='gplusone'><g:plusone size='small' href='http://gitblit.com'></g:plusone></div></li>
|
|
161 |
</ul>
|
|
162 |
</div><!--/.nav-collapse -->
|
|
163 |
</div>
|
|
164 |
</div>
|
|
165 |
</div><!-- end Navigation Bar --> |
|
166 |
<div class='container'> |
|
167 |
<!-- Begin Markdown --> |
|
168 |
<h2 class="section" id='H1'><a href="#H1" class="sectionlink"><i class="icon-share-alt"> </i></a>Running Gitblit behind Apache</h2><p>Gitblit runs fine behind Apache.</p><p>Each Linux distribution may vary on the exact configuration of Apache 2.2.<br/>Here is a sample configuration that works on Debian 7.0 (Wheezy), your distribution may be different.</p> |
|
169 |
<h3 class="section" id='H2'><a href="#H2" class="sectionlink"><i class="icon-share-alt"> </i></a>Make sure we have Apache's proxy modules</h3><p><pre>sudo su |
|
170 |
cd /etc/apache2/mods-enabled |
|
171 |
ln -s ../mods-available/proxy.load proxy.load |
|
172 |
ln -s ../mods-available/proxy_balancer.load proxy_balancer.load |
|
173 |
ln -s ../mods-available/proxy_http.load proxy_http.load |
|
174 |
</pre><br/><h3 class="section" id='H3'><a href="#H3" class="sectionlink"><i class="icon-share-alt"> </i></a>Configuring Apache to use the proxy modules</h3></p><p>Now we must configure Apache to use the proxy modules and the proxied connection from Apache to Gitblit GO or from Apache to your chosen servlet container. The following snippet is stored as <code>/etc/apache2/conf.d/gitblit</code>. </p><p><pre># Turn off support for true Proxy behaviour as we are acting as |
|
175 |
# a transparent proxy |
|
176 |
ProxyRequests Off |
|
177 |
|
|
178 |
# Turn off VIA header as we know where the requests are proxied |
|
179 |
ProxyVia Off |
|
180 |
|
|
181 |
# Turn on Host header preservation so that the servlet container |
|
182 |
# can write links with the correct host and rewriting can be avoided. |
|
183 |
# |
|
184 |
# This is important for all git push/pull/clone operations. |
|
185 |
ProxyPreserveHost On |
|
186 |
|
|
187 |
# Set the permissions for the proxy |
|
188 |
<Proxy> |
|
189 |
AddDefaultCharset off |
|
190 |
Order deny,allow |
|
191 |
Allow from all |
|
192 |
</Proxy> |
|
193 |
|
|
194 |
# The proxy context path must match the Gitblit context path. |
|
195 |
# For Gitblit GO, see server.contextPath in gitblit.properties. |
|
196 |
|
|
197 |
#ProxyPass /gitblit http://localhost:8080/gitblit |
|
198 |
#ProxyPassreverse /gitblit http://localhost:8080/gitblit |
|
199 |
|
|
200 |
# If your httpd frontend is https but you are proxying http Gitblit WAR or GO |
|
201 |
#Header edit Location &#94;http://([&#94;&#8260;]+)/gitblit/ https://&#36;1/gitblit/ |
|
202 |
|
|
203 |
# Additionally you will want to tell Gitblit the original scheme and port |
|
204 |
#RequestHeader set X-Forwarded-Proto https |
|
205 |
#RequestHeader set X-Forwarded-Port 443 |
|
206 |
|
|
207 |
# If you are using subdomain proxying then you will want to tell Gitblit the appropriate |
|
208 |
# context path for your repository url. |
|
209 |
# If you are not using subdomain proxying, then ignore this setting. |
|
210 |
#RequestHeader set X-Forwarded-Context / |
|
211 |
</pre></p><p><strong>Please</strong> make sure to:<br/> 1. Review the security of these settings as appropriate for your deployment<br/> 2. Uncomment the <em>ProxyPass</em> setting<br/> 3. Correctly set the ports and context paths both in the <em>ProxyPass</em> definition and your Gitblit installation<br/> 4. Set <em>web.mountParameters=false</em> in <code>gitblit.properties</code> or <code>web.xml</code> this will use parameterized URLs.<br/> Alternatively, you can respecify <em>web.forwardSlashCharacter</em>.</p> |
|
212 |
<h3 class="section" id='H4'><a href="#H4" class="sectionlink"><i class="icon-share-alt"> </i></a>Controlling Advertised Repository URLs</h3><p>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.</p><p>You can control the url that Gitblit generates by setting X-Forwarded headers in your proxy server.</p><p><em>X-Forwarded-Proto</em>://servername(:*X-Forwarded-Port*)(/*X-Forwarded-Context*)</p><p><table class="table table-bordered"><tr><th>Header</th><th>Description</th></tr><tr><td>X-Forwarded-Port</td><td>The port to use in generated repository http/https urls</td></tr><tr><td>X-Forwarded-Proto</td><td>The protocol/scheme to use in generated repository http/https urls</td></tr><tr><td>X-Forwarded-Context</td><td>The context to use in generated repository http/https urls</td></tr></table> |
|
213 |
<!-- End Markdown --> |
5287d2
|
214 |
<div ><ul class="pager"><li class="previous"><a href="setup_lucene.html">← lucene indexing</a></li> <li class="next"><a href="setup_clientmenus.html">client app menus →</a></li></ul></div><footer class="footer"><p class="pull-right">generated 2015-11-22</p>
|
48fe87
|
215 |
<p>The content of this page is licensed under the <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution 3.0 License</a>.</p> |
M |
216 |
</footer> |
|
217 |
</div> |
|
218 |
<!-- Google Analytics -->
|
|
219 |
<script type="text/javascript">
|
|
220 |
var _gaq = _gaq || [];
|
|
221 |
_gaq.push(['_setAccount', 'UA-24377072-1']);
|
|
222 |
_gaq.push(['_trackPageview']);
|
|
223 |
|
|
224 |
(function() {
|
|
225 |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
226 |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
227 |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
228 |
})();
|
|
229 |
</script> |
|
230 |
|
|
231 |
</body> |
|
232 |
</html> |