Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Clarify `trusted_domains` setting

Abierto Apto para principiantes
#12,003 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
68/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
apache

Línea de trabajo

Abre la sección de configuración “Trusted Domains” enlazada del Nextcloud Admin Manual y revisa sus indicaciones sobre el alojamiento virtual. Aclara que solo debe aparecer el dominio correcto cuando los hosts virtuales comparten un servidor Apache, incluido que puede ser necesario eliminar entradas predeterminadas como localhost y 127.0.0.1. Se considerará terminado cuando la advertencia sea explícita y coincida con el comportamiento de configuración indicado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
JavaScript
Estrellas
633
Forks
2.6k
Merge medio
1 d 1 h
PR fusionados (30 d)
82

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nextcloud/documentation

Todos los issues de nextcloud/documentation

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.