From 27554517fa827cd990a796dbe07db9691a90e2ab Mon Sep 17 00:00:00 2001 From: Simon C Date: Sun, 28 Nov 2021 16:16:23 +0100 Subject: [PATCH] feat(Nextcloud): Upgrade nginx configuration --- nextcloud/web/nginx.conf | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/nextcloud/web/nginx.conf b/nextcloud/web/nginx.conf index b076ed2..9654562 100644 --- a/nextcloud/web/nginx.conf +++ b/nextcloud/web/nginx.conf @@ -24,6 +24,11 @@ http { keepalive_timeout 65; + set_real_ip_from 10.0.0.0/8; + set_real_ip_from 172.16.0.0/12; + set_real_ip_from 192.168.0.0/16; + real_ip_header X-Real-IP; + #gzip on; upstream php-handler { @@ -73,19 +78,13 @@ http { #rewrite ^/.well-known/webfinger /public.php?service=webfinger last; location = /.well-known/carddav { - return 301 $scheme://$host:$server_port/remote.php/dav; + return 301 $scheme://$host/remote.php/dav; } location = /.well-known/caldav { - return 301 $scheme://$host:$server_port/remote.php/dav; + return 301 $scheme://$host/remote.php/dav; } - # location /nginx_status { - # stub_status; - # allow 192.168.1.0/24; #only allow requests from local network - # deny all; #deny all other hosts - # } - # set max upload size client_max_body_size 10G; fastcgi_buffers 64 4K;