I’ve changed the domain name for my self-hosted ownCloud (v10.4.0.4) instance. And I modified the ‘trusted_domains’ config variable to use the new domain name. As far as I can tell, there was nothing else to change for this to work, however I continue to get the “You are accessing the server from an untrusted domain.” message when attempt to access the website. I don’t really have any other config setting as far as I know, the only remotely related setting is ‘overwrite.cli.url’ => ‘/owncloud’.
Here are the relevant (modified) log lines:
{“reqId”:“Xp9lyqXNTvL80BEYrsWCxgAAAAA”,“level”:2,“time”:“2020-04-21T17:29:46-04:00”,“remoteAddr”:“192.168.11.1”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/owncloud/",“message”:“Trusted domain error. “192.168.11.1” tried to access using “abdcef.jk” as host.”}
{“reqId”:“Xp9lyyHyeTYzmbY6e88tNQAAAAM”,“level”:2,“time”:“2020-04-21T17:29:47-04:00”,“remoteAddr”:“192.168.11.1”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/owncloud/index.php/core/js/oc.js?v=7b450a5be4d86326be41c15e441113b7",“message”:“Trusted domain error. “192.168.11.1” tried to access using “adcdef.jk” as host.”}
I’m running Apache 2.4 on Ubuntu 18.04.4. No docker or vms involved. The webserver is behind a router. I edited the log with a bogus domain, but my real, expected domain name appears in the log and matches exactly that which I have in my config.
Both my old and new domain names are active and point to my current (single) IP address, but the webserver has modified to only serve the new domain.
My owncloud config was also setup to use Redis for memcache.local and memcache.locking. This almost appears to be an inability of ownCloud (or php, rather) to pick up the latest config.php changes. From the source code, it looks like I can just override this domain checking by setting ‘overwritehost’, but that is not working either. I tried flushing the Redis cache, I tried disabling the cache, restarting Apache, restarting the server, but it doesn’t appear to notice the change.
Please elaborate, you might have been an idiot, but you would be an even bigger one, if you don’t explain everyone what they’re doing wrong.
Also there are lots more idiots out there, including me. And I’m honestly curious how apache can overwrite this for you (rewrite/redirect?).
I must not only admit my shame, but describe it too? My web server root is a symlink and I had changed it months ago and forgotten, so I was changing files in the old location.