Nginx Your network server is not properly configured to parse the '. wellknown' URL, failed at: '/. well-known/webfinger'

Unable to resolve issue: Your network server is not properly configured to parse the ‘. wellknown’ URL, failed at: ‘/. well-known/webfinger’. I am using nginx and have followed the instructions NGINX configuration — Nextcloud latest Administration Manual latest documentation Fill in configuration
location ^~ /.well-known {

The rules in this block are an adaptation of the rules

in .htaccess that concern /.well-known.

location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }

location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
location /.well-known/pki-validation { try_files $uri $uri/ =404; }

Let Nextcloud’s API for /.well-known URIs handle all other

requests by passing them to the front-end controller.

return 301 /index.php$request_uri;
}
I don’t understand where I need to make changes

Have you tried to use the search function in advance? I get several matches displayed if I search for “nginx well-known/webfinger”:

https://help.nextcloud.com/search?q=nginx%20.well-known%2Fwebfinger

I have tried to search and did not find anything related to nginx. Most of them are related to Apache