Owncloud error - You are accessing the server from an untrusted domain
ownCloud gives you and error of “You are accessing the server from an untrusted domain. Please contact your administrator”. When you go to the webpage.
When you first access ownCloud it remembers the IP address or hostname initially used and for security purposes ignores ALL other requests using a different IP address or domain. To fix this error you will either need to replace the IP address used with a new one or add additional IP addresses and/or domains.
Access your server via command line or ssh. Backup up your current config with the following command:
cp /usr/share/owncloud/config/config.php /tmp/config-owncloud-old.php
Modify the config file with the following command (or use your favorite editor):
In the section with trusted domains, change the IP address or domain name to include your domain. Initially, it may look similar to this:
0 => '192.168.1.1',
You can change it to include your new address by changing the IP value or you can add additional addresses. For example:
0 => '10.1.1.1',
1 => 'servername.example.com',
Then save your changes to the file by pressing Ctrl+o and then press enter to accept the name of the file. Press Ctrl+x to exit nano.
Test it out.