-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Update admin webserver config recommendations for well known handlers #5825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,13 +123,10 @@ webroot of your nginx installation. In this example it is | |
| location ^~ /.well-known { | ||
| # The following 6 rules are borrowed from `.htaccess` | ||
|
|
||
| rewrite ^/\.well-known/host-meta\.json /public.php?service=host-meta-json last; | ||
| rewrite ^/\.well-known/host-meta /public.php?service=host-meta last; | ||
| rewrite ^/\.well-known/webfinger /public.php?service=webfinger last; | ||
| rewrite ^/\.well-known/nodeinfo /public.php?service=nodeinfo last; | ||
|
|
||
| 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; } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @daita could that explain why you sometimes didn't see query parameters?! |
||
|
|
||
| try_files $uri $uri/ =404; | ||
| } | ||
|
|
@@ -241,14 +238,12 @@ The configuration differs from the "Nextcloud in webroot" configuration above in | |
| location /.well-known { | ||
| # The following 6 rules are borrowed from `.htaccess` | ||
|
|
||
| rewrite ^/\.well-known/host-meta\.json /nextcloud/public.php?service=host-meta-json last; | ||
| rewrite ^/\.well-known/host-meta /nextcloud/public.php?service=host-meta last; | ||
| rewrite ^/\.well-known/webfinger /nextcloud/public.php?service=webfinger last; | ||
| rewrite ^/\.well-known/nodeinfo /nextcloud/public.php?service=nodeinfo last; | ||
|
|
||
| location = /.well-known/carddav { return 301 /nextcloud/remote.php/dav/; } | ||
| location = /.well-known/caldav { return 301 /nextcloud/remote.php/dav/; } | ||
|
|
||
| # Anything else is dynamically handled by Nextcloud | ||
| location ^~ /.well-known { return 301 /nextcloud/index.php$uri; } | ||
|
|
||
| try_files $uri $uri/ =404; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to at some point then also migrate the *dav related well known endpoints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely. @rullzer and I brainstormed about using the new API and having a simple handler in the dav app. Then installations that are hosted in the document root don't ever need to fiddle with the rewrites/redirects.