Index.php not found after editing/adding trusted domains, nginx revers proxy to httpd

Steps to reproduce

  1. Installed MySQL 8
  2. Created User and database
  3. Installed httpd 2.4
  4. created virtual host with domain and ssl (letsencrypt)
  5. Installed nginx as revers proxy for domain and redirecting to https
  6. Downloaded and installed owncloud from commandline
  7. Fixed issue with mysql 8 and mysql_native_password
  8. Opend URL http://domain/owncloud -> Redirects via ngnix to 127.0.0.1:8443

Expected behaviour

Browser opening owncloud login-page

Actual behaviour

Error message not trusted domain -> Added domain and 127.0.0.1 to trusted domains in
maintenance mode caused in error message
Not Found
The requested URL /indx.php was not found on this server.

Server configuration

Operating system: centos 7.7

Web server: nginx revers proxy to httpd 2.4

Database: mysql 8

PHP version: php 7.2 with fast cgi

ownCloud version: (see ownCloud admin page) 10.4.1

Updated from an older ownCloud or fresh install: fresh install

Where did you install ownCloud from: downloaded from owncloud server owncloud-latest.tar.bz2

Are you using external storage, if yes which one: no

Are you using encryption: no, just https via letsencrypt

Are you using an external user-backend, if yes which one: no.

Client configuration

<?php
$CONFIG = array (
  'passwordsalt' => 'sensitive data',
  'secret' => 'sensitive data',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '127.0.0.1',
    2 => 'domain.com',
    3 => 'domain',
    4 => 'www.domain.com',
  ),
  'datadirectory' => '/opt/owncloud/data',
  'overwrite.cli.url' => 'http://localhost',
  'dbtype' => 'mysql',
  'version' => '10.4.1.3',
  'dbname' => 'sensitive data',
  'dbhost' => 'sensitive data',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'sensitive data',
  'dbpassword' => 'sensitive data',
  'logtimezone' => 'UTC',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/domain/html/owncloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/domain/html/owncloud/apps-external',
      'url' => '/apps-external',
      'writable' => true,
    ),
  ),
  'installed' => true,
  'instanceid' => 'oc5x3byp76g3',
  'maintenance' => false,
);

Browser: Firefox

Operating system: Windows 10

Logs

ownCloud log (data/owncloud.log)

{"reqId":"XqFU2BfBA9nk0hTuEXTHwwAAAAA","level":2,"time":"2020-04-23T10:42:00+02:00","remoteAddr":"127.0.0.1","user":"--","app":"core","method":"GET","url":"\/owncloud\/index.php","message":"Trusted domain error. \"127.0.0.1\" tried to access using \"domain\" as host."}

{"reqId":"XqFU2BfBA9nk0hTuEXTHxAAAAAA","level":2,"time":"2020-04-23T10:42:00+02:00","remoteAddr":"127.0.0.1","user":"--","app":"core","method":"GET","url":"\/owncloud\/cron.php","message":"Trusted domain error. \"127.0.0.1\" tried to access using \"domain\" as host."}

Hey,

i have opened https://doc.owncloud.org/server/10.4/, put the word “proxy” into the search box on top of that page and found the following documentation which look to me like additional configuration is required for proxy environments.

https://doc.owncloud.com/server/10.4/admin_manual/configuration/server/reverse_proxy_configuration.html

2 Likes