Webdav - lan - no access

Cant access nextcloud on lan using webdav. I believe it’s to do with the security.
I can access:
https://myserver.duckdns.org from outside the wan - no problems no security risks.
https://myserver.local from within the lan BUT I get a Warning: Potential Security Risk in the browser I have to click advanced.

I canNOT access nextcloud:
https://myserver.duckdns.org from behind the lan
http://myserver.local (note above where I can access if I use “https” it allows access if I accept the risk.
Using web dav on windows - I have copied the webdav address from being logged in on the browser. Using both http & https://myserver.local/remote.php/dav/files/user

My config.php 'trusted_domains list
0 => ‘myserver.duckdns.org’,
1 => ‘192.168.1.*’, (the nextcloud server is 192.168.1.253 so not sure if i need the wildcard for the other computers on the lan or just the server at 192.168.1.253)
2 => ‘myserver.local’,
3 => ‘192.168.1.253’,

Under /etc/apache2/port.conf
Listen 80
“”
Listen 443
“”

“”
Listen 443
“”

Nextcloud version 24.04
Operating system and version debian 11
Apache - latest
PHP version - latest

Hope this is enough enough to help diagnose. Thanks

You really have two issues. Incorrect DNS resolution while on LAN resulting in hairpin routing (bad practice and many routers won’t do it), and using an alternate name that does not match your certificate (causes certificate warning since it’s invalid).

You need to set up split horizon DNS for myserver.duckdns.org and stop using myserver.local.

1 Like