Trusted Domains » History » Version 2
Gareth Eaton, 09/20/2023 12:02 PM
1 | 1 | Gareth Eaton | h1. Trusted Domains |
---|---|---|---|
2 | |||
3 | I've observed that sometimes Nextcloud requests users to enter their passwords twice before granting access. To resolve this behavior, you can add your domain to the list of trusted domains in the Nextcloud configuration file. |
||
4 | |||
5 | |||
6 | Adding your domain to the list of trusted domains in the Nextcloud configuration file is a straightforward process. This configuration helps Nextcloud recognize legitimate incoming requests. To do this, follow these steps: |
||
7 | |||
8 | Access the Configuration File: |
||
9 | |||
10 | Log in to your Nextcloud server as a user with administrative privileges or SSH access. |
||
11 | Locate the Configuration File: |
||
12 | |||
13 | Navigate to the directory where Nextcloud is installed. The configuration file is typically named config.php and is located in the config directory within your Nextcloud installation. The full path is often /var/www/html/nextcloud/config/, but it may vary depending on your server setup. |
||
14 | Edit the Configuration File: |
||
15 | |||
16 | Use a text editor to open the config.php file. You may need to use a command like sudo nano /path/to/config.php if you have limited permissions. |
||
17 | Add Your Domain to the 'trusted_domains' Array: |
||
18 | |||
19 | Inside the config.php file, locate the 'trusted_domains' array. It should look something like this: |
||
20 | |||
21 | <pre> |
||
22 | 'trusted_domains' => |
||
23 | array ( |
||
24 | 0 => '10.0.2.21', // IP address of the reverse proxy if you have one. |
||
25 | 1 => 'your-current-domain', // Add your domain here |
||
26 | ), |
||
27 | </pre> |
||
28 | 2 | Gareth Eaton | |
29 | Save the Configuration File: |
||
30 | |||
31 | Save the changes you made to the config.php file and exit the text editor. |
||
32 | Restart the Web Server: |
||
33 | |||
34 | After making changes to the configuration file, it's essential to restart your web server for the changes to take effect. The specific command to restart the web server depends on the web server software you're using. For Apache, you can use: |
||
35 | |||
36 | |||
37 | <pre> |
||
38 | sudo systemctl restart apache2 |
||
39 | </pre> |