From 47978436c22fdc6dd8a38068e925c9d279e6c3da Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Wed, 1 Jun 2016 18:49:50 +0200 Subject: [PATCH] Set Destination header for webdav in nginx proxy --- setup/start/nginx/appconfig.ejs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup/start/nginx/appconfig.ejs b/setup/start/nginx/appconfig.ejs index 2febaed78..11c02003d 100644 --- a/setup/start/nginx/appconfig.ejs +++ b/setup/start/nginx/appconfig.ejs @@ -38,6 +38,13 @@ server { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; + # http://serverfault.com/questions/121766/webdav-rename-fails-on-an-apache-mod-dav-install-behind-nginx + set $destination $http_destination; + if ($destination ~* ^https(.+)$) { + set $destination http$1; + } + proxy_set_header Destination $destination; + # only serve up the status page if we get proxy gateway errors error_page 502 503 504 @appstatus; location @appstatus {