I’m migrating my nextcloud installation to docker (docker compose). I’m using Traefik as a reverse proxy and I have associated a domain with my nextcloud instance.
The documentation tells me to set APACHE_DISABLE_REWRITE_IP=1
and TRUSTED_PROXIES=traefik
documentation.
The problem is that I started, installed and ‘filled’ nextcloud before setting these environment variables. Hence when visiting nextcloud from my domain I get " Access through untrusted domain". I have set the trusted proxies in the config.php
file:
'trusted_proxies' =>
array (
0 => 'traefik',
),
Next I should set APACHE_DISABLE_REWRITE_IP=1
in the config.php
file.
But how and where should I set APACHE_DISABLE_REWRITE_IP=1
inside config.php
?
I know I can just add the domain to the trusted domains section but I would like to keep things dynamic so I can change the domain at will.