From be04ba4a332a3c118d9c268ac8dd46ec9b51887b Mon Sep 17 00:00:00 2001 From: mrplow87 Date: Wed, 27 Mar 2019 09:13:02 +0100 Subject: [PATCH] add server_port variable to well-known redirects if Nextcloud is used on a custom HTTPS port, the well-known redirects do not work, because the server port is not included in the redirect. --- admin_manual/installation/nginx.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/admin_manual/installation/nginx.rst b/admin_manual/installation/nginx.rst index 56308f32a..f27a965d6 100644 --- a/admin_manual/installation/nginx.rst +++ b/admin_manual/installation/nginx.rst @@ -42,7 +42,7 @@ webroot of your nginx installation. In this example it is listen [::]:80; server_name cloud.example.com; # enforce https - return 301 https://$server_name$request_uri; + return 301 https://$server_name:443$request_uri; } server { @@ -95,10 +95,10 @@ webroot of your nginx installation. In this example it is #rewrite ^/.well-known/webfinger /public.php?service=webfinger last; location = /.well-known/carddav { - return 301 $scheme://$host/remote.php/dav; + return 301 $scheme://$host:$server_port/remote.php/dav; } location = /.well-known/caldav { - return 301 $scheme://$host/remote.php/dav; + return 301 $scheme://$host:$server_port/remote.php/dav; } # set max upload size @@ -200,7 +200,7 @@ your nginx installation. listen [::]:80; server_name cloud.example.com; # enforce https - return 301 https://$server_name$request_uri; + return 301 https://$server_name:443$request_uri; } server { @@ -253,10 +253,10 @@ your nginx installation. #rewrite ^/.well-known/webfinger /nextcloud/public.php?service=webfinger last; location = /.well-known/carddav { - return 301 $scheme://$host/nextcloud/remote.php/dav; + return 301 $scheme://$host:$server_port/nextcloud/remote.php/dav; } location = /.well-known/caldav { - return 301 $scheme://$host/nextcloud/remote.php/dav; + return 301 $scheme://$host:$server_port/nextcloud/remote.php/dav; } location /.well-known/acme-challenge { }