summarylogtreecommitdiffstats
path: root/apache-ssl.conf.example
diff options
context:
space:
mode:
Diffstat (limited to 'apache-ssl.conf.example')
-rw-r--r--apache-ssl.conf.example18
1 files changed, 6 insertions, 12 deletions
diff --git a/apache-ssl.conf.example b/apache-ssl.conf.example
index 9163d97a19c5..2465970e858f 100644
--- a/apache-ssl.conf.example
+++ b/apache-ssl.conf.example
@@ -53,8 +53,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>
@@ -63,19 +61,15 @@
# 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]
+
RequestHeader set X_FORWARDED_PROTO 'https'
RequestHeader set X-Forwarded-Ssl on