summarylogtreecommitdiffstats
path: root/apache2.2.conf.example
diff options
context:
space:
mode:
Diffstat (limited to 'apache2.2.conf.example')
-rw-r--r--apache2.2.conf.example17
1 files changed, 5 insertions, 12 deletions
diff --git a/apache2.2.conf.example b/apache2.2.conf.example
index 5627168ede38..f5e56fa74181 100644
--- a/apache2.2.conf.example
+++ b/apache2.2.conf.example
@@ -25,8 +25,6 @@
#Allow forwarding to gitlab-workhorse
ProxyPassReverse http://127.0.0.1:8181
- #Allow forwarding to GitLab Rails app (Unicorn)
- ProxyPassReverse http://127.0.0.1:8080
ProxyPassReverse http://YOUR_SERVER_FQDN/
</Location>
@@ -35,19 +33,14 @@
# http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
RewriteEngine on
- #Forward these requests to gitlab-workhorse
- RewriteCond %{REQUEST_URI} ^/[\w\.-]+/[\w\.-]+/gitlab-lfs/objects.* [OR]
- RewriteCond %{REQUEST_URI} ^/[\w\.-]+/[\w\.-]+/builds/download.* [OR]
- RewriteCond %{REQUEST_URI} ^/[\w\.-]+/[\w\.-]+/repository/archive.* [OR]
- RewriteCond %{REQUEST_URI} ^/api/v3/projects/.*/repository/archive.* [OR]
- RewriteCond %{REQUEST_URI} ^/ci/api/v1/builds/[0-9]+/artifacts.* [OR]
- RewriteCond %{REQUEST_URI} ^/[\w\.-]+/[\w\.-]+/(info/refs|git-upload-pack|git-receive-pack)$
+ #Don't escape encoded characters in api requests
+ RewriteCond %{REQUEST_URI} ^/api/v3/.* [OR]
RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]
- #Forward any other requests to GitLab Rails app (Unicorn)
+ #Forward all requests to gitlab-workhorse except existing files like error documents
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
- RewriteCond %{REQUEST_URI} ^/uploads
- RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA,NE]
+ RewriteCond %{REQUEST_URI} ^/uploads/.*
+ RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA]
# needed for downloading attachments
DocumentRoot /usr/share/webapps/gitlab/public