Using with Apache Reverse Proxy - Page not found

hosting

#1

I can access OwnCloud 9.1 from the Internet when using port forwarding over https.

I've setup a Apache Reverse Proxy (192.168.1.13) to use a subdomain rather than the WAN IP. This setup works for other websites and services that are hosted on the same NAS (192.168.1.3) as Owncloud.

ProxyPreserveHost On

ProxyPass "/" "http://192.168.1.3:80/owncloud9/"
ProxyPassReverse "/" "http://192.168.1.3:80/owncloud9/"

ServerName  cloud.freke.xyz

I have added the proxy to the config for OwnCloud as follows:

'trusted_proxies' => array(['192.168.1.13']),

I have tried the additional parameters, however they do not resolve the issue.

"overwritehost" => "cloud.freke.xyz",
"overwriteprotocol" => "http",
"overwritewebroot" => "/owncloud9",
"overwritecondaddr" => "^192.168.1.13$",

The result is a 404 Page not found, having automatically redirected to this URL http://cloud.freke.xyz/owncloud9/index.php/login

Here is the error log entry:

{"reqId":"QYhOCuuePGv27xyyVbAt","remoteAddr":"173.244.48.66","app":"webdav","message":"Exception: {\"Message\":\"Requested uri (\\/cloud.freke.xyz\\/owncloud9\\/\\/remote.php\\/webdav\\/) is out of base uri (\\/cloud.freke.xyz\\/owncloud9\\/\\/remote.php\\/webdav\\/)\",\"Exception\":\"LogicException\",\"Code\":0,\"Trace\":\"#0 \\/volume1\\/Web\\/owncloud9\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(1225): Sabre\\HTTP\\Request->getPath()\n#1 \\/volume1\\/Web\\/owncloud9\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(454): Sabre\\DAV\\Server->checkPreconditions(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#2 \\/volume1\\/Web\\/owncloud9\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#3 \\/volume1\\/Web\\/owncloud9\\/apps\\/dav\\/appinfo\\/v1\\/webdav.php(61): Sabre\\DAV\\Server->exec()\n#4 \\/volume1\\/Web\\/owncloud9\\/remote.php(164): require_once('\\/volume1\\/Web\\/ow...')\n#5 {main}\",\"File\":\"\\/volume1\\/Web\\/owncloud9\\/3rdparty\\/sabre\\/http\\/lib\\/Request.php\",\"Line\":214,\"User\":\"David\"}","level":4,"time":"2017-09-15T01:09:48+00:00","method":"PROPFIND","url":"\/cloud.freke.xyz\/owncloud9\/\/remote.php\/webdav\/","user":"David"}

Can anyone suggest what I'm doing wrong?

Thanks
David


#2

A Reverse Proxy is complicated. The fact that no one answered so far means that you have a very specific problem.

Did you had a look at the docs?

https://doc.owncloud.com/server/10.0/admin_manual/configuration/server/reverse_proxy_configuration.html?highlight=reverse%20proxy