reverse-proxy-confs/nextcloud.subfolder.conf.sample
Wdavery fca823b1ff
Fixes for NC21 - changes /.well-known block
Before this change the config results in a warning `Your web server is not properly set up to resolve "/.well-known/webfinger".`
Source of proposed fix: linuxserver/docker-nextcloud#189
https://github.com/linuxserver/docker-nextcloud/issues/189#issuecomment-846376583
2021-07-14 15:00:22 -04:00

39 lines
1.5 KiB
Text

## Version 2021/07/14
# Assuming this container is called "swag", edit your nextcloud container's config
# located at /config/www/nextcloud/config/config.php and add the following lines before the ");":
# 'trusted_proxies' => ['swag'],
# 'overwritewebroot' => '/nextcloud',
# 'overwrite.cli.url' => 'https://your-domain.com/nextcloud',
#
# Also don't forget to add your domain name to the trusted domains array. It should look somewhat like this:
# array (
# 0 => '192.168.0.1:444', # This line may look different on your setup, don't modify it.
# 1 => 'your-domain.com',
# ),
location ^~ /.well-known {
# The rules in this block are an adaptation of the rules
# in the Nextcloud `.htaccess` that concern `/.well-known`.
location = /.well-known/carddav { return 301 /nextcloud/remote.php/dav/; }
location = /.well-known/caldav { return 301 /nextcloud/remote.php/dav/; }
# Let Nextcloud's API for `/.well-known` URIs handle all other
# requests by passing them to the front-end controller.
return 301 /nextcloud/index.php$request_uri;
}
location ^~ /nextcloud/ {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app nextcloud;
set $upstream_port 443;
set $upstream_proto https;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
rewrite /nextcloud(.*) $1 break;
proxy_max_temp_file_size 2048m;
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
proxy_ssl_session_reuse off;
}