You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Nextcloud 21 - Web Server is not properly set up to resolve "./well-known/..." #185
# Rule borrowed from `.htaccess` to handle Microsoft DAV clients
location = / {
if ( $http_user_agent ~ ^DavClnt ) {
return 302 /remote.php/webdav/$is_args$args;
}
}
# 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;
}
this is missing everywhere in the nginx config with redirects.
i dont use a reverse proxy, someone should test and confirm that this is still working with a reverse proxy.
@aptalca just closed the other post a few weeks ago, but its not resolved. this is from the latest version (
This isn't an issue, many of us run this with this without the error. If you're experiencing this, please open a new issue and provide the requested information.
of course its an issue if the mapped port is getting lost and this issue and pull request here from years ago caused it, as you can see the port was repected before.
many are not changing the port and if you use the search function just like me youll find enough issues with it.
you have all informations you need in this issue here. i dont create duplicate issues.
ill just ask gpt to fix your bugged file for me and add the scheme and port variables.
@reloxx13 was right, this is still an issue (1,2,3) and fixed by adding the missing "$scheme://$http_host" to lines 95, 96 and 103 of the default.conf (3,4,5)
Activity
github-actions commentedon Feb 23, 2021
Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!
EVOTk commentedon Feb 23, 2021
It's okay for me ! Thx
aptalca commentedon Feb 25, 2021
#188
reloxx13 commentedon May 23, 2023
this does not respect another mapped port in docker eg 8888:80
mydomain.com:8888/.well-known/carddavwill redirect tomydomain.com/remote.php/dav/to fix it, u have to use
$scheme://$http_host, $http_host will include the port.location = /.well-known/caldav { return 301 $scheme://$http_host/remote.php/dav/; }this is missing everywhere in the nginx config with redirects.
i dont use a reverse proxy, someone should test and confirm that this is still working with a reverse proxy.
@aptalca just closed the other post a few weeks ago, but its not resolved. this is from the latest version (
docker-nextcloud/root/defaults/nginx/site-confs/default.conf.sample
Line 95 in 3d3039d
aptalca commentedon May 23, 2023
What is
thisyou're referring to? It's a 3 year old issue report. Much has changed in the confs since thenreloxx13 commentedon May 23, 2023
the linked pullrequest #186 , the redirects are still the same in the site conf (i edited my top post).
i came here after longer researching while the links do not work just like in the other issue which got closed 3 week ago.
j0nnymoe commentedon May 23, 2023
This isn't an issue, many of us run this with this without the error. If you're experiencing this, please open a new issue and provide the requested information.
reloxx13 commentedon May 23, 2023
of course its an issue if the mapped port is getting lost and this issue and pull request here from years ago caused it, as you can see the port was repected before.
many are not changing the port and if you use the search function just like me youll find enough issues with it.
you have all informations you need in this issue here. i dont create duplicate issues.
ill just ask gpt to fix your bugged file for me and add the scheme and port variables.
djodars89 commentedon Sep 11, 2023
@reloxx13 was right, this is still an issue (1,2,3) and fixed by adding the missing "$scheme://$http_host" to lines 95, 96 and 103 of the default.conf (3,4,5)
BEFORE:

(1)
(2)

(3)

AFTER:

(4)
(5)

(6)

sgtcoder commentedon Jan 10, 2024
This modification fixed it for me, it was a bit of changes, but it's working now
procoprobocop commentedon Apr 25, 2024
Thank you very much! Only this could solve my problem!
unknown-error-maker commentedon Aug 25, 2025
adding
https://$http_hostfixed the problemunknown-error-maker commentedon Aug 25, 2025
The problem is this:
It redirects to HTTP instead of HTTPS