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
or
(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.
If you are struggling with linux commands and stuff and want something a little easier maybe have a look at installing webmin.
Just search your distro and webmin âubuntu webminâ.
The file manager in there is really easy to use and quick security is just to make it run on specific Ip addresses or local subnet which is also easy.
The bit you need is what either apache or nginx are serving and its in etc/apache/sites-available as your nextcloud app should be having those domains pop in.
Snap install on encrypted Ubuntu MATE 16.04 64-bit using self signed cert with OTP inside Virtualbox v5.1.18 guest on Windows 7 32-bit host.
The config.php file was located for me at: /snap/nextcloud/1182/config/
Since the snap location is read only even for sudo/root, manually editing the config.php file isnât possible. As I understand it, this is by Canonical snap design (and rightly so).
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.