I have the Nextcloud snap package installed on a server running Ubuntu 16.04.1 LTS. How can I disable the “You are accessing the server from an untrusted domain.” page that pops up when you open up a domain hosted on the same server but not in the trusted_domains list. I want Nextcloud to only show up on one single subdomain (the only domain in the trusted_domains list) and not affect any other page.
I assume I would want to edit the VirtualHost, inside the following config file, to specify a ServerName. The problem is when using the snap package, this file is readonly.
This file is located at /snap/nextcloud/current/conf/httpd.conf on my machine.
How can I
(a): edit this file
(b): disable this page in another way?
As far as I know you need to edit your config.php file and add your domain to this list (in fact I have three entries because of different domains pointing to the same IP, as well as an IP address for clients who connect locally):
I do have that subdomain in the list of trusted domains. Maybe I should clarify, I can access Nextcloud fine on that subdomain. The problem is that this “untrusted domain” page appears on the every single subdomain. Nextcloud just takes all traffic pointed at this box and returns this “untrusted domain” page. I only want Nextcloud to display any type of interface on one single subdomain. I don’t want it to display the “untrusted domain” page on any subdomains or domains that are hosted on this server.
Yeah that is what I was trying to do except since I have Nextcloud installed via the snap package so these files are readonly. @nickvergessen Do you know how to disable the readonly protection on these files?
I don’t know if this is helpful, but I ran into the same issue after installing via the snap package and then turning on TLS with LetsEncrypt. On the “You are accessing the server from an untrusted domain” page, under the error message there’s an option to add the domain (or something along those lines). After clicking that I had to temporarily add the ‘invalid’ cert to my browser, but after that it pulled up the config page in NextCloud and let me add the domain. After that everything is working fine with TLS (and I checked from another machine to make sure it wasn’t from the cert I added).
I realize that doesn’t really answer your question about the read-only filesystem; I tried re-mounting it as rw but couldn’t get that to work, although I’m not very clear on exactly how snaps work.
and enter this from inside your local nextcloud browser, changing the xxx IP to whatever you need to be trusted.
The admin page will refresh and a little dialog will prompt to really trust the domain, select yes.
Back on your host OS, enter the IP of the nexcloud install as before; the untrusted domain warning page won’t appear. Amusingly in my particular setup the xxx IP is the same as the inet addr: using ifconfig command from within the linux guest.