Clarify `trusted_domains` setting
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- apache
- Domain
- documentation
Research direction
Open the linked Nextcloud Admin Manual “Trusted Domains” configuration section and review its guidance for virtual hosting. Clarify that only the proper domain should be listed when virtual hosts share an Apache server, including that default entries such as localhost and 127.0.0.1 may need to be removed. Done when the warning is explicit and matches the reported configuration behavior.
Written by the indexing model from the issue text.
Description
> It does, however, run a check against each of your configured `trusted_domains` [...]
If one of the listed domains returns a 200 code, that error will appear. [...]
Usually this is when people discover they have many unnecessary domains in their config [...]
You were right. That was the culprit.
I am using virtual hosting with several sub-domains on a single Apache server with the same IP address. One sub-domain is cloud.my-domain.tld (for NC), photos.my-domain.tld (for Lychee) and www.my-domain.tld (which only serves an imprint and other required legal information).
I had the following entries for trusted_domains:
'trusted_domains' => array (
0 => 'localhost',
1 => '127.0.0.1',
2 => '[::1]',
3 => '<my-public-IPv4-address>',
4 => '<my-public-IPv6-address>',
5 => 'cloud.my-domain.tld',
),
localhost and 127.0.0.1 had been listed by default and I added [::1] as well as my public IP addresses. However, if a client connected to any of those, the Apache server redirect the request to the default sub-domain www.my-domain.tld which serves the imprint. I removed every entry but the last one. Now the error disappeared again.
Maybe there should be an explicit hint at NC Admin Manual: Configuration Parameters - Trusted Domains that for virtual hosting only the proper domain should be listed. In particular, with virtual hosting the default entries localhost and 127.0.0.1 must be removed.
Originally posted by @nagmat84 in https://github.com/nextcloud/server/issues/46381#issuecomment-2223538864
- Dominant language
- JavaScript
- Stars
- 632
- Forks
- 2.5k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 96
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextcloud/documentation
-
0. needs triage enhancement manual: developer security
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/documentation#15693 ·
Maintainers usually reply within 1 day
-
0. needs triage bug developer experience manual: developer
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
nextcloud/documentation#15690 ·
Maintainers usually reply within 1 day
-
0. needs triage developer experience enhancement good first issue manual: developer
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
nextcloud/documentation#15687 ·
Maintainers usually reply within 1 day
-
0. needs triage enhancement good first issue manual: developer security
Difficulty 1/5 Under an hour Newbie friendliness 90/100
nextcloud/documentation#15686 ·
Maintainers usually reply within 1 day
-
0. needs triage enhancement good first issue manual: developer
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
nextcloud/documentation#15685 ·
Maintainers usually reply within 1 day
All issues in nextcloud/documentation
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
keyxmakerx/Chronicle#967 ·
Maintainers usually reply within 1 day
-
good first issue hacktoberfest
Difficulty 1/5 Under an hour Newbie friendliness 92/100
RogueAlg0/taken#386 · 3 comments ·
Maintainers usually reply within 1 day
-
external-issue to-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
LearningCircuit/local-deep-research#7067 ·
Maintainers usually reply within 1 day