diff --git a/CHANGES b/CHANGES index f523b43cf..cc3c9af9e 100644 --- a/CHANGES +++ b/CHANGES @@ -1904,3 +1904,6 @@ * Fix crash with misconfigured reverse proxy * Fix issue where invitation links are not working anymore +[5.1.4] +* Add support for custom .well-known documents to be served + diff --git a/setup/start.sh b/setup/start.sh index caab37d95..c0fcef06b 100755 --- a/setup/start.sh +++ b/setup/start.sh @@ -56,6 +56,7 @@ mkdir -p "${BOX_DATA_DIR}/profileicons" mkdir -p "${BOX_DATA_DIR}/certs" mkdir -p "${BOX_DATA_DIR}/acme" # acme keys mkdir -p "${BOX_DATA_DIR}/mail/dkim" +mkdir -p "${BOX_DATA_DIR}/well-known" # .well-known documents # ensure backups folder exists and is writeable mkdir -p /var/backups diff --git a/src/nginxconfig.ejs b/src/nginxconfig.ejs index c21a1ab4e..d524e37f8 100644 --- a/src/nginxconfig.ejs +++ b/src/nginxconfig.ejs @@ -139,6 +139,12 @@ server { internal; } + # user defined .well-known resources + # alias means only the part after matched location is appended (unlike root) + location /.well-known/ { + alias /home/yellowtent/boxdata/well-known/$host/; + } + location / { # increase the proxy buffer sizes to not run into buffer issues (http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffers) proxy_buffer_size 128k;