Skip to content

Conversation

@Northcode
Copy link

Noticed these redirects were missing from the nginx docs, only present in the apache ones.

Northcode added 2 commits June 7, 2022 18:33
Add webfinger and nodeinfo redirects to match apache version.

Signed-off-by: Andreas Larsen <[email protected]>
Add webfinger and nodeinfo redirects to match apache version.

Signed-off-by: Andreas Larsen <[email protected]>
@kesselb
Copy link
Contributor

kesselb commented Jun 7, 2022

RewriteRule ^\.well-known/(?!acme-challenge|pki-validation) /index.php [QSA,L]

I think we use a different rewrite rule for apache. See nextcloud/server#24860 for more details. Did you see a failing Setup Check in Nextcloud about the missing redirect?

@Northcode
Copy link
Author

Northcode commented Jun 7, 2022

It was giving me a warning in the server settings about webfinger not being properly configured. And pointed me here:
https://docs.nextcloud.com/server/23/admin_manual/issues/general_troubleshooting.html#service-discovery
which has this rule: RewriteRule ^\.well-known/webfinger /nextcloud/index.php/.well-known/webfinger [R=301,L]

After changing the config to match what I have in this PR, the warning dissapeared.

@kesselb
Copy link
Contributor

kesselb commented Jun 8, 2022

# 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;

Is the rule for webfinger and nodeinfo. Is your Nextcloud installed into a subdirectory?

@Northcode
Copy link
Author

I somehow missed that. I'm hosting via the helm chart, which uses rewrite instead of location in the nginx config.
I already made a PR for the chart, and thought it was missing from these docs too. nextcloud/helm#241

But since the rule you mentioned already achieves what I made the PR for I'm closing this then.
Thanks for the review.

@Northcode Northcode closed this Jun 8, 2022
@kesselb
Copy link
Contributor

kesselb commented Jun 8, 2022

Thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants