From 713d27789bc0b5d82b607fed20e5f16ad9216898 Mon Sep 17 00:00:00 2001 From: Paul Martin <paul@paulsputer.com> Date: Sun, 27 Mar 2016 12:09:16 -0400 Subject: [PATCH] Disable edit links in read only mode #974 --- src/site/setup_proxy.mkd | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/site/setup_proxy.mkd b/src/site/setup_proxy.mkd index f1435f1..4cf263d 100644 --- a/src/site/setup_proxy.mkd +++ b/src/site/setup_proxy.mkd @@ -1,6 +1,6 @@ ## Running Gitblit behind Apache -Gitblit runs fine behind Apache. You may use either *mod_proxy* (GO or WAR) or *mod_proxy_ajp* (GO). +Gitblit runs fine behind Apache. Each Linux distribution may vary on the exact configuration of Apache 2.2. Here is a sample configuration that works on Debian 7.0 (Wheezy), your distribution may be different. @@ -13,7 +13,6 @@ ln -s ../mods-available/proxy.load proxy.load ln -s ../mods-available/proxy_balancer.load proxy_balancer.load ln -s ../mods-available/proxy_http.load proxy_http.load -ln -s ../mods-available/proxy_ajp.load proxy_ajp.load ``` ### Configuring Apache to use the proxy modules @@ -47,7 +46,7 @@ #ProxyPassreverse /gitblit http://localhost:8080/gitblit # If your httpd frontend is https but you are proxying http Gitblit WAR or GO -#Header edit Location ^http://([^⁄]+)/gitblit/ https://$1/gitblit/ +#Header edit Location ^http://([^/]+)/gitblit/ https://$1/gitblit/ # Additionally you will want to tell Gitblit the original scheme and port #RequestHeader set X-Forwarded-Proto https @@ -57,16 +56,12 @@ # context path for your repository url. # If you are not using subdomain proxying, then ignore this setting. #RequestHeader set X-Forwarded-Context / - -#ProxyPass /gitblit ajp://localhost:8009/gitblit ``` **Please** make sure to: 1. Review the security of these settings as appropriate for your deployment - 2. Uncomment the *ProxyPass* setting for whichever connection you prefer (http/ajp) + 2. Uncomment the *ProxyPass* setting 3. Correctly set the ports and context paths both in the *ProxyPass* definition and your Gitblit installation - If you are using Gitblit GO you can easily configure the AJP connector by specifying a non-zero AJP port. - Please remember that on Linux/UNIX, ports < 1024 require root permissions to open. 4. Set *web.mountParameters=false* in `gitblit.properties` or `web.xml` this will use parameterized URLs. Alternatively, you can respecify *web.forwardSlashCharacter*. -- Gitblit v1.9.1