Hi folks,
first things first: Iām a newbie in using Nextcloud and Iām also not an administrator or even an experienced Linux or RasPi user.
I decided to dust my BananaPi and install some useful stuff on it when a colleague of mine told me about Nextcloud. I was totally thrilled just by thinking of having my own cloud system so I spent almost a whole weekend trying to install the software using different configurations (nginx, apache2, ARMbian legacy, ARMbian mainline, MariaDB, MySQL and so on) almost freaking out at the end of Sunday.
Long story short, a pretty nice guide by a blogger called FlyingHazard (http://www.instructables.com/id/NextCloud-on-the-Raspberry-Pi-DIY-Dropbox/) finally brought me to having it run today (btw the Installation Guide given by Nextcloud itself really is a bit unclear and incomprehensible if youāre not familiar with apache/nginx web server usage).
Hereās my problem: Iām able to use Nextcloud via my local IP adress (192.168.0.xx/nextcloud) but not via my external, registered domain.
My domain configuration is as follows:
Iām using the Dataplicity DynDNS service which gives me a host accessible via internet (looks sth. like https://blabla-bla-1234.dataplicity.io) over which I can connect to my Nextcloud without any problem (with the /nextcloud suffix of course) so I decided to redirect one of my domains registered at 1&1 (the German one) which is called xyz.net to that URL. Now trying to access the Nextcloud via xyz.net/nextcloud Chrome throws an error āblabla-bla-1234.dataplicity.io redirected you too many times.ā (it doesnāt matter if Iām connecting via http or https, I just get the exact same result).
the re-directed domain didnāt match your ServerName.
Better would be using one of your sub domains as dyndns service, if that is possible with your 1&1 hosting package.
I use a Strato hosting package (PowerWeb or so) and declare one sub domain as dyndns, giving e.g cloud.xyz.net and then let my router use cloud.xyz.net as dyndns service.
Hi Ralf,
unfortunately 1&1 doesnāt support a DynDNS service hence Iām forced to redirect my desired domain to the Dataplicity domain. I think I get your point but what do I have to change in my Apache configuration now?
Thereās nothing explicitly āwrongā with the apache conf, if youāre doing a straight forward to the other domain and itās throwing a Chrome error then potentially an issue with how itās forwarded?
There we go, changing it to HTTP redirect solved the problem. However, now my browser shows a bad-styled URL when Iām accessing the domain. Is there a way to change that?
Open your domain settings with your registrar, look up the DNS options, then add a record - not A, MX, or otherwise, but CNAME - that directs www.yourdomain.com to your.dataplicity.io.
Youāll need to add it as a verified domain for NC when you first use it, but itāll otherwise solve the problem.
Iām not really sure what this is supposed to mean. What does the prefix do and do I really have to enter the target URL in the āWertā (value) field?
By the way I found out that changing the redirect method didnāt solve the problem completely. Typing xyz.net in the Nextcloud Desktop client opens up a popup throwing an HTTP error 502 (moved permanently).
Well this is starting to drive me nuts. For any reason I have to put that underscore before the prefix or else Iām not able to even create that CNAME entry. āwwwā or ācloudā wonāt work for that.
Anyways, having that CNAME entry created (_cloud.xyz.net), Iām neither able to access my site via cloud.xyz.net nor (obviously) _cloud.xyz.net nor will the domain name change after typing xyz.net.
Do I still need to have the redirect activated or for what do I have to change the domain type to now? Iām completely irritated by that stuff, sorry.
EDIT: OK, googling around a bit and trying some stuff at another one of my domains (_cloud.domainKey as prefix for abc.de) I found out that itās possible to make something like a redirection for a subdomain without having to add a subdomain with a redirect rule. Still Iām wondering whatās the difference between simply adding a subdomain to my domain (which I actually didnāt even want btw) and adding a CNAME record for a domain.
Belonging my main question: I managed to redirect my domain to the Dataplicity via HTTP redirect to blabla.dataplicity.io which caused the domain to work in browsers, however displaying the targetās domain URL which is pretty ugly.
Still there are two problems:
I donāt want the ugly URL but my main domain (without any subdomain) to appear in the address bar replacing the dataplicity fully-qualified domain name. Isnāt there a possibility via htaccess, apache2.conf, domain.com.conf or similar or is the only way to do this by adding a CNAME entry for a subdomain? If so, why does the target URL still appear in the address bar even after adding that CNAME entry for the subdomain?
Neither the Nextcloud Desktop nor the Android client will accept one of the domains Iām trying to configure as āmain domainsā (xyz.net / cloud.abc.de). Do I always have to enter the fully-qualified domain name given by Dataplicity to configure those clients? I want my family to take part in that Nextcloud project but I also want to make it easy for them to connect e.g. by just having to type abc.de at the very first client startup.
Sorry for all those questions, Cheers and good night.
When you create a CNAME it can take up to 24hours to apply.
CNAME is the easiest as an A record (pointing to IP) will change periodically, and a redirect will show the old domain. But you canāt CNAME the naked domainā¦ so a redirect from naked to www. or cloud. would get around that.
I canāt tell you why you need to put an underscore there, but your registrar can.
No, youāre manipulating a domain, so you need to do so via DNS. An apache conf does literally nothing without DNS in place.
No, just get it correctly submitted (via registrar help if required) and wait up to 24hr. Then you can use your new domain.
Thanks a lot for your effort, Jason. I just configured a new subdomain on my main domain abc.de and will wait as long as it takes (for the moment thereās just a blank page) till Iāll hopefully see some results. Iāll let you know if it worked.
For anyone facing similar one-ways in their domain configuration centres:
configuring the subdomain from scratch and setting the CNAME without adding an extra CNAME entry to an already existing subdomain worked out fine and I didnāt have to type the underscore or even a prefix at all for that. I just changed the domain type of use (āVerwendungsartā) from āRedirectā to āDNS configurationā and changed from ā1&1 IP-Adresseā to āCNAMEā followed by typing the fully-qualified domain name, thatās it. Iām now looking forward to having the DNS updated and seeing whatās happening.