Accessing Nextcloud internal and external from same URL

Nextcloud version: 11.0.1
Operating system and version: Raspbian 8 (Jessie)
Apache or nginx version: Apache 2.4.10
PHP version: PHP 7.0.15-1~bpo8+1

Is this the first time you’ve seen this error and can you replicate it?:
Did run ownCloud instances before, this problem never occurred.

The issue you are facing:
I set up Nextcloud on a Raspberry Pi, connected via ethernet to my Airport Extreme which runs behind my ISP’s router (KPN NL, Experiabox V8). I use Duck DNS (www.duckdns.org) to connect my (external) IP address to a URL. From outside my network this works great; I am able to connect to Nextcloud through both sync clients and the web interface.

However, from inside my home network, this doesn’t work. When I’m at home I can only connect to the server through it’s local IP.

I’d like to solve this, but don’t know where to start. Yes, I could edit my hosts files, but that doesn’t really solve te problem. So ideally, I’d like to connect to Nextcloud through my public URL, regardless of where I am…

The output of your Nextcloud log in Admin > Logging:
The logs doesn’t really show much info. Some bad requests (expected filesize missmatch) and locked files. It’s only 5 lines.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):
<?php $CONFIG = array ( 'instanceid' => '****', 'passwordsalt' => '****', 'secret' => '****', 'trusted_domains' => array ( 0 => '192.168.***.***', 1 => '****.duckdns.org', ), 'datadirectory' => '/mnt/data/', 'overwrite.cli.url' => 'https://****.duckdns.org/', 'dbtype' => 'mysql', 'version' => '11.0.1.2', 'dbname' => 'nextcloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => '****', 'dbpassword' => '****', 'logtimezone' => 'UTC', 'installed' => true, );

The output of your Apache/nginx/system log in /var/log/____:
My Apache logs doesn’t show this specific problem.

I would setup a private nameserver.

Thanks, @Sanook!

However… by disabling the default sites 000-default.conf and default-ssl.conf the problem’s now fixed! I can now use my ‘public’ URL ****.duckdns.org both from inside and outside my network!

Do you still have https access?

Yes!