Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Clarify `trusted_domains` setting

Đang mở Phù hợp với người mới
#12,003 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
apache
Lĩnh vực
documentation

Hướng nghiên cứu

Mở phần cấu hình “Trusted Domains” được liên kết trong Nextcloud Admin Manual và xem lại hướng dẫn của phần này về virtual hosting. Làm rõ rằng chỉ nên liệt kê domain phù hợp khi các virtual host dùng chung một Apache server, đồng thời nêu rõ rằng có thể cần xóa các mục mặc định như localhost và 127.0.0.1. Hoàn tất khi cảnh báo được nêu rõ ràng và khớp với hành vi cấu hình đã được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

1. to develop
          > 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

Ngôn ngữ chính
JavaScript
Star
633
Fork
2.6k
Merge trung bình
22 giờ 40 phút
Pull request đã merge (30 ngày)
93

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nextcloud/documentation

Tất cả issue của nextcloud/documentation

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.