[12:35] Hi. I have a question concerning propbably apache or dns configuration. Trying to manage my local network. I have a dedicated server and router in my local network. The server is running latest LTS Ubuntu, Apache2 and nextcloud (and other services of course). The router has dnsmasq (not sure if relevant). nextcloud is found under html folder, so I [12:35] can reach nextcloud by https://myserver.local/nextcloud. I would like to reach it under https://nextcloud.local essentially hiding from users the difference whether it is a different server or subsite. Is that possible? [12:36] Bonus question, if answer is yes: How? [12:42] Hinnerk: i guess the first question to ask is whether you are aware of the special purpose of the .local top level domain name for MDNS, and whether you chose this on purpose, or would prefer to use classic DNS. [12:42] Oh, I wasn't. But actually I use .home Hope that'S not special too? [12:43] Sorry, was making up names on the fly for the question to not put my stupid server names :) [12:44] I prefer classic DNS, I understand that at least somewhat. [12:44] it's not essentially wrong to use MDNS for this purpose, it can make sense. the question now is how you want computers i your network to resolve hostnames to ip addresses [12:44] Currently my router takes that job. It serves as DNS. [12:45] It has hosts configured to resolve local IPs [12:45] okay, and your router lets you assign static names to ip addresses, and would resolve those for systems in your LAN? [12:45] Yes. All servers have static IP [12:46] And the host file knows them an the names. [12:46] and [12:46] and can you assign multiple names to each system / LAN IP address there, too? [12:46] I can reach them all just fine. [12:46] I think that is standard, no? [12:46] Just looking into the file, yes, I can. [12:47] it will depend on implementation, but yes, it's common [12:47] Can you just append the folder on the server? So resolve nextcloud.home to serverip/nextcloud? [12:47] That seemed too simple :) [12:48] so you should configure your router so that it will resolve DNS queries for nextcloud.home to the same IP address as that of the server hosting the nextcloud instance [12:48] either by A (and/or AAAA) or CNAME record. [12:48] But would that not then redirect me to the html site not the nextcloud site? [12:49] So, the parent folder, which then contains a link to nextcloud? [12:49] you need to do two configurations. one is about resolving the hostname on your LAN, i just discussed that. the other is on the webserver which hosts nextcloud [12:49] i think you mentioned you're using apache httpd there [12:49] Yes. [12:50] I see, two steps. First redirect via dns to the server. And then configure apache. [12:50] So my hunch that both topics would be involved was right :) [12:50] in the virtualhost configuration file/snippet which defined the existing virtualhost for nextcloud, under the ServerName line, just add a "ServerAlias nextcloud.home" line [12:50] and you'll be done [12:50] Awesome, thank you! [12:51] well, you need to reload the server configuration also [12:51] *webserver [12:51] Of course, restart apache [12:51] looks like you almost solved it yourself. ;) [12:53] Where is that file hiding again? [12:54] the virtualhost config? [12:54] probably in /etc/apache2/sites-available/ [12:54] ah, of course. [12:55] note that if you'll create new files there or remove any you'll want to use a2ensite / a2dissite to enable / disable that sites, too [12:56] but in your case you're probably just editing an existing file [12:59] Best to do a fresh reboot. [13:00] Yes, just edited it. There was no Server section in the nextcloud.conf just an Alias. I added under that, is that ok? [13:03] maybe namebased virtual hosts are not enabled, yet, then [13:03] https://httpd.apache.org/docs/2.4/vhosts/name-based.html [13:05] No, my mistake, wrong file... [13:09] i need to leave for a while, but i think you're going to make it work. ;-) [13:24] Ah, pity. DNS is not resolving properly. Sorry for the discon, I was rebooting my router. [13:24] But thank you for the help. [13:24] Got me on the way. [14:04] Hinnerk: got it working then? [15:24] Hi. I get a technical error message from nextcloud. The log shows that some remoteAddr is unknown. And it is probably outdated. Where is this set? How can I fix the issue? [15:24] Maybe Apache / SSL related. [15:50] Hinnerk10: a screenshot might help here. [15:51] you will probably also find a nextcloud support channel around the corner here if you just look for it [15:51] that'd be the better place, if this is an error message generated by nextcloud. [15:52] https://paste.pics/f5487c7cb0a91af953302349df5625bc [15:56] Hinnerk10: hmm, i assume you will find more info on that in nextclouds error logs, or those for apache2, either the main ones, or a specific one for nextcloud, if such exists. [15:58] It must be related to the earlier change. I added a secons virtualhost section to apache2, since nextcloud.home uses a difference documentroot as myserver.home. So just putting a ServerAlias was not enough. Now it works, but I get the error message :) [15:58] sorry for the typos. I guess you'll figure it out :) [16:11] So I really think it is less an owncloud issue rather than an apache2 issue. [16:11] sorry, nextcloud [16:11] had that too, a long time ago. [16:12] Hinnerk10: this is all nextcloud specific, talk to nextcloud support, please. here's something i looked up on their forum for you: https://help.nextcloud.com/t/howto-add-a-new-trusted-domain/26 [16:12] I think I already did that :) [16:32] Interestig.If I enter myserver.home and navigate to the nextcloud plage, the error doesn't come up and nextcloud works like a charm. [16:32] But if I enter nextcloud.home it fails. [16:39] so you edited both apache's and nextcloud's configuration files?