summarylogtreecommitdiffstats
path: root/apache.conf.example
diff options
context:
space:
mode:
Diffstat (limited to 'apache.conf.example')
-rw-r--r--apache.conf.example17
1 files changed, 5 insertions, 12 deletions
diff --git a/apache.conf.example b/apache.conf.example
index ab4a7d49e303..4a928dbe1a0d 100644
--- a/apache.conf.example
+++ b/apache.conf.example
@@ -26,8 +26,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>
@@ -36,19 +34,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