From d0b6af8f1e08741c0b9e85255eb57e98526e1973 Mon Sep 17 00:00:00 2001
From: Jose Torres <torres@balameb.com>
Date: Wed, 8 Mar 2017 16:47:01 +0000
Subject: [PATCH] Substitute rewrite with proxypass.

---
 web-server/apache/gitlab-omnibus-ssl-apache24.conf | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/web-server/apache/gitlab-omnibus-ssl-apache24.conf b/web-server/apache/gitlab-omnibus-ssl-apache24.conf
index 416ea20..ed68eba 100644
--- a/web-server/apache/gitlab-omnibus-ssl-apache24.conf
+++ b/web-server/apache/gitlab-omnibus-ssl-apache24.conf
@@ -19,9 +19,7 @@
   ServerName YOUR_SERVER_FQDN
   ServerSignature Off
 
-  RewriteEngine on
-  RewriteCond %{HTTPS} !=on
-  RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [NE,R,L]
+  Redirect permanent "/" https://%{SERVER_NAME}
 </VirtualHost>
 
 <VirtualHost *:443>
@@ -39,8 +37,14 @@
 
   ServerName YOUR_SERVER_FQDN
   ServerSignature Off
-
+  
+  ProxyRequests Off
+  SSLProxyEngine On
   ProxyPreserveHost On
+  AllowEncodedSlashes NoDecode
+
+  ProxyPass / http://127.0.0.1:8181/ keepalive=On connectiontimeout=10 retry=0
+  ProxyPassReverse / http://127.0.0.1:8181/
 
   # Ensure that encoded slashes are not decoded but left in their encoded state.
   # http://doc.gitlab.com/ce/api/projects.html#get-single-project
-- 
GitLab