diff --git a/conf/nginx-primaryonly.conf b/conf/nginx-primaryonly.conf index b87e45f0..de365896 100644 --- a/conf/nginx-primaryonly.conf +++ b/conf/nginx-primaryonly.conf @@ -8,9 +8,9 @@ } # ownCloud configuration. - rewrite ^/cloud$ /cloud/ redirect; + rewrite ^/cloud$ $scheme://$http_host/cloud/ redirect; rewrite ^/cloud/$ /cloud/index.php; - rewrite ^/cloud/(contacts|calendar|files)$ /cloud/index.php/apps/$1/ redirect; + rewrite ^/cloud/(contacts|calendar|files)$ $scheme://$http_host/cloud/index.php/apps/$1/ redirect; rewrite ^(/cloud/core/doc/[^\/]+/)$ $1/index.html; location /cloud/ { alias /usr/local/lib/owncloud/; @@ -50,6 +50,6 @@ } rewrite ^/.well-known/host-meta /cloud/public.php?service=host-meta last; rewrite ^/.well-known/host-meta.json /cloud/public.php?service=host-meta-json last; - rewrite ^/.well-known/carddav /cloud/remote.php/carddav/ redirect; - rewrite ^/.well-known/caldav /cloud/remote.php/caldav/ redirect; + rewrite ^/.well-known/carddav $scheme://$http_host/cloud/remote.php/carddav/ redirect; + rewrite ^/.well-known/caldav $scheme://$http_host/cloud/remote.php/caldav/ redirect; diff --git a/conf/nginx.conf b/conf/nginx.conf index bf204a6a..1b0cb0d2 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -62,7 +62,7 @@ server { } # Roundcube Webmail configuration. - rewrite ^/mail$ /mail/ redirect; + rewrite ^/mail$ $scheme://$http_host/mail/ redirect; rewrite ^/mail/$ /mail/index.php; location /mail/ { index index.php;