Redirect to localhost, trusted domain in place

Hi there forum,

Allthough I've got a trusted domain setting my (new) owncloud server redirects to localhost.

Old server: Ubuntu 14.04, Apache 2.4, php5.6
New server: Ubuntu 16.04, Apache 2.4, php7.0

Owncloud the same on both servers 9.0.0.19

I've been running owncloud on a leftover pc I had laying around. Together with some WordPress sites I host for myself. The hardware got outdated so I decided to move to new hardware.... starting with owncloud.

I kept the original server in place and changed the vhost file with a proxy pass to the new hardware:
root@precious:/etc/apache2# cat sites-enabled/owncloud.conf

ServerAdmin *********@gmail.com
ServerName oc.bilbos-stekkie.com
ProxyPass / http://oc.bilbos-stekkie.com/
ProxyPassReverse / http://oc.bilbos-stekkie.com/

root@precious:/etc/apache2#

Because the host oc.bilbos-stekkie.com is resolved as a public IP I'v placed an entry in /etc/host like so

root@precious:/etc/apache2# grep oc.bilbos /etc/hosts
192.168.5.7     oc.bilbos-stekkie.com
root@precious:/etc/apache2#

With this in place the old server (192.168.5.2) should now be redirecting traffic to the new server (192.168.5.7)

On the new server I'v got the following vhost file:

root@precious-2017:/var/www/owncloud/config# cat /etc/apache2/sites-enabled/owncloud.conf
<Virtualhost *:80>
   ServerAdmin *******@gmail.com
   DocumentRoot /var/www/owncloud
   ServerName oc.bilbos-stekkie.com
   #ServerAlias www.your-domain.com
  <Directory "/var/www/owncloud">
    Options +FollowSymLinks
    AllowOverride All

    <IfModule mod_dav.c>
        Dav off
    </IfModule>

    SetEnv HOME /var/www/owncloud
    SetEnv HTTP_HOME /var/www/owncloud
  </Directory>

  <Directory "/var/www/owncloud/data/">
    # just in case if .htaccess gets disabled
    Require all denied
  </Directory>

   ErrorLog /var/log/apache2/owncloud/error_log
   CustomLog /var/log/apache2/owncloud/access_log common
</Virtualhost>
root@precious-2017:/var/www/owncloud/config#

The owncloud config has the trusted domain array set

  array (
    0 => 'oc.bilbos-stekkie.com',
  ),

I've even made an entry in /etc/hosts for oc.bilbos-stekkie.com.... but that didn;t help.... I stll get redirected to localhost.

The apache log of a request is:

192.168.5.2 - - [28/Jul/2017:22:54:39 +0200] "GET / HTTP/1.1" 302 1320

http code 302 being a redirect (to localhost?)

I'm at a loss at the moment... I anyone could help? please :smiley:

Peter

oC 9.0.0 is quite outdated:

https://owncloud.org/changelog/#latest9.0

Personally i wouldn't look for any issues in such a way too old version.

From what i can remember there are also some notes about proxies and stuff documented somewhere at https://doc.owncloud.org/

Seems you're right... an upgrade to 9,1 fixed the problem