/srv/irclogs.ubuntu.com/2022/06/05/#ubuntu-server.txt

HinnerkHi. 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 I12:35
Hinnerkcan 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:35
HinnerkBonus question, if answer is yes: How?12:36
tomreynHinnerk: 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
HinnerkOh, I wasn't. But actually I use .home Hope that'S not special too?12:42
HinnerkSorry, was making up names on the fly for the question to not put my stupid server names :)12:43
HinnerkI prefer classic DNS, I understand that at least somewhat.12:44
tomreynit'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 addresses12:44
HinnerkCurrently my router takes that job. It serves as DNS.12:44
HinnerkIt has hosts configured to resolve local IPs12:45
tomreynokay, and your router lets you assign static names to ip addresses, and would resolve those for systems in your LAN?12:45
HinnerkYes. All servers have static IP12:45
HinnerkAnd the host file knows them an the names.12:46
Hinnerkand12:46
tomreynand can you assign multiple names to each system / LAN IP address there, too?12:46
HinnerkI can reach them all just fine.12:46
HinnerkI think that is standard, no?12:46
HinnerkJust looking into the file, yes, I can.12:46
tomreynit will depend on implementation, but yes, it's common12:47
HinnerkCan you just append the folder on the server? So resolve nextcloud.home to serverip/nextcloud?12:47
HinnerkThat seemed too simple :)12:47
tomreynso 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 instance12:48
tomreyneither by A (and/or AAAA) or CNAME record.12:48
HinnerkBut would that not then redirect me to the html site not the nextcloud site?12:48
HinnerkSo, the parent folder, which then contains a link to nextcloud?12:49
tomreynyou 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 nextcloud12:49
tomreyni think you mentioned you're using apache httpd there12:49
HinnerkYes.12:49
HinnerkI see, two steps. First redirect via dns to the server. And then configure apache.12:50
HinnerkSo my hunch that both topics would be involved was right :)12:50
tomreynin the virtualhost configuration file/snippet which defined the existing virtualhost for nextcloud, under the ServerName line, just add a "ServerAlias nextcloud.home" line12:50
tomreynand you'll be done12:50
HinnerkAwesome, thank you!12:50
tomreynwell, you need to reload the server configuration also12:51
tomreyn*webserver12:51
HinnerkOf course, restart apache12:51
tomreynlooks like you almost solved it yourself. ;)12:51
HinnerkWhere is that file hiding again?12:53
Hinnerkthe virtualhost config?12:54
tomreynprobably in /etc/apache2/sites-available/12:54
Hinnerkah, of course.12:54
tomreynnote that if you'll create new files there or remove any you'll want to use a2ensite / a2dissite to enable / disable that sites, too12:55
tomreynbut in your case you're probably just editing an existing file12:56
HinnerkBest to do a fresh reboot.12:59
HinnerkYes, just edited it. There was no Server section in the nextcloud.conf just an Alias. I added under that, is that ok?13:00
tomreynmaybe namebased virtual hosts are not enabled, yet, then13:03
tomreynhttps://httpd.apache.org/docs/2.4/vhosts/name-based.html13:03
HinnerkNo, my mistake, wrong file...13:05
tomreyni need to leave for a while, but i think you're going to make it work. ;-)13:09
HinnerkAh, pity. DNS is not resolving properly. Sorry for the discon, I was rebooting my router.13:24
HinnerkBut thank you for the help.13:24
HinnerkGot me on the way.13:24
tomreynHinnerk: got it working then?14:04
Hinnerk50Hi. 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
Hinnerk50Maybe Apache / SSL related.15:24
tomreynHinnerk10: a screenshot might help here.15:50
tomreynyou will probably also find a nextcloud support channel around the corner here if you just look for it15:51
tomreynthat'd be the better place, if this is an error message generated by nextcloud.15:51
Hinnerk10https://paste.pics/f5487c7cb0a91af953302349df5625bc15:52
tomreynHinnerk10: 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:56
Hinnerk10It 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
Hinnerk10sorry for the typos. I guess you'll figure it out :)15:58
HinnerkSo I really think it is less an owncloud issue rather than an apache2 issue.16:11
Hinnerksorry, nextcloud16:11
Hinnerkhad that too, a long time ago.16:11
tomreynHinnerk10: 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/2616:12
HinnerkI think I already did that :)16:12
HinnerkInterestig.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
HinnerkBut if I enter nextcloud.home it fails.16:32
tomreynso you edited both apache's and nextcloud's configuration files?16:39

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!