Redirection problem after installation

Hello everyone,

This is my first installation of nextcloud, once finished when I want to connect from the browser I have this message

The page is not redirected correctly

Firefox has detected that the server is redirecting the request for this address in a way that will not succeed.

 The cause of this problem may be the disabling or refusal of cookies.

(this problem does not come from my browser)

I modify the config.php :

before:

‘trusted_domains’ => _
_ array (

_ 0 => ‘cloud.ex_for_this_topic.com’,_

after :

‘trusted_domains’ => ‘cloud.ex_for_this_topic.com’,
_ array (_
_ 0 => ‘cloud.ex_for_this_topic.com’,_

after making this change I arrived on a page saying :

You access the server from an untrusted domain.

Please contact your administrator. If you are the administrator of this instance, configure the “trusted_domains” variable in the config / config.php file. An example configuration is provided in the config / config.sample.php file.
Depending on your configuration, as an administrator you can also use the button below to approve this domain.

Add “cloud.ex_for_this_topic.com” to the list of approved domains

when I click on Add “cloud.ex_for_this_topic.com” to the list of approved domains I am redirected to an address not found

https://c/index.php/settings/admin?trustDomain=cloud.ex_for_this_topic.com

Version php : PHP 7.0.19-1
Version mysql : Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1

nextcloud is installed on a server mutualised

i need help

Thanks

TDN

Likley a webserver config issue. Additionally you messed up the config.php. Revert you changes there. The web gui version of “add to trusted Domains” doesnt work allways depending on the permissions your webserver has.

Please post your Webserver config files and a description on how you did access your site.

The more Info, the more help you get.

1 Like

hi,
which file do you want to see ?

The web gui version of “add to trusted Domains” doesnt work allways depending on the permissions your webserver has.

what is the optimal server permission for everything to work well?

My config.php, some parameters are voluntarily modified
in the meantime I redid a clean installation

$CONFIG = array (
‘instanceid’ => ‘occdal’, #modified
’passwordsalt’ => ‘XWDO/EiqM9v5TeAj’, #modified
’secret’ => ‘BXX+NEwkxtWuW2WhEC/5vQPMt6O4b+H’, #modified
’trusted_domains’ =>
array (
. 0 => ‘cloud.ex_for_this_topic.com’,
),
‘datadirectory’ => ‘/home/modified/www/nextcloud/data’, #modified
’overwrite.cli.url’ => ‘https://cloud.ex_for_this_topic.com/nextcloud’, #modified
’dbtype’ => ‘mysql’,
‘version’ => ‘12.0.3.3’,
‘dbname’ => ‘modified’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘modifier’,
‘dbpassword’ => ‘modified’,
‘installed’ => true,
);

To access the site : https://cloud.ex_for_this_topic.com/nextcloud

I cleaned the database before reinstalling it then I put the setup-nextcloud.php file in www and I opened it from https://cloud.ex_for_this_topic.com/setup-nextcloud.php

I followed the guided installation of nextcloud filled the right information on the database

thanks