Missing Some Images & Other Errors (URL is of local network IP address instead of domain name)

Nextcloud version (eg, 10.0.2): 12.0.3
Operating system and version (eg, Ubuntu 16.04): Ubuntu 16.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.18 (Ubuntu)
PHP version (eg, 5.6): 7.0.22-0ubuntu0.16.04.1
Is this the first time you’ve seen this error?: Yes

Can you reliably replicate it? (If so, please outline steps):
Yes. Load main site page (https://cloud[dot]domain[dot]org)

The issue you are facing:
Image on main login page is showing as if it were from our internal network (https://192.168.[3rd octet].[4th octet]) instead of from the domain. Because the site is HTTPS, then the image doesn’t appear since it isn’t part of the SSL certificate. We are behind an IIS proxy that is not handling SSL offloading.

UPDATE: The server is pushing out the local IP address for the Circles app as well. :roll_eyes:

The output of your Nextcloud log in Admin > Logging:
None

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
'passwordsalt' => '[redacted]',
'secret' => '[redacted]',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'nextcloud',
2 => '192.168.[local].[address]',
3 => 'cloud.[our].[domain]',
),
'datadirectory' => '/var/ncdata',
'overwrite.cli.url' => 'https://cloud.[our].[domain]/nextcloud',
'overwriteprotocol' => 'https',
'overwritehost' => '',
'dbtype' => 'mysql',
'version' => '12.0.3.3',
'dbname' => '[redacted]',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => '[redacted]',
'dbpassword' => '[redacted]',
'installed' => true,
'instanceid' => '[redacted]',
'maintenance' => false,
'mail_smtpmode' => 'smtp',
'log_rotate_size' => '10485760',
'memcache.local' => '\\OC\\Memcache\\Redis',
'filelocking.enabled' => true,
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis.sock',
'port' => 0,
'timeout' => 0,
'dbindex' => 0,
'password' => '[redacted]',
),
'htaccess.RewriteBase' => '/',
'loglevel' => '2',
'log_type' => 'file',
'logfile' => '/var/ncdata/nextcloud.log',
'logtimezone' => 'America/Chicago',
'ldapIgnoreNamingRules' => false,
'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
);

The output of your Apache/nginx/system log in /var/log/____:

::1 - - [24/Oct/2017:18:11:14 -0500] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g (internal dummy connection)"
::1 - - [24/Oct/2017:18:11:15 -0500] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g (internal dummy connection)"
::1 - - [24/Oct/2017:18:11:16 -0500] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g (internal dummy connection)"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:02 -0500] "GET / HTTP/1.1" 200 7474 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/index.php HTTP/1.1" 302 925 "http://cloud.[our].[domain]/nextcloud/" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/index.php/login HTTP/1.1" 200 8370 "http://cloud.[our].[domain]/nextcloud/" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/core/vendor/select2/select2.css?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 17995 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/core/vendor/jquery-ui/themes/base/jquery-ui.css?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 32578 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/apps/files_videoplayer/css/style.css?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 7781 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/apps/files_versions/css/versions.css?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 1515 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/apps/files_pdfviewer/css/style.css?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 445 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/core/css/jquery.ocdialog.css?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 1798 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/core/css/jquery-ui-fixes.css?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 3919 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/core/css/guest.css?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 16599 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/core/vendor/core.js?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 1037989 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/core/search/js/search.js?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 12386 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/index.php/core/js/oc.js?v=fa9615de05db01eb844c8db5b5eda3c4 HTTP/1.1" 200 4397 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/apps/files_pdfviewer/js/previewplugin.js?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 5350 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/apps/files_videoplayer/js/viewer.js?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 3939 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/core/js/jquery-ui-fixes.js?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 580 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/core/js/files/fileinfo.js?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 2462 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/core/js/files/client.js?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 20623 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/core/js/contactsmenu.js?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 13289 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/core/vendor/jsTimezoneDetect/jstz.js?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 14888 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/index.php/js/core/merged-share-backend.js?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 105663 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/index.php/js/core/merged-template-prepend.js?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 144919 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/index.php/js/core/merged-login.js?v=fa9615de05db01eb844c8db5b5eda3c4-0 HTTP/1.1" 200 6275 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"
192.168.[proxy].[server] - - [24/Oct/2017:18:15:24 -0500] "GET /nextcloud/index.php/apps/theming/js/theming?v=0 HTTP/1.1" 200 973 "-" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.50"

My images are the same as what appears here:
5v6oUza

I just noticed a new error in the logs:

Fatal	circles	{"error":"cURL error 51: SSL: certificate subject name 'cloud.[our].[domain]' does not match target host name '192.168.[local].[address]'"}	2017-10-25T15:11:18-0500

When I click the message that shows “Add your profile information! For example your email is needed to reset your password.” from the notifications, it goes to http://192.168.[local].[address]/index.php/settings/personal. In fact, any messages shown from notifications go to the local IP address.

It’s the same with the Federated Cloud ID too with the domain listed as the local IP address.

Is your nextcloud web ui reachable via cloud.domain.xyz or cloud.domain.xyz/nextcloud?
Your settings are not consistent there, but might not be related to the errors.

Missing images were the case in combination with pretty URLs and theming in the past. This error was fixed in between, but in your special case it might be worth trying to remove pretty URLs (remove htaccess.RewriteBase from config.php) and/or try to disable/enable the theming app. Just a guess in the blue :wink:.

Michalng, thanks for the response. Yes, I was able to get to the Nextcloud web UI via both those domains. It turns out I was missing the following lines of the config file:

'overwritehost' => 'cloud.[our].[domain]',
'overwritecondaddr' => '192\.168\.[proxy]\.[ip]$',
'trusted_proxies' =>
array (
0 => '192.168.[proxy].[ip]',
),
'forwarded_for_headers' =>
array (
0 => 'HTTP_X_FORWARDED',
1 => 'HTTP_X_FORWARDED_FOR',
),

As soon as I added those, it started working. Thank you, regardless, for the wild blue guess!