Enable high-performance in nextcloud, fix .well-known

This commit is contained in:
asonix 2021-02-28 16:57:09 -06:00
parent 4318b8a6bb
commit 003601ac97
3 changed files with 28 additions and 6 deletions

View file

@ -1,3 +1,6 @@
FROM linuxserver/nextcloud:BASE_TAG
ADD https://github.com/nextcloud/notify_push/releases/download/v0.1.5/notify_push-aarch64 /usr/local/bin/notify_push
RUN chmod +x /usr/local/bin/notify_push
COPY root/ /

View file

@ -20,12 +20,19 @@ server {
log_not_found off;
access_log off;
}
rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
location = /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
# Make a regex exception for `/.well-known` so that clients can still
# access it despite the existence of the regex rule
# `location ~ /(\.|autotest|...)` which would otherwise handle requests
# for `/.well-known`.
location ^~ /.well-known {
# The following 6 rules are borrowed from `.htaccess`
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
# Anything else is dynamically handled by Nextcloud
location ^~ /.well-known { return 301 /index.php$uri; }
try_files $uri $uri/ =404;
}
client_max_body_size 10G;
fastcgi_buffers 64 4K;
@ -38,6 +45,14 @@ server {
location / {
rewrite ^ /index.php;
}
location /push/ {
proxy_pass http://127.0.0.1:7867/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
deny all;
}

View file

@ -0,0 +1,4 @@
#!/usr/bin/with-contenv bash
export NEXTCLOUD_URL=http://localhost:80
exec /usr/local/bin/notify_push /config/www/nextcloud/config/config.php